<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20240913113230 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 ictus_commande ADD societe_livraison_id INT DEFAULT NULL, CHANGE reference reference INT NOT NULL');
$this->addSql('ALTER TABLE ictus_commande ADD CONSTRAINT FK_536D322C448E9678 FOREIGN KEY (societe_livraison_id) REFERENCES societe_livraison (id)');
$this->addSql('CREATE INDEX IDX_536D322C448E9678 ON ictus_commande (societe_livraison_id)');
}
public function down(Schema $schema): void
{
$this->addSql('ALTER TABLE ictus_commande DROP FOREIGN KEY FK_536D322C448E9678');
$this->addSql('DROP INDEX IDX_536D322C448E9678 ON ictus_commande');
$this->addSql('ALTER TABLE ictus_commande DROP societe_livraison_id, CHANGE reference reference VARCHAR(255) NOT NULL');
}
}