aboutsummaryrefslogtreecommitdiffhomepage
path: root/app/DoctrineMigrations
diff options
context:
space:
mode:
authorJeremy Benoist <jeremy.benoist@gmail.com>2016-12-12 11:01:54 +0100
committerJeremy Benoist <jeremy.benoist@gmail.com>2016-12-19 10:35:24 +0100
commita48b5d5a5aa437cff0474321962c12b0e045dbf8 (patch)
tree92b6cf88b73d48663fc28b62738bcfe7f99bbf68 /app/DoctrineMigrations
parent68cb89a5161351dd730871fc834bf147204a2a07 (diff)
downloadwallabag-a48b5d5a5aa437cff0474321962c12b0e045dbf8.tar.gz
wallabag-a48b5d5a5aa437cff0474321962c12b0e045dbf8.tar.zst
wallabag-a48b5d5a5aa437cff0474321962c12b0e045dbf8.zip
Run migration in test, ready for MySQL
Diffstat (limited to 'app/DoctrineMigrations')
-rw-r--r--app/DoctrineMigrations/Version20161022134138.php6
-rw-r--r--app/DoctrineMigrations/Version20161031132655.php4
2 files changed, 8 insertions, 2 deletions
diff --git a/app/DoctrineMigrations/Version20161022134138.php b/app/DoctrineMigrations/Version20161022134138.php
index b3d02b40..3ac8cc5b 100644
--- a/app/DoctrineMigrations/Version20161022134138.php
+++ b/app/DoctrineMigrations/Version20161022134138.php
@@ -33,6 +33,12 @@ class Version20161022134138 extends AbstractMigration implements ContainerAwareI
33 33
34 $this->addSql('ALTER DATABASE '.$this->container->getParameter('database_name').' CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;'); 34 $this->addSql('ALTER DATABASE '.$this->container->getParameter('database_name').' CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;');
35 35
36 // convert field length for utf8mb4
37 // http://stackoverflow.com/a/31474509/569101
38 $this->addSql('ALTER TABLE '.$this->getTable('user').' CHANGE confirmation_token confirmation_token VARCHAR(180) NOT NULL;');
39 $this->addSql('ALTER TABLE '.$this->getTable('user').' CHANGE salt salt VARCHAR(180) NOT NULL;');
40 $this->addSql('ALTER TABLE '.$this->getTable('user').' CHANGE password password VARCHAR(180) NOT NULL;');
41
36 $this->addSql('ALTER TABLE '.$this->getTable('annotation').' CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;'); 42 $this->addSql('ALTER TABLE '.$this->getTable('annotation').' CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;');
37 $this->addSql('ALTER TABLE '.$this->getTable('entry').' CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;'); 43 $this->addSql('ALTER TABLE '.$this->getTable('entry').' CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;');
38 $this->addSql('ALTER TABLE '.$this->getTable('tag').' CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;'); 44 $this->addSql('ALTER TABLE '.$this->getTable('tag').' CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;');
diff --git a/app/DoctrineMigrations/Version20161031132655.php b/app/DoctrineMigrations/Version20161031132655.php
index 770ad2d8..f81898ff 100644
--- a/app/DoctrineMigrations/Version20161031132655.php
+++ b/app/DoctrineMigrations/Version20161031132655.php
@@ -36,7 +36,7 @@ class Version20161031132655 extends AbstractMigration implements ContainerAwareI
36 36
37 $this->skipIf(false !== $images, 'It seems that you already played this migration.'); 37 $this->skipIf(false !== $images, 'It seems that you already played this migration.');
38 38
39 $this->addSql('INSERT INTO "'.$this->getTable('craue_config_setting')."\" (name, value, section) VALUES ('download_images_enabled', 0, 'misc')"); 39 $this->addSql('INSERT INTO '.$this->getTable('craue_config_setting')." (name, value, section) VALUES ('download_images_enabled', 0, 'misc')");
40 } 40 }
41 41
42 /** 42 /**
@@ -44,6 +44,6 @@ class Version20161031132655 extends AbstractMigration implements ContainerAwareI
44 */ 44 */
45 public function down(Schema $schema) 45 public function down(Schema $schema)
46 { 46 {
47 $this->addSql('DELETE FROM "'.$this->getTable('craue_config_setting')."\" WHERE name = 'download_images_enabled';"); 47 $this->addSql('DELETE FROM '.$this->getTable('craue_config_setting')." WHERE name = 'download_images_enabled';");
48 } 48 }
49} 49}