Migrations: Gradebook: remove index on document_id because al sub categories use the same document by default

pull/5276/head
NicoDucou 2 years ago
parent 03f01bf4e1
commit 719140f5d8
  1. 6
      src/CoreBundle/Migrations/Schema/V200/Version20230405123419.php

@ -26,9 +26,6 @@ final class Version20230405123419 extends AbstractMigrationChamilo
$this->addSql(
'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);'
);
}
}
@ -38,9 +35,6 @@ final class Version20230405123419 extends AbstractMigrationChamilo
$this->addSql(
'ALTER TABLE gradebook_category DROP CONSTRAINT FK_96A4C705C33F7837;'
);
$this->addSql(
'ALTER TABLE gradebook_category DROP INDEX UNIQ_96A4C705C33F7837;'
);
}
if ($schema->hasTable('c_document')) {
$this->addSql(

Loading…
Cancel
Save