<?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 Version20210721135353 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('DROP TABLE projet_etiquettes');
$this->addSql('DROP TABLE type_facturation');
$this->addSql('ALTER TABLE demande_client_commentaire CHANGE date date DATETIME DEFAULT NULL');
$this->addSql('ALTER TABLE devis ADD date_accept DATETIME DEFAULT NULL');
$this->addSql('ALTER TABLE projet_commentaires CHANGE date date DATETIME DEFAULT NULL');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('CREATE TABLE projet_etiquettes (id INT AUTO_INCREMENT NOT NULL, projet INT DEFAULT NULL, name VARCHAR(255) CHARACTER SET utf8 NOT NULL COLLATE `utf8_unicode_ci`, color VARCHAR(255) CHARACTER SET utf8 NOT NULL COLLATE `utf8_unicode_ci`, INDEX IDX_113391D250159CA9 (projet), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('CREATE TABLE type_facturation (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(20) CHARACTER SET utf8 DEFAULT NULL COLLATE `utf8_unicode_ci`, taux_horaire INT DEFAULT NULL, `default` TINYINT(1) DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('ALTER TABLE projet_etiquettes ADD CONSTRAINT FK_113391D250159CA9 FOREIGN KEY (projet) REFERENCES projets (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE demande_client_commentaire CHANGE date date DATETIME DEFAULT NULL');
$this->addSql('ALTER TABLE devis DROP date_accept');
$this->addSql('ALTER TABLE projet_commentaires CHANGE date date DATETIME DEFAULT NULL');
}
}