<?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 Version20220927114327 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('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');
$this->addSql('ALTER TABLE notifications_service ADD CONSTRAINT FK_A40032BDF92F3E70 FOREIGN KEY (country_id) REFERENCES country (id)');
$this->addSql('ALTER TABLE notifications_service ADD CONSTRAINT FK_A40032BD33663AF7 FOREIGN KEY (service_status_id) REFERENCES service_status (id)');
$this->addSql('ALTER TABLE notifications_service ADD CONSTRAINT FK_A40032BD979B1AD6 FOREIGN KEY (company_id) REFERENCES company (id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('DROP TABLE notifications_service');
}
}