<?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 Version20251126073931 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 members_cosplan (id SERIAL NOT NULL, member_id INT DEFAULT NULL, personnage VARCHAR(255) NOT NULL, univers VARCHAR(255) NOT NULL, description TEXT DEFAULT NULL, PRIMARY KEY(id))');
        $this->addSql('CREATE INDEX IDX_7BAC19D77597D3FE ON members_cosplan (member_id)');
        $this->addSql('ALTER TABLE members_cosplan ADD CONSTRAINT FK_7BAC19D77597D3FE FOREIGN KEY (member_id) REFERENCES members (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
    }

    public function down(Schema $schema): void
    {
        // this down() migration is auto-generated, please modify it to your needs
        $this->addSql('CREATE SCHEMA public');
        $this->addSql('ALTER TABLE members_cosplan DROP CONSTRAINT FK_7BAC19D77597D3FE');
        $this->addSql('DROP TABLE members_cosplan');
    }
}
