diff --git a/src/Bundle/ChillPersonBundle/migrations/Version20220310124318.php b/src/Bundle/ChillPersonBundle/migrations/Version20220310124318.php new file mode 100644 index 000000000..6b58b24a3 --- /dev/null +++ b/src/Bundle/ChillPersonBundle/migrations/Version20220310124318.php @@ -0,0 +1,38 @@ +addSql('ALTER TABLE chill_person_accompanying_period DROP CONSTRAINT fk_e260a868b0804e90'); + $this->addSql('ALTER TABLE chill_person_accompanying_period ADD CONSTRAINT fk_e260a868b0804e90 FOREIGN KEY (pinnedcomment_id) REFERENCES chill_person_accompanying_period_comment (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + } + + public function getDescription(): string + { + return 'Change constraint on pinnedComment in Accompanying period'; + } + + public function up(Schema $schema): void + { + $this->addSql('ALTER TABLE chill_person_accompanying_period DROP CONSTRAINT FK_E260A868B0804E90'); + $this->addSql('ALTER TABLE chill_person_accompanying_period ADD CONSTRAINT FK_E260A868B0804E90 FOREIGN KEY (pinnedComment_id) REFERENCES chill_person_accompanying_period_comment (id) ON DELETE SET NULL NOT DEFERRABLE INITIALLY IMMEDIATE'); + } +}