Total Complexity | 3 |
Total Lines | 21 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
10 | final class Version20201212114909 extends AbstractMigrationChamilo |
||
11 | { |
||
12 | public function getDescription() : string |
||
15 | } |
||
16 | |||
17 | public function up(Schema $schema) : void |
||
18 | { |
||
19 | // this up() migration is auto-generated, please modify it to your needs |
||
20 | $this->addSql('ALTER TABLE templates ADD image_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\''); |
||
21 | $this->addSql('ALTER TABLE templates ADD CONSTRAINT FK_6F287D8E3DA5256D FOREIGN KEY (image_id) REFERENCES asset (id) ON DELETE SET NULL'); |
||
22 | $this->addSql('CREATE INDEX IDX_6F287D8E3DA5256D ON templates (image_id)'); |
||
23 | } |
||
24 | |||
25 | public function down(Schema $schema) : void |
||
31 | } |
||
32 | } |
||
33 |