]> git.immae.eu Git - github/wallabag/wallabag.git/blame - app/DoctrineMigrations/Version20190808124957.php
material: replace display: flex with block in print mode
[github/wallabag/wallabag.git] / app / DoctrineMigrations / Version20190808124957.php
CommitLineData
1576905e
JB
1<?php
2
3namespace Application\Migrations;
4
5use Doctrine\DBAL\Schema\Schema;
6use Wallabag\CoreBundle\Doctrine\WallabagMigration;
7
8/**
9 * Change the internal setting table name.
10 */
11final class Version20190808124957 extends WallabagMigration
12{
13 public function up(Schema $schema): void
14 {
15 switch ($this->connection->getDatabasePlatform()->getName()) {
16 case 'sqlite':
17 $this->addSql('ALTER TABLE ' . $this->getTable('craue_config_setting', true) . ' RENAME TO ' . $this->getTable('internal_setting', true));
18 break;
19 case 'mysql':
20 $this->addSql('ALTER TABLE ' . $this->getTable('craue_config_setting') . ' RENAME ' . $this->getTable('internal_setting'));
21 break;
22 case 'postgresql':
23 $this->addSql('ALTER TABLE ' . $this->getTable('craue_config_setting') . ' RENAME TO ' . $this->getTable('internal_setting'));
24 break;
25 }
26 }
27
28 public function down(Schema $schema): void
29 {
30 switch ($this->connection->getDatabasePlatform()->getName()) {
31 case 'sqlite':
32 $this->addSql('ALTER TABLE ' . $this->getTable('internal_setting', true) . ' RENAME TO ' . $this->getTable('craue_config_setting', true));
33 break;
34 case 'mysql':
35 $this->addSql('ALTER TABLE ' . $this->getTable('internal_setting') . ' RENAME ' . $this->getTable('craue_config_setting'));
36 break;
37 case 'postgresql':
38 $this->addSql('ALTER TABLE ' . $this->getTable('internal_setting') . ' RENAME TO ' . $this->getTable('craue_config_setting'));
39 break;
40 }
41 }
42}