diff --git a/src/CoreBundle/Migrations/Schema/V200/Version20230405123419.php b/src/CoreBundle/Migrations/Schema/V200/Version20230405123419.php index 71727277d3..72ae632d1a 100644 --- a/src/CoreBundle/Migrations/Schema/V200/Version20230405123419.php +++ b/src/CoreBundle/Migrations/Schema/V200/Version20230405123419.php @@ -23,7 +23,7 @@ final class Version20230405123419 extends AbstractMigrationChamilo } if ($schema->hasTable('gradebook_category')) { $this->addSql( - 'ALTER TABLE gradebook_category ADD CONSTRAINT FK_96A4C705C33F7837 FOREIGN KEY (document_id) REFERENCES c_document (iid);' + 'ALTER TABLE gradebook_category ADD CONSTRAINT FK_96A4C705C33F7837 FOREIGN KEY (document_id) REFERENCES c_document (iid) ON DELETE SET NULL;' ); $this->addSql( 'CREATE UNIQUE INDEX UNIQ_96A4C705C33F7837 ON gradebook_category (document_id);'