<?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 Version20220311103716 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 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');
$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');
$this->addSql('DROP TABLE request');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$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 = \'\' ');
$this->addSql('DROP TABLE demand');
$this->addSql('DROP TABLE vehicle');
}
}