aboutsummaryrefslogtreecommitdiffhomepage
path: root/app/DoctrineMigrations/Version20181029131313.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/DoctrineMigrations/Version20181029131313.php')
-rw-r--r--app/DoctrineMigrations/Version20181029131313.php10
1 files changed, 3 insertions, 7 deletions
diff --git a/app/DoctrineMigrations/Version20181029131313.php b/app/DoctrineMigrations/Version20181029131313.php
index 328dc80e..47b2f3f4 100644
--- a/app/DoctrineMigrations/Version20181029131313.php
+++ b/app/DoctrineMigrations/Version20181029131313.php
@@ -14,20 +14,16 @@ final class Version20181029131313 extends WallabagMigration
14{ 14{
15 public function up(Schema $schema): void 15 public function up(Schema $schema): void
16 { 16 {
17 $this->addSql('ALTER TABLE ' . $this->getTable('craue_config_setting') . ' RENAME TO ' . $this->getTable('internal_setting') . ';');
18
19 if ('mysql' === $this->connection->getDatabasePlatform()->getName()) { 17 if ('mysql' === $this->connection->getDatabasePlatform()->getName()) {
20 $this->addSql('ALTER TABLE ' . $this->getTable('internal_setting') . ' CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;'); 18 $this->addSql('ALTER TABLE ' . $this->getTable('craue_config_setting') . ' CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;');
21 19
22 $this->addSql('ALTER TABLE ' . $this->getTable('internal_setting') . ' CHANGE `name` `name` VARCHAR(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;'); 20 $this->addSql('ALTER TABLE ' . $this->getTable('craue_config_setting') . ' CHANGE `name` `name` VARCHAR(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;');
23 $this->addSql('ALTER TABLE ' . $this->getTable('internal_setting') . ' CHANGE `section` `section` VARCHAR(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;'); 21 $this->addSql('ALTER TABLE ' . $this->getTable('craue_config_setting') . ' CHANGE `section` `section` VARCHAR(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;');
24 } 22 }
25 } 23 }
26 24
27 public function down(Schema $schema): void 25 public function down(Schema $schema): void
28 { 26 {
29 $this->addSql('ALTER TABLE ' . $this->getTable('internal_setting') . ' RENAME TO ' . $this->getTable('craue_config_setting') . ';');
30
31 if ('mysql' === $this->connection->getDatabasePlatform()->getName()) { 27 if ('mysql' === $this->connection->getDatabasePlatform()->getName()) {
32 $this->addSql('ALTER TABLE ' . $this->getTable('craue_config_setting') . ' CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;'); 28 $this->addSql('ALTER TABLE ' . $this->getTable('craue_config_setting') . ' CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;');
33 29