mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 14:43:49 +00:00
add initial comment to accompanying period
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Chill\Migrations\Person;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
/**
|
||||
* Add a column "initial comment" in accompanying period
|
||||
*/
|
||||
final class Version20210518162439 extends AbstractMigration
|
||||
{
|
||||
public function getDescription(): string
|
||||
{
|
||||
return 'Add a column "initial comment" in accompanying period';
|
||||
}
|
||||
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
$this->addSql('ALTER TABLE chill_person_accompanying_period ADD initialComment_id INT DEFAULT NULL');
|
||||
$this->addSql('ALTER TABLE chill_person_accompanying_period ADD CONSTRAINT FK_E260A8683111D50B FOREIGN KEY (initialComment_id) REFERENCES chill_person_accompanying_period_comment (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
|
||||
$this->addSql('CREATE INDEX IDX_E260A8683111D50B ON chill_person_accompanying_period (initialComment_id)');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
$this->addSql('ALTER TABLE chill_person_accompanying_period DROP initialComment_id');
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user