migrations/Version20240816104516.php line 1

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace DoctrineMigrations;
  4. use Doctrine\DBAL\Schema\Schema;
  5. use Doctrine\Migrations\AbstractMigration;
  6. /**
  7.  * Auto-generated Migration: Please modify to your needs!
  8.  */
  9. final class Version20240816104516 extends AbstractMigration
  10. {
  11.     public function getDescription(): string
  12.     {
  13.         return '';
  14.     }
  15.     public function up(Schema $schema): void
  16.     {
  17.         $this->addSql('ALTER TABLE tarif_zone ADD societe_livraison_id INT DEFAULT NULL');
  18.         $this->addSql('ALTER TABLE tarif_zone ADD CONSTRAINT FK_422AECEE448E9678 FOREIGN KEY (societe_livraison_id) REFERENCES user (id)');
  19.         $this->addSql('CREATE INDEX IDX_422AECEE448E9678 ON tarif_zone (societe_livraison_id)');
  20.        
  21.     }
  22.     public function down(Schema $schema): void
  23.     {
  24.         $this->addSql('ALTER TABLE tarif_zone DROP FOREIGN KEY FK_422AECEE448E9678');
  25.         $this->addSql('DROP INDEX IDX_422AECEE448E9678 ON tarif_zone');
  26.         $this->addSql('ALTER TABLE tarif_zone DROP societe_livraison_id');
  27.     }
  28. }