aboutsummaryrefslogtreecommitdiffhomepage
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/DoctrineMigrations/Version20190808124957.php42
-rw-r--r--app/config/config.yml4
2 files changed, 46 insertions, 0 deletions
diff --git a/app/DoctrineMigrations/Version20190808124957.php b/app/DoctrineMigrations/Version20190808124957.php
new file mode 100644
index 00000000..4e12e995
--- /dev/null
+++ b/app/DoctrineMigrations/Version20190808124957.php
@@ -0,0 +1,42 @@
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}
diff --git a/app/config/config.yml b/app/config/config.yml
index bbcc682f..642e198d 100644
--- a/app/config/config.yml
+++ b/app/config/config.yml
@@ -392,3 +392,7 @@ httplug:
392 'X-Accept': 'application/json' 392 'X-Accept': 'application/json'
393 discovery: 393 discovery:
394 client: false 394 client: false
395
396# define custom entity so we can override length attribute to fix utf8mb4 issue
397craue_config:
398 entity_name: Wallabag\CoreBundle\Entity\InternalSetting