From: Jeremy Benoist Date: Mon, 12 Dec 2016 10:01:54 +0000 (+0100) Subject: Run migration in test, ready for MySQL X-Git-Tag: 2.2.0~3^2~19^2~10 X-Git-Url: https://git.immae.eu/?p=github%2Fwallabag%2Fwallabag.git;a=commitdiff_plain;h=a48b5d5a5aa437cff0474321962c12b0e045dbf8 Run migration in test, ready for MySQL --- 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 $this->addSql('ALTER DATABASE '.$this->container->getParameter('database_name').' CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;'); + // convert field length for utf8mb4 + // http://stackoverflow.com/a/31474509/569101 + $this->addSql('ALTER TABLE '.$this->getTable('user').' CHANGE confirmation_token confirmation_token VARCHAR(180) NOT NULL;'); + $this->addSql('ALTER TABLE '.$this->getTable('user').' CHANGE salt salt VARCHAR(180) NOT NULL;'); + $this->addSql('ALTER TABLE '.$this->getTable('user').' CHANGE password password VARCHAR(180) NOT NULL;'); + $this->addSql('ALTER TABLE '.$this->getTable('annotation').' CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;'); $this->addSql('ALTER TABLE '.$this->getTable('entry').' CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;'); $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 $this->skipIf(false !== $images, 'It seems that you already played this migration.'); - $this->addSql('INSERT INTO "'.$this->getTable('craue_config_setting')."\" (name, value, section) VALUES ('download_images_enabled', 0, 'misc')"); + $this->addSql('INSERT INTO '.$this->getTable('craue_config_setting')." (name, value, section) VALUES ('download_images_enabled', 0, 'misc')"); } /** @@ -44,6 +44,6 @@ class Version20161031132655 extends AbstractMigration implements ContainerAwareI */ public function down(Schema $schema) { - $this->addSql('DELETE FROM "'.$this->getTable('craue_config_setting')."\" WHERE name = 'download_images_enabled';"); + $this->addSql('DELETE FROM '.$this->getTable('craue_config_setting')." WHERE name = 'download_images_enabled';"); } } diff --git a/build.xml b/build.xml index 37b40743..aae076e1 100644 --- a/build.xml +++ b/build.xml @@ -1,9 +1,9 @@ - - - + + + @@ -26,11 +26,6 @@ - - - - - @@ -45,12 +40,40 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -59,12 +82,40 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -73,12 +124,40 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + +