<?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 Version20211011182054 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 spouse (id INT AUTO_INCREMENT NOT NULL, graveyard_id INT NOT NULL, number INT NOT NULL, spouse_last_name VARCHAR(255) DEFAULT NULL, spouse_first_name VARCHAR(255) DEFAULT NULL, INDEX IDX_CD13CC0FB0C855CA (graveyard_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE spouse ADD CONSTRAINT FK_CD13CC0FB0C855CA FOREIGN KEY (graveyard_id) REFERENCES graveyard (id)');
$this->addSql('ALTER TABLE eckinox_app_users CHANGE facebook_id facebook_id VARCHAR(255) NOT NULL');
$this->addSql('CREATE UNIQUE INDEX UNIQ_661897509BE8FD98 ON eckinox_app_users (facebook_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('DROP TABLE spouse');
$this->addSql('DROP INDEX UNIQ_661897509BE8FD98 ON eckinox_app_users');
$this->addSql('ALTER TABLE eckinox_app_users CHANGE facebook_id facebook_id VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`');
}
}