Total Complexity | 3 |
Total Lines | 21 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
10 | final class Version20190513085321 extends AbstractMigration |
||
11 | { |
||
12 | public function getDescription(): string |
||
13 | { |
||
14 | return 'Add missing timestampable columns to attachment'; |
||
15 | } |
||
16 | |||
17 | public function up(Schema $schema): void |
||
18 | { |
||
19 | $this->abortIf('postgresql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'postgresql\'.'); |
||
20 | |||
21 | $this->addSql('ALTER TABLE npd_attachment ADD created TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL'); |
||
22 | $this->addSql('ALTER TABLE npd_attachment ADD updated TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL'); |
||
23 | } |
||
24 | |||
25 | public function down(Schema $schema): void |
||
31 | } |
||
32 | } |
||
33 |