Total Complexity | 4 |
Total Lines | 48 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
14 | class Version0_14_0 extends AbstractMigration implements ContainerAwareInterface |
||
15 | { |
||
16 | use Attribute\Container; |
||
17 | |||
18 | /** |
||
19 | * Up |
||
20 | * |
||
21 | * @param \Doctrine\DBAL\Schema\Schema $schema |
||
22 | */ |
||
23 | public function up(Schema $schema) |
||
24 | { |
||
25 | $platform = $this->connection->getDatabasePlatform()->getName(); |
||
26 | |||
27 | switch ($platform) { |
||
28 | case 'postgresql': |
||
29 | // Schema |
||
30 | $this->addSql('ALTER TABLE ds_tenant DROP data'); |
||
31 | break; |
||
32 | |||
33 | default: |
||
34 | $this->abortIf(true,'Migration cannot be executed on "'.$platform.'".'); |
||
35 | break; |
||
36 | } |
||
37 | } |
||
38 | |||
39 | /** |
||
40 | * Down |
||
41 | * |
||
42 | * @param \Doctrine\DBAL\Schema\Schema $schema |
||
43 | */ |
||
44 | public function down(Schema $schema) |
||
62 | } |
||
63 | } |
||
65 |