Migrations up() and down() signatures fixed according to 2.0.0 changes.

This commit is contained in:
Alexey Skobkin 2019-01-19 21:38:41 +03:00
parent 6d7cc2c05d
commit d1e7b360e9
6 changed files with 12 additions and 12 deletions

View File

@ -10,7 +10,7 @@ use Doctrine\DBAL\Schema\Schema;
*/
class Version20150302205121 extends AbstractMigration
{
public function up(Schema $schema)
public function up(Schema $schema): void
{
$this->abortIf($this->connection->getDatabasePlatform()->getName() != 'mysql', 'Migration can only be executed safely on \'mysql\'.');
@ -50,7 +50,7 @@ class Version20150302205121 extends AbstractMigration
}
}
public function down(Schema $schema)
public function down(Schema $schema): void
{
$this->abortIf($this->connection->getDatabasePlatform()->getName() != 'mysql', 'Migration can only be executed safely on \'mysql\'.');

View File

@ -10,7 +10,7 @@ use Doctrine\DBAL\Schema\Schema;
*/
class Version20150302213116 extends AbstractMigration
{
public function up(Schema $schema)
public function up(Schema $schema): void
{
$this->abortIf($this->connection->getDatabasePlatform()->getName() != 'mysql', 'Migration can only be executed safely on \'mysql\'.');
@ -46,7 +46,7 @@ class Version20150302213116 extends AbstractMigration
$this->addSql('RENAME TABLE paste TO copypastes');
}
public function down(Schema $schema)
public function down(Schema $schema): void
{
$this->abortIf($this->connection->getDatabasePlatform()->getName() != 'mysql', 'Migration can only be executed safely on \'mysql\'.');

View File

@ -10,7 +10,7 @@ use Doctrine\DBAL\Schema\Schema;
*/
class Version20150302223210 extends AbstractMigration
{
public function up(Schema $schema)
public function up(Schema $schema): void
{
$this->abortIf($this->connection->getDatabasePlatform()->getName() != 'mysql', 'Migration can only be executed safely on \'mysql\'.');
@ -24,7 +24,7 @@ class Version20150302223210 extends AbstractMigration
$this->addSql('CREATE INDEX IDX_DBA4BEBE82F1BAF4 ON copypastes (language_id)');
}
public function down(Schema $schema)
public function down(Schema $schema): void
{
$this->abortIf($this->connection->getDatabasePlatform()->getName() != 'mysql', 'Migration can only be executed safely on \'mysql\'.');

View File

@ -10,12 +10,12 @@ use Doctrine\DBAL\Schema\Schema;
*/
class Version20150303224825 extends AbstractMigration
{
public function up(Schema $schema)
public function up(Schema $schema): void
{
$this->addSql('UPDATE copypastes SET secret=NULL WHERE secret=\'\'');
}
public function down(Schema $schema)
public function down(Schema $schema): void
{
$this->addSql('UPDATE copypastes SET secret=\'\' WHERE secret=NULL');
}

View File

@ -10,13 +10,13 @@ use Doctrine\DBAL\Schema\Schema;
*/
class Version20150305184842 extends AbstractMigration
{
public function up(Schema $schema)
public function up(Schema $schema): void
{
$this->addSql('UPDATE copypastes SET date_expire=NULL WHERE date_expire=\'0000-00-00 00:00:00\'');
}
public function down(Schema $schema)
public function down(Schema $schema): void
{
$this->addSql('UPDATE copypastes SET date_expire=\'0000-00-00 00:00:00\' WHERE date_expire=NULL');
}

View File

@ -12,7 +12,7 @@ use Doctrine\DBAL\Schema\Schema;
*/
class Version20150316014139 extends AbstractMigration
{
public function up(Schema $schema)
public function up(Schema $schema): void
{
$this->abortIf($this->connection->getDatabasePlatform()->getName() != 'mysql', 'Migration can only be executed safely on \'mysql\'.');
@ -21,7 +21,7 @@ class Version20150316014139 extends AbstractMigration
$this->addSql('CREATE INDEX idx_preferred ON languages (is_preferred)');
}
public function down(Schema $schema)
public function down(Schema $schema): void
{
$this->abortIf($this->connection->getDatabasePlatform()->getName() != 'mysql', 'Migration can only be executed safely on \'mysql\'.');