]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
Fix MySQL issue on mig from #3373
authorKevin Decherf <kevin@kdecherf.com>
Mon, 20 Nov 2017 21:39:33 +0000 (22:39 +0100)
committerKevin Decherf <kevin@kdecherf.com>
Mon, 20 Nov 2017 21:39:33 +0000 (22:39 +0100)
Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
app/DoctrineMigrations/Version20171008195606.php

index c190f4ed38324a6ee07ca759de1953b25dd90a3d..f09726c8532dbf72e0eea8e22ba164273861399c 100644 (file)
@@ -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':