From: Kevin Decherf Date: Mon, 20 Nov 2017 21:39:33 +0000 (+0100) Subject: Fix MySQL issue on mig from #3373 X-Git-Tag: 2.3.0~18^2~1 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;ds=sidebyside;h=b3d85e69e913ea4590a03498ced6c8589df3a36f;p=github%2Fwallabag%2Fwallabag.git Fix MySQL issue on mig from #3373 Signed-off-by: Kevin Decherf --- diff --git a/app/DoctrineMigrations/Version20171008195606.php b/app/DoctrineMigrations/Version20171008195606.php index c190f4ed..f09726c8 100644 --- a/app/DoctrineMigrations/Version20171008195606.php +++ b/app/DoctrineMigrations/Version20171008195606.php @@ -31,6 +31,7 @@ class Version20171008195606 extends AbstractMigration implements ContainerAwareI switch ($this->connection->getDatabasePlatform()->getName()) { case 'mysql': + $this->addSql('UPDATE ' . $this->getTable('entry') . ' SET reading_time = 0 WHERE reading_time IS NULL;'); $this->addSql('ALTER TABLE ' . $this->getTable('entry') . ' CHANGE reading_time reading_time INT(11) NOT NULL;'); break; case 'postgresql':