migrations/Version20230531100618.php line 1
<?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 Version20230531100618 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 nom_de_domaine (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(255) NOT NULL, registrar VARCHAR(255) NOT NULL, expiration_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE client ADD nom_de_domaine_id INT DEFAULT NULL, DROP registrar');
$this->addSql('ALTER TABLE client ADD CONSTRAINT FK_C7440455B72FEAC7 FOREIGN KEY (nom_de_domaine_id) REFERENCES nom_de_domaine (id)');
$this->addSql('CREATE INDEX IDX_C7440455B72FEAC7 ON client (nom_de_domaine_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE client DROP FOREIGN KEY FK_C7440455B72FEAC7');
$this->addSql('DROP TABLE nom_de_domaine');
$this->addSql('DROP INDEX IDX_C7440455B72FEAC7 ON client');
$this->addSql('ALTER TABLE client ADD registrar TINYTEXT DEFAULT NULL COMMENT \'(DC2Type:array)\', DROP nom_de_domaine_id');
}
}