migrations/Version20210921124112.php line 1

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace DoctrineMigrations;
  4. use Doctrine\DBAL\Schema\Schema;
  5. use Doctrine\Migrations\AbstractMigration;
  6. /**
  7.  * Auto-generated Migration: Please modify to your needs!
  8.  */
  9. final class Version20210921124112 extends AbstractMigration
  10. {
  11.     public function getDescription(): string
  12.     {
  13.         return '';
  14.     }
  15.     public function up(Schema $schema): void
  16.     {
  17.         // this up() migration is auto-generated, please modify it to your needs
  18.         $this->addSql('CREATE TABLE graveyard (id INT AUTO_INCREMENT NOT NULL, number INT NOT NULL, last_name VARCHAR(255) DEFAULT NULL, first_name VARCHAR(255) DEFAULT NULL, spouse_last_name VARCHAR(255) DEFAULT NULL, spouse_first_name VARCHAR(255) DEFAULT NULL, death_year INT DEFAULT NULL, graveyard_name VARCHAR(255) DEFAULT NULL, epitaph VARCHAR(255) DEFAULT NULL, updated_date DATETIME NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  19.         $this->addSql('CREATE TABLE memorial_card (id INT AUTO_INCREMENT NOT NULL, number INT NOT NULL, first_name VARCHAR(255) DEFAULT NULL, last_name VARCHAR(255) DEFAULT NULL, birth_date DATE DEFAULT NULL, birth_place VARCHAR(255) DEFAULT NULL, spouse_last_name VARCHAR(255) DEFAULT NULL, spouse_first_name VARCHAR(255) DEFAULT NULL, wedding_date DATE DEFAULT NULL, wedding_place VARCHAR(255) DEFAULT NULL, death_date DATE DEFAULT NULL, death_place VARCHAR(255) DEFAULT NULL, parents_names VARCHAR(255) DEFAULT NULL, updated_date DATETIME NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  20.         $this->addSql('CREATE TABLE person (id INT AUTO_INCREMENT NOT NULL, number INT NOT NULL, last_name VARCHAR(255) DEFAULT NULL, usual_first_name VARCHAR(255) DEFAULT NULL, baptism_name VARCHAR(255) DEFAULT NULL, gender VARCHAR(255) DEFAULT NULL, birth_date DATE DEFAULT NULL, birth_place VARCHAR(255) DEFAULT NULL, baptism_date DATE DEFAULT NULL, baptism_place VARCHAR(255) DEFAULT NULL, baptism_notes LONGTEXT DEFAULT NULL, baptism_references LONGTEXT DEFAULT NULL, baptism_document TINYINT(1) NOT NULL, father_last_name VARCHAR(255) DEFAULT NULL, father_first_name VARCHAR(255) DEFAULT NULL, mother_last_name VARCHAR(255) DEFAULT NULL, mother_first_name VARCHAR(255) DEFAULT NULL, godfather_full_name VARCHAR(255) DEFAULT NULL, godmother_full_name VARCHAR(255) DEFAULT NULL, death_date DATE DEFAULT NULL, death_place VARCHAR(255) DEFAULT NULL, death_age INT DEFAULT NULL, death_notes LONGTEXT DEFAULT NULL, death_references LONGTEXT DEFAULT NULL, death_document TINYINT(1) NOT NULL, funeral_date DATE DEFAULT NULL, funeral_place VARCHAR(255) DEFAULT NULL, burial_place VARCHAR(255) DEFAULT NULL, baptism_verified TINYINT(1) NOT NULL, death_verified TINYINT(1) NOT NULL, archive_shl_references LONGTEXT DEFAULT NULL, updated_date DATETIME NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  21.     }
  22.     public function down(Schema $schema): void
  23.     {
  24.         // this down() migration is auto-generated, please modify it to your needs
  25.         $this->addSql('DROP TABLE graveyard');
  26.         $this->addSql('DROP TABLE memorial_card');
  27.         $this->addSql('DROP TABLE person');
  28.     }
  29. }