migrations/Version20230314175635.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 Version20230314175635 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 nft_season (id INT AUTO_INCREMENT NOT NULL, nft_collection_id INT NOT NULL, name VARCHAR(255) NOT NULL, start_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', end_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', background_folder VARCHAR(255) NOT NULL, border_folder VARCHAR(255) NOT NULL, UNIQUE INDEX UNIQ_BF7C58A5327C6A9D (nft_collection_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE nft_season ADD CONSTRAINT FK_BF7C58A5327C6A9D FOREIGN KEY (nft_collection_id) REFERENCES nft_collection (id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE nft_season DROP FOREIGN KEY FK_BF7C58A5327C6A9D');
$this->addSql('DROP TABLE nft_season');
}
}