migrations/Version20220204075921.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 Version20220204075921 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 inquiry_recruit (id INT AUTO_INCREMENT NOT NULL, birthday DATE DEFAULT NULL, gender VARCHAR(4) DEFAULT NULL, email VARCHAR(255) NOT NULL, ip VARCHAR(32) NOT NULL, token VARCHAR(80) DEFAULT NULL, send_at DATETIME DEFAULT NULL, name VARCHAR(32) NOT NULL, message LONGTEXT DEFAULT NULL, kana VARCHAR(48) DEFAULT NULL, phone VARCHAR(24) DEFAULT NULL, postal1 VARCHAR(3) DEFAULT NULL, postal2 VARCHAR(4) DEFAULT NULL, addr_pref VARCHAR(8) DEFAULT NULL, addr_city VARCHAR(24) DEFAULT NULL, addr_town VARCHAR(48) DEFAULT NULL, addr_build VARCHAR(48) DEFAULT NULL, created_at DATETIME DEFAULT NULL, updated_at DATETIME DEFAULT NULL, deleted_at DATETIME DEFAULT NULL, UNIQUE INDEX UNIQ_FB7644CA5F37A13B (token), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  19.         $this->addSql('CREATE TABLE inquiry_recruit_history (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(64) DEFAULT NULL, content LONGTEXT DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  20.         $this->addSql('CREATE TABLE inquiry_recruit_qualification (id INT AUTO_INCREMENT NOT NULL, year INT DEFAULT NULL, month INT DEFAULT NULL, name VARCHAR(255) DEFAULT 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 inquiry_recruit');
  26.         $this->addSql('DROP TABLE inquiry_recruit_history');
  27.         $this->addSql('DROP TABLE inquiry_recruit_qualification');
  28.     }
  29. }