Fixing legacy migration for MySQL strict mode. Doesn't really matter.
This commit is contained in:
parent
c9a67d4fa5
commit
d185e75de2
|
@ -40,7 +40,7 @@ class Version20150302205121 extends AbstractMigration
|
||||||
`filename` varchar(128) CHARACTER SET utf8 NOT NULL COMMENT \'Filename\',
|
`filename` varchar(128) CHARACTER SET utf8 NOT NULL COMMENT \'Filename\',
|
||||||
`name` varchar(48) CHARACTER SET utf8 NOT NULL COMMENT \'Author of quote name\',
|
`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_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\',
|
`ip` varchar(48) CHARACTER SET utf8 NOT NULL COMMENT \'IP\',
|
||||||
`secret` varchar(16) COLLATE utf8_unicode_ci NOT NULL COMMENT \'Paste secret\',
|
`secret` varchar(16) COLLATE utf8_unicode_ci NOT NULL COMMENT \'Paste secret\',
|
||||||
PRIMARY KEY (`id`),
|
PRIMARY KEY (`id`),
|
||||||
|
|
|
@ -12,12 +12,12 @@ class Version20150305184842 extends AbstractMigration
|
||||||
{
|
{
|
||||||
public function up(Schema $schema): void
|
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
|
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');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue