copypaste2/src/Migrations/Version20150303224825.php

23 lines
494 B
PHP
Raw Permalink Normal View History

2015-03-03 20:38:52 +00:00
<?php
namespace DoctrineMigrations;
2015-03-03 20:38:52 +00:00
2019-01-19 18:35:36 +00:00
use Doctrine\Migrations\AbstractMigration;
2015-03-03 20:38:52 +00:00
use Doctrine\DBAL\Schema\Schema;
/**
* Set secret as NULL where secret = ''
*/
class Version20150303224825 extends AbstractMigration
{
public function up(Schema $schema): void
2015-03-03 20:38:52 +00:00
{
$this->addSql('UPDATE copypastes SET secret=NULL WHERE secret=\'\'');
}
public function down(Schema $schema): void
2015-03-03 20:38:52 +00:00
{
$this->addSql('UPDATE copypastes SET secret=\'\' WHERE secret=NULL');
}
}