Commit 03f7ca15 by Julien Jorry

Fix migrations error with prefix

parent ef02565c
......@@ -23,7 +23,7 @@ final class Version20200408160435 extends AbstractMigration
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');
$this->addSql('ALTER TABLE '.$_ENV['DATABASE_PREFIX'].'rubrique ADD media_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE '.$_ENV['DATABASE_PREFIX'].'rubrique ADD CONSTRAINT FK_8FA4097CEA9FDD75 FOREIGN KEY (media_id) REFERENCES media__media (id)');
$this->addSql('ALTER TABLE '.$_ENV['DATABASE_PREFIX'].'rubrique ADD CONSTRAINT FK_8FA4097CEA9FDD75 FOREIGN KEY (media_id) REFERENCES '.$_ENV['DATABASE_PREFIX'].'media__media (id)');
$this->addSql('CREATE INDEX IDX_8FA4097CEA9FDD75 ON '.$_ENV['DATABASE_PREFIX'].'rubrique (media_id)');
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment