<?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 Version20240617080344 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('ALTER TABLE members_asso ADD img_id INT DEFAULT NULL, ADD membership_date DATE NOT NULL, ADD payment INT NOT NULL, ADD payment_date DATE NOT NULL, ADD address VARCHAR(510) NOT NULL, ADD president_name VARCHAR(255) DEFAULT NULL, ADD president_email VARCHAR(255) DEFAULT NULL, ADD president_phone VARCHAR(255) DEFAULT NULL, ADD contact_name VARCHAR(255) DEFAULT NULL, ADD contact_job VARCHAR(255) DEFAULT NULL, ADD contact_email VARCHAR(255) DEFAULT NULL, ADD contact_phone VARCHAR(255) DEFAULT NULL, ADD description LONGTEXT DEFAULT NULL');
$this->addSql('ALTER TABLE members_asso ADD CONSTRAINT FK_621CEF2AC06A9F55 FOREIGN KEY (img_id) REFERENCES image (id)');
$this->addSql('CREATE UNIQUE INDEX UNIQ_621CEF2AC06A9F55 ON members_asso (img_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE members_asso DROP FOREIGN KEY FK_621CEF2AC06A9F55');
$this->addSql('DROP INDEX UNIQ_621CEF2AC06A9F55 ON members_asso');
$this->addSql('ALTER TABLE members_asso DROP img_id, DROP membership_date, DROP payment, DROP payment_date, DROP address, DROP president_name, DROP president_email, DROP president_phone, DROP contact_name, DROP contact_job, DROP contact_email, DROP contact_phone, DROP description');
}
}