From d185e75de243c63e4ec41930a4fd84669d975712 Mon Sep 17 00:00:00 2001 From: Alexey Skobkin Date: Mon, 27 Apr 2020 13:19:57 +0300 Subject: [PATCH] Fixing legacy migration for MySQL strict mode. Doesn't really matter. --- src/Migrations/Version20150302205121.php | 2 +- src/Migrations/Version20150305184842.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Migrations/Version20150302205121.php b/src/Migrations/Version20150302205121.php index a3d67c0..93a6de9 100644 --- a/src/Migrations/Version20150302205121.php +++ b/src/Migrations/Version20150302205121.php @@ -40,7 +40,7 @@ class Version20150302205121 extends AbstractMigration `filename` varchar(128) CHARACTER SET utf8 NOT NULL COMMENT \'Filename\', `name` varchar(48) CHARACTER SET utf8 NOT NULL COMMENT \'Author of quote name\', `date_pub` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT \'Publish date\', - `date_exp` timestamp NOT NULL DEFAULT \'0000-00-00 00:00:00\' COMMENT \'Expire date\', + `date_exp` timestamp NOT NULL DEFAULT \'2020-01-01 00:00:00\' COMMENT \'Expire date\', `ip` varchar(48) CHARACTER SET utf8 NOT NULL COMMENT \'IP\', `secret` varchar(16) COLLATE utf8_unicode_ci NOT NULL COMMENT \'Paste secret\', PRIMARY KEY (`id`), diff --git a/src/Migrations/Version20150305184842.php b/src/Migrations/Version20150305184842.php index f5f2689..e456e1f 100644 --- a/src/Migrations/Version20150305184842.php +++ b/src/Migrations/Version20150305184842.php @@ -12,12 +12,12 @@ class Version20150305184842 extends AbstractMigration { public function up(Schema $schema): void { - $this->addSql('UPDATE copypastes SET date_expire=NULL WHERE date_expire=\'0000-00-00 00:00:00\''); + $this->addSql('UPDATE copypastes SET date_expire=NULL WHERE date_expire=\'2020-01-01 00:00:00\''); } public function down(Schema $schema): void { - $this->addSql('UPDATE copypastes SET date_expire=\'0000-00-00 00:00:00\' WHERE date_expire=NULL'); + $this->addSql('UPDATE copypastes SET date_expire=\'2020-01-01 00:00:00\' WHERE date_expire=NULL'); } }