adapt migrations files to flex

This commit is contained in:
Julien Fastré 2020-07-31 15:52:06 +02:00
parent 70efafc0f5
commit 98a3b38995
6 changed files with 16 additions and 16 deletions

View File

@ -2,7 +2,7 @@
namespace Application\Migrations; namespace Application\Migrations;
use Doctrine\DBAL\Migrations\AbstractMigration; use Doctrine\Migrations\AbstractMigration;
use Doctrine\DBAL\Schema\Schema; use Doctrine\DBAL\Schema\Schema;
/** /**
@ -13,7 +13,7 @@ class Version20180413135614 extends AbstractMigration
/** /**
* @param Schema $schema * @param Schema $schema
*/ */
public function up(Schema $schema) public function up(Schema $schema): void
{ {
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.'); $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
@ -33,7 +33,7 @@ class Version20180413135614 extends AbstractMigration
/** /**
* @param Schema $schema * @param Schema $schema
*/ */
public function down(Schema $schema) public function down(Schema $schema): void
{ {
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.'); $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');

View File

@ -2,7 +2,7 @@
namespace Application\Migrations; namespace Application\Migrations;
use Doctrine\DBAL\Migrations\AbstractMigration; use Doctrine\Migrations\AbstractMigration;
use Doctrine\DBAL\Schema\Schema; use Doctrine\DBAL\Schema\Schema;
/** /**
@ -13,7 +13,7 @@ class Version20180413201023 extends AbstractMigration
/** /**
* @param Schema $schema * @param Schema $schema
*/ */
public function up(Schema $schema) public function up(Schema $schema): void
{ {
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.'); $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
@ -36,7 +36,7 @@ class Version20180413201023 extends AbstractMigration
/** /**
* @param Schema $schema * @param Schema $schema
*/ */
public function down(Schema $schema) public function down(Schema $schema): void
{ {
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.'); $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');

View File

@ -2,7 +2,7 @@
namespace Application\Migrations; namespace Application\Migrations;
use Doctrine\DBAL\Migrations\AbstractMigration; use Doctrine\Migrations\AbstractMigration;
use Doctrine\DBAL\Schema\Schema; use Doctrine\DBAL\Schema\Schema;
/** /**
@ -10,7 +10,7 @@ use Doctrine\DBAL\Schema\Schema;
*/ */
class Version20180426093011 extends AbstractMigration class Version20180426093011 extends AbstractMigration
{ {
public function up(Schema $schema) public function up(Schema $schema): void
{ {
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.'); $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
@ -18,7 +18,7 @@ class Version20180426093011 extends AbstractMigration
$this->addSql('ALTER TABLE chill_task.recurring_task ADD closed BOOLEAN DEFAULT \'false\' NOT NULL'); $this->addSql('ALTER TABLE chill_task.recurring_task ADD closed BOOLEAN DEFAULT \'false\' NOT NULL');
} }
public function down(Schema $schema) public function down(Schema $schema): void
{ {
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.'); $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');

View File

@ -2,7 +2,7 @@
namespace Application\Migrations; namespace Application\Migrations;
use Doctrine\DBAL\Migrations\AbstractMigration; use Doctrine\Migrations\AbstractMigration;
use Doctrine\DBAL\Schema\Schema; use Doctrine\DBAL\Schema\Schema;
/** /**
@ -10,7 +10,7 @@ use Doctrine\DBAL\Schema\Schema;
*/ */
class Version20180502194119 extends AbstractMigration class Version20180502194119 extends AbstractMigration
{ {
public function up(Schema $schema) public function up(Schema $schema): void
{ {
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.'); $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
@ -23,7 +23,7 @@ class Version20180502194119 extends AbstractMigration
$this->addSql('ALTER TABLE chill_task.single_task_place_event ADD CONSTRAINT FK_D459EBEE8DB60186 FOREIGN KEY (task_id) REFERENCES chill_task.single_task (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); $this->addSql('ALTER TABLE chill_task.single_task_place_event ADD CONSTRAINT FK_D459EBEE8DB60186 FOREIGN KEY (task_id) REFERENCES chill_task.single_task (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
} }
public function down(Schema $schema) public function down(Schema $schema): void
{ {
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.'); $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');

View File

@ -10,7 +10,7 @@ use Doctrine\Migrations\AbstractMigration;
*/ */
final class Version20181113161925 extends AbstractMigration final class Version20181113161925 extends AbstractMigration
{ {
public function up(Schema $schema) : void public function up(Schema $schema): void
{ {
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.'); $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
@ -18,7 +18,7 @@ final class Version20181113161925 extends AbstractMigration
$this->addSql('CREATE INDEX transition_task ON chill_task.single_task_place_event (task_id, transition)'); $this->addSql('CREATE INDEX transition_task ON chill_task.single_task_place_event (task_id, transition)');
} }
public function down(Schema $schema) : void public function down(Schema $schema): void
{ {
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.'); $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');

View File

@ -10,7 +10,7 @@ use Doctrine\Migrations\AbstractMigration;
*/ */
final class Version20181113164108 extends AbstractMigration final class Version20181113164108 extends AbstractMigration
{ {
public function up(Schema $schema) : void public function up(Schema $schema): void
{ {
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.'); $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
@ -18,7 +18,7 @@ final class Version20181113164108 extends AbstractMigration
$this->addSql('CREATE INDEX by_current_state ON chill_task.single_task USING GIN (current_states)'); $this->addSql('CREATE INDEX by_current_state ON chill_task.single_task USING GIN (current_states)');
} }
public function down(Schema $schema) : void public function down(Schema $schema): void
{ {
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.'); $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');