Stop using ContainerAwareInterface in migrations

This commit is contained in:
Yassine Guedidi
2025-01-18 14:44:31 +01:00
parent bcf0f2f52c
commit e715da7e91
19 changed files with 83 additions and 66 deletions

View File

@ -12,18 +12,14 @@ class Version20161117071626 extends WallabagMigration
{
public function up(Schema $schema): void
{
$share = $this->container
->get('doctrine.orm.default_entity_manager')
->getConnection()
$share = $this->connection
->fetchOne('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'share_unmark'");
if (false === $share) {
$this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('share_unmark', 0, 'entry')");
}
$unmark = $this->container
->get('doctrine.orm.default_entity_manager')
->getConnection()
$unmark = $this->connection
->fetchOne('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'unmark_url'");
if (false === $unmark) {