<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\Migrations\AbstractMigration;
use Doctrine\DBAL\Schema\Schema;
/**
* Auto-generated Migration: Please modify to your needs!
*/
class Version20210719151422 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->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');
$this->addSql('CREATE TABLE promo (id INT AUTO_INCREMENT NOT NULL, environnement VARCHAR(255) DEFAULT NULL, lieu VARCHAR(255) NOT NULL, slug_lieu VARCHAR(100) NOT NULL, nom VARCHAR(255) NOT NULL, region VARCHAR(255) DEFAULT NULL, slug_region VARCHAR(100) NOT NULL, departement VARCHAR(3) NOT NULL, ville VARCHAR(255) DEFAULT NULL, slug_ville VARCHAR(100) NOT NULL, typologie VARCHAR(255) NOT NULL, date_debut DATETIME NOT NULL, date_fin DATETIME NOT NULL, duree INT NOT NULL, id_lieu INT NOT NULL, id_lieu_hebergement INT NOT NULL, id_prestation INT NOT NULL, id_typologie INT NOT NULL, montant_taux_promo DOUBLE NOT NULL, montant_valeur_promo DOUBLE NOT NULL, id_prestation_hebergement INT NOT NULL, prix_brut DOUBLE NOT NULL, prix_total DOUBLE NOT NULL, status VARCHAR(255) NOT NULL, date_created DATETIME NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');
$this->addSql('DROP TABLE promos');
}
}