migrations/Version20230602093145.php line 1
<?phpdeclare(strict_types=1);namespace DoctrineMigrations;use Doctrine\DBAL\Schema\Schema;use Doctrine\Migrations\AbstractMigration;/*** Auto-generated Migration: Please modify to your needs!*/final class Version20230602093145 extends AbstractMigration{public function getDescription(): string{return '';}public function up(Schema $schema): void{// this up() migration is auto-generated, please modify it to your needs$this->addSql('ALTER TABLE ticket ADD contrat_id INT DEFAULT NULL');$this->addSql('ALTER TABLE ticket ADD CONSTRAINT FK_97A0ADA31823061F FOREIGN KEY (contrat_id) REFERENCES type_intervention (id) ON DELETE SET NULL');$this->addSql('CREATE INDEX IDX_97A0ADA31823061F ON ticket (contrat_id)');}public function down(Schema $schema): void{// this down() migration is auto-generated, please modify it to your needs$this->addSql('ALTER TABLE ticket DROP FOREIGN KEY FK_97A0ADA31823061F');$this->addSql('DROP INDEX IDX_97A0ADA31823061F ON ticket');$this->addSql('ALTER TABLE ticket DROP contrat_id');}}