mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Add missing columns to report tables
This commit is contained in:
parent
c4e7683e48
commit
800942bc92
@ -79,11 +79,9 @@ class Frein implements HasPerson, \Stringable
|
||||
private ?string $notesEmploi = '';
|
||||
|
||||
/**
|
||||
* @ORM\ManytoOne(
|
||||
* targetEntity="Chill\PersonBundle\Entity\Person")
|
||||
*
|
||||
* @Assert\NotNull()
|
||||
*/
|
||||
#[ORM\ManyToOne(targetEntity: Person::class)]
|
||||
private Person $person;
|
||||
|
||||
public function __construct()
|
||||
|
@ -39,13 +39,9 @@ class Immersion implements \Stringable
|
||||
private ?int $id = null;
|
||||
|
||||
/**
|
||||
* @var Person
|
||||
*
|
||||
* @ORM\ManytoOne(
|
||||
* targetEntity="Chill\PersonBundle\Entity\Person")
|
||||
*
|
||||
* @Assert\NotNull()
|
||||
*/
|
||||
#[ORM\ManyToOne(targetEntity: Person::class)]
|
||||
private $person;
|
||||
|
||||
/**
|
||||
|
@ -33,13 +33,9 @@ class ProjetProfessionnel implements \Stringable
|
||||
private ?int $id = null;
|
||||
|
||||
/**
|
||||
* @var Person
|
||||
*
|
||||
* @ORM\ManytoOne(
|
||||
* targetEntity="Chill\PersonBundle\Entity\Person")
|
||||
*
|
||||
* @Assert\NotNull()
|
||||
*/
|
||||
#[ORM\ManyToOne(targetEntity: Person::class)]
|
||||
private $person;
|
||||
|
||||
/**
|
||||
|
@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Chill\Migrations\Job;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
final class Version20240424140641 extends AbstractMigration
|
||||
{
|
||||
public function getDescription(): string
|
||||
{
|
||||
return 'JobBundle: add missing columns to frein, immersion and projet_professionnel tables';
|
||||
}
|
||||
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
$this->addSql('ALTER TABLE chill_csconnectes.frein ADD person_id INT DEFAULT NULL');
|
||||
$this->addSql('ALTER TABLE chill_csconnectes.frein ADD CONSTRAINT FK_172EAC0A217BBB47 FOREIGN KEY (person_id) REFERENCES chill_person_person (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
|
||||
$this->addSql('CREATE INDEX IDX_172EAC0A217BBB47 ON chill_csconnectes.frein (person_id)');
|
||||
$this->addSql('ALTER TABLE chill_csconnectes.immersion ADD person_id INT DEFAULT NULL');
|
||||
$this->addSql('ALTER TABLE chill_csconnectes.immersion ADD CONSTRAINT FK_FBB3CBB4217BBB47 FOREIGN KEY (person_id) REFERENCES chill_person_person (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
|
||||
$this->addSql('CREATE INDEX IDX_FBB3CBB4217BBB47 ON chill_csconnectes.immersion (person_id)');
|
||||
$this->addSql('ALTER TABLE chill_csconnectes.projet_professionnel ADD person_id INT DEFAULT NULL');
|
||||
$this->addSql('ALTER TABLE chill_csconnectes.projet_professionnel ADD CONSTRAINT FK_12E4FFBF217BBB47 FOREIGN KEY (person_id) REFERENCES chill_person_person (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
|
||||
$this->addSql('CREATE INDEX IDX_12E4FFBF217BBB47 ON chill_csconnectes.projet_professionnel (person_id)');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
$this->addSql('ALTER TABLE chill_csconnectes.projet_professionnel DROP CONSTRAINT FK_12E4FFBF217BBB47');
|
||||
$this->addSql('ALTER TABLE chill_csconnectes.projet_professionnel DROP person_id');
|
||||
$this->addSql('ALTER TABLE chill_csconnectes.immersion DROP CONSTRAINT FK_FBB3CBB4217BBB47');
|
||||
$this->addSql('ALTER TABLE chill_csconnectes.immersion DROP person_id');
|
||||
$this->addSql('ALTER TABLE chill_csconnectes.frein DROP CONSTRAINT FK_172EAC0A217BBB47');
|
||||
$this->addSql('ALTER TABLE chill_csconnectes.frein DROP person_id');
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user