From cc40e7a99a10d5b17f76a1ffaff40a5da1c59b09 Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Tue, 13 Apr 2021 15:31:04 +0200 Subject: [PATCH] fix sql migration syntax --- .../ChillPersonBundle/migrations/Version20210326113045.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Bundle/ChillPersonBundle/migrations/Version20210326113045.php b/src/Bundle/ChillPersonBundle/migrations/Version20210326113045.php index 68ad31667..8ae60b739 100644 --- a/src/Bundle/ChillPersonBundle/migrations/Version20210326113045.php +++ b/src/Bundle/ChillPersonBundle/migrations/Version20210326113045.php @@ -35,7 +35,7 @@ final class Version20210326113045 extends AbstractMigration $this->addSql('ALTER TABLE persons_accompanying_periods ADD CONSTRAINT FK_49A3871F550B0C53 FOREIGN KEY (accompanyingperiod_id) REFERENCES chill_person_accompanying_period (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE'); // insert datas in new join table - $this->addSql('INSERT INTO persons_accompanying_periods (person_id, accompanyingperiod_id)' + $this->addSql('INSERT INTO persons_accompanying_periods (person_id, accompanyingperiod_id) ' . 'SELECT person_id, id as accompagnying_period_id FROM chill_person_accompanying_period WHERE person_id IS NOT NULL'); // drop column