migrations/Version20220927114327.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 Version20220927114327 extends AbstractMigration
  10. {
  11.     public function getDescription(): string
  12.     {
  13.         return '';
  14.     }
  15.     public function up(Schema $schema): void
  16.     {
  17.         // this up() migration is auto-generated, please modify it to your needs
  18.         $this->addSql('CREATE TABLE notifications_service (id INT AUTO_INCREMENT NOT NULL, country_id INT NOT NULL, service_status_id INT NOT NULL, company_id INT NOT NULL, name VARCHAR(255) NOT NULL, notification_title VARCHAR(255) NOT NULL, notification_short_description LONGTEXT DEFAULT NULL, notification_long_description LONGTEXT DEFAULT NULL, read_date DATETIME DEFAULT NULL, notification_references LONGTEXT DEFAULT NULL, notification_baseline LONGTEXT DEFAULT NULL, document_url VARCHAR(255) DEFAULT NULL, notification_document LONGTEXT DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, INDEX IDX_A40032BDF92F3E70 (country_id), INDEX IDX_A40032BD33663AF7 (service_status_id), INDEX IDX_A40032BD979B1AD6 (company_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  19.         $this->addSql('ALTER TABLE notifications_service ADD CONSTRAINT FK_A40032BDF92F3E70 FOREIGN KEY (country_id) REFERENCES country (id)');
  20.         $this->addSql('ALTER TABLE notifications_service ADD CONSTRAINT FK_A40032BD33663AF7 FOREIGN KEY (service_status_id) REFERENCES service_status (id)');
  21.         $this->addSql('ALTER TABLE notifications_service ADD CONSTRAINT FK_A40032BD979B1AD6 FOREIGN KEY (company_id) REFERENCES company (id)');
  22.     }
  23.     public function down(Schema $schema): void
  24.     {
  25.         // this down() migration is auto-generated, please modify it to your needs
  26.         $this->addSql('DROP TABLE notifications_service');
  27.     }
  28. }