Fixing legacy migration for MySQL strict mode. Doesn't really matter.

This commit is contained in:
Alexey Skobkin 2020-04-27 13:19:57 +03:00
parent c9a67d4fa5
commit d185e75de2
No known key found for this signature in database
GPG key ID: 5D5CEF6F221278E7
2 changed files with 3 additions and 3 deletions

View file

@ -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`),

View file

@ -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');
}
}