<?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 Version20220508164743 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 parasol (id INT AUTO_INCREMENT NOT NULL, rayon_id INT DEFAULT NULL, num_parasol INT NOT NULL, etat INT NOT NULL, nbr_pax INT DEFAULT NULL, type_client INT DEFAULT NULL, date_du DATETIME DEFAULT NULL, date_au DATETIME DEFAULT NULL, nom_client VARCHAR(255) DEFAULT NULL, commentaire VARCHAR(255) DEFAULT NULL, created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', INDEX IDX_42F27C71D3202E52 (rayon_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE parasol ADD CONSTRAINT FK_42F27C71D3202E52 FOREIGN KEY (rayon_id) REFERENCES rayon (id)');
$this->addSql('ALTER TABLE user ADD username VARCHAR(255) NOT NULL');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('DROP TABLE parasol');
$this->addSql('ALTER TABLE `user` DROP username');
}
}