mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
fix sql migration syntax
This commit is contained in:
parent
aa05223a4e
commit
cc40e7a99a
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user