mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-21 14:14:58 +00:00
cs-fixes
This commit is contained in:
@@ -11,7 +11,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace Application\Migrations;
|
||||
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
@@ -20,6 +19,13 @@ use Doctrine\Migrations\AbstractMigration;
|
||||
*/
|
||||
final class Version20180522080432 extends AbstractMigration
|
||||
{
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
|
||||
|
||||
$this->addSql('CREATE SCHEMA chill_budget CASCADE');
|
||||
}
|
||||
|
||||
public function getDescription(): string
|
||||
{
|
||||
return 'Creation of necessary tables for budget bundle';
|
||||
@@ -44,12 +50,4 @@ final class Version20180522080432 extends AbstractMigration
|
||||
$this->addSql('ALTER TABLE chill_budget.resource ADD CONSTRAINT FK_5E0A5E97217BBB47 FOREIGN KEY (person_id) REFERENCES chill_person_person (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
|
||||
$this->addSql('ALTER TABLE chill_budget.charge ADD CONSTRAINT FK_5C99D2C3217BBB47 FOREIGN KEY (person_id) REFERENCES chill_person_person (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
|
||||
|
||||
$this->addSql('CREATE SCHEMA chill_budget CASCADE');
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user