php code fix

This commit is contained in:
nobohan
2022-01-19 11:09:02 +01:00
parent 9f7f6e33e8
commit 175fa7bf2f
2 changed files with 28 additions and 29 deletions

View File

@@ -15,10 +15,17 @@ use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Add userJob to AccompanyingPeriod
* Add userJob to AccompanyingPeriod.
*/
final class Version20220119091025 extends AbstractMigration
{
public function down(Schema $schema): void
{
$this->addSql('ALTER TABLE chill_person_accompanying_period DROP CONSTRAINT FK_E260A868BE04EA9');
$this->addSql('DROP INDEX IDX_E260A868BE04EA9');
$this->addSql('ALTER TABLE chill_person_accompanying_period DROP job_id');
}
public function getDescription(): string
{
return 'Add userJob to AccompanyingPeriod';
@@ -30,11 +37,4 @@ final class Version20220119091025 extends AbstractMigration
$this->addSql('ALTER TABLE chill_person_accompanying_period ADD CONSTRAINT FK_E260A868BE04EA9 FOREIGN KEY (job_id) REFERENCES chill_main_user_job (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('CREATE INDEX IDX_E260A868BE04EA9 ON chill_person_accompanying_period (job_id)');
}
public function down(Schema $schema): void
{
$this->addSql('ALTER TABLE chill_person_accompanying_period DROP CONSTRAINT FK_E260A868BE04EA9');
$this->addSql('DROP INDEX IDX_E260A868BE04EA9');
$this->addSql('ALTER TABLE chill_person_accompanying_period DROP job_id');
}
}