migrations/Version20220311103716.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 Version20220311103716 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 demand (id BINARY(16) NOT NULL COMMENT \'(DC2Type:uuid)\', place VARCHAR(255) NOT NULL, floor_area DOUBLE PRECISION NOT NULL, kind ENUM(\'SALE\', \'LEASE\'), property_type ENUM(\'HOUSE\', \'FLAT\'), rating ENUM(\'BAD\', \'NOTHING_MUCH\', \'GOOD\', \'VERY_GOOD\', \'NEW\', \'EXCELLENT\'), equipment TINYINT(1) NOT NULL, ownership ENUM(\'PRIVATE\', \'COOPERATIVE\', \'COUNCIL\', \'OTHER\'), local_type ENUM(\'1+KK\', \'1+1\', \'2+KK\', \'2+1\', \'3+KK\', \'3+1\', \'4+KK\', \'4+1\'), construction ENUM(\'BRICK\', \'PANEL\', \'WOOD\', \'STONE\', \'MONTAGE\', \'MIXED\', \'LOW_ENERGY\', \'OTHER\'), floor INT DEFAULT NULL, total_floors INT DEFAULT NULL, lift TINYINT(1) NOT NULL, name VARCHAR(255) NOT NULL, email VARCHAR(255) NOT NULL, phone VARCHAR(255) NOT NULL, message LONGTEXT DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  19.         $this->addSql('CREATE TABLE vehicle (id BINARY(16) NOT NULL COMMENT \'(DC2Type:uuid)\', number_of_wheels VARCHAR(255) NOT NULL, engine_type VARCHAR(20) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  20.         $this->addSql('DROP TABLE request');
  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('CREATE TABLE request (id BINARY(16) NOT NULL COMMENT \'(DC2Type:uuid)\', name VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, phone VARCHAR(20) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, email VARCHAR(100) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, message LONGTEXT CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
  26.         $this->addSql('DROP TABLE demand');
  27.         $this->addSql('DROP TABLE vehicle');
  28.     }
  29. }