dbPool->get('schema')); $builder->alterTable('news') ->addConstraint('news_comment_list', 'comments_list', 'comments_list_id') ->execute(); $mapper = \file_get_contents(__DIR__ . '/../../Models/NewsArticleMapper.php'); if ($mapper === false) { throw new \Exception('Couldn\'t parse mapper'); } // @todo removed until modular mapper extension is implemented // $mapper = \str_replace([ // '// @Module Comments ', // '/* @Module Comments ', // ' @Module Comments */', // ], '', $mapper); // \file_put_contents(__DIR__ . '/../../Models/NewsArticleMapper.php', $mapper); Autoloader::invalidate(__DIR__ . '/../../Models/NewsArticleMapper.php'); } }