mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-06 23:04:58 +00:00
cs: Fix code style (safe rules only).
This commit is contained in:
@@ -1,15 +1,35 @@
|
||||
<?php declare(strict_types=1);
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Chill is a software for social workers
|
||||
*
|
||||
* For the full copyright and license information, please view
|
||||
* the LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Chill\Migrations\DocStore;
|
||||
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
/**
|
||||
* Add schema for stored object
|
||||
* Add schema for stored object.
|
||||
*/
|
||||
final class Version20180606133338 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('ALTER TABLE chill_doc.person_document DROP CONSTRAINT FK_41DA53C232D562B');
|
||||
$this->addSql('DROP SEQUENCE chill_doc.stored_object_id_seq CASCADE');
|
||||
$this->addSql('DROP TABLE chill_doc.stored_object');
|
||||
$this->addSql('ALTER TABLE chill_doc.person_document ADD content TEXT DEFAULT NULL');
|
||||
$this->addSql('ALTER TABLE chill_doc.person_document DROP object_id');
|
||||
}
|
||||
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
|
||||
@@ -21,15 +41,4 @@ final class Version20180606133338 extends AbstractMigration
|
||||
$this->addSql('ALTER TABLE chill_doc.person_document ADD CONSTRAINT FK_41DA53C232D562B FOREIGN KEY (object_id) REFERENCES chill_doc.stored_object (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
|
||||
$this->addSql('CREATE INDEX IDX_41DA53C232D562B ON chill_doc.person_document (object_id)');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
|
||||
|
||||
$this->addSql('ALTER TABLE chill_doc.person_document DROP CONSTRAINT FK_41DA53C232D562B');
|
||||
$this->addSql('DROP SEQUENCE chill_doc.stored_object_id_seq CASCADE');
|
||||
$this->addSql('DROP TABLE chill_doc.stored_object');
|
||||
$this->addSql('ALTER TABLE chill_doc.person_document ADD content TEXT DEFAULT NULL');
|
||||
$this->addSql('ALTER TABLE chill_doc.person_document DROP object_id');
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user