adapt migrations files to flex

This commit is contained in:
Julien Fastré 2020-07-31 15:52:06 +02:00
parent e082d35efb
commit a709589229
2 changed files with 6 additions and 6 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;
/** /**
@ -10,7 +10,7 @@ use Doctrine\DBAL\Schema\Schema;
*/ */
final class Version20180605102533 extends AbstractMigration final class Version20180605102533 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\'.');
@ -29,7 +29,7 @@ final class Version20180605102533 extends AbstractMigration
$this->addSql('ALTER TABLE chill_doc.person_document ADD CONSTRAINT FK_41DA53C217BBB47 FOREIGN KEY (person_id) REFERENCES chill_person_person (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); $this->addSql('ALTER TABLE chill_doc.person_document ADD CONSTRAINT FK_41DA53C217BBB47 FOREIGN KEY (person_id) REFERENCES chill_person_person (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
} }
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

@ -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;
*/ */
final class Version20180606133338 extends AbstractMigration final class Version20180606133338 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\'.');
@ -25,7 +25,7 @@ final class Version20180606133338 extends AbstractMigration
$this->addSql('CREATE INDEX IDX_41DA53C232D562B ON chill_doc.person_document (object_id)'); $this->addSql('CREATE INDEX IDX_41DA53C232D562B ON chill_doc.person_document (object_id)');
} }
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\'.');