<?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 Version20220706092236 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 ticket (id INT AUTO_INCREMENT NOT NULL, type_id INT DEFAULT NULL, urgence_id INT DEFAULT NULL, object VARCHAR(255) DEFAULT NULL, created_at DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\', status INT DEFAULT NULL, message VARCHAR(255) DEFAULT NULL, msisdn VARCHAR(255) DEFAULT NULL, contract VARCHAR(255) DEFAULT NULL, customer_no VARCHAR(255) DEFAULT NULL, response LONGTEXT DEFAULT NULL, INDEX IDX_97A0ADA3C54C8C93 (type_id), INDEX IDX_97A0ADA3578B7FBD (urgence_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE type_ticket (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(255) DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE urgence_ticket (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(255) DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE ticket ADD CONSTRAINT FK_97A0ADA3C54C8C93 FOREIGN KEY (type_id) REFERENCES type_ticket (id)');
$this->addSql('ALTER TABLE ticket ADD CONSTRAINT FK_97A0ADA3578B7FBD FOREIGN KEY (urgence_id) REFERENCES urgence_ticket (id)');
$this->addSql('ALTER TABLE msisdn_service ADD response LONGTEXT DEFAULT NULL');
}
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_97A0ADA3C54C8C93');
$this->addSql('ALTER TABLE ticket DROP FOREIGN KEY FK_97A0ADA3578B7FBD');
$this->addSql('DROP TABLE ticket');
$this->addSql('DROP TABLE type_ticket');
$this->addSql('DROP TABLE urgence_ticket');
$this->addSql('ALTER TABLE msisdn_service DROP response');
}
}