<?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 Version20230906155107 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 appelqualite (id INT AUTO_INCREMENT NOT NULL, dossier_id INT DEFAULT NULL, client VARCHAR(255) DEFAULT NULL, adresse VARCHAR(255) DEFAULT NULL, installation VARCHAR(255) DEFAULT NULL, terminer VARCHAR(255) DEFAULT NULL, qualite VARCHAR(255) DEFAULT NULL, complet VARCHAR(255) DEFAULT NULL, specifique VARCHAR(255) DEFAULT NULL, commentaire LONGTEXT DEFAULT NULL, INDEX IDX_A426C85D611C0C56 (dossier_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE commentaire_factureaaf (id INT AUTO_INCREMENT NOT NULL, facture_id INT DEFAULT NULL, commentaire LONGTEXT DEFAULT NULL, date DATETIME DEFAULT NULL, INDEX IDX_CF3DFF367F2DEE08 (facture_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE facture_aaf (id INT AUTO_INCREMENT NOT NULL, dossier_id INT DEFAULT NULL, numero VARCHAR(255) DEFAULT NULL, date DATETIME DEFAULT NULL, status VARCHAR(255) DEFAULT NULL, file LONGTEXT DEFAULT NULL COMMENT \'(DC2Type:array)\', INDEX IDX_B132BC1611C0C56 (dossier_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE appelqualite ADD CONSTRAINT FK_A426C85D611C0C56 FOREIGN KEY (dossier_id) REFERENCES depot_dossier (id)');
$this->addSql('ALTER TABLE commentaire_factureaaf ADD CONSTRAINT FK_CF3DFF367F2DEE08 FOREIGN KEY (facture_id) REFERENCES facture_aaf (id)');
$this->addSql('ALTER TABLE facture_aaf ADD CONSTRAINT FK_B132BC1611C0C56 FOREIGN KEY (dossier_id) REFERENCES depot_dossier (id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE appelqualite DROP FOREIGN KEY FK_A426C85D611C0C56');
$this->addSql('ALTER TABLE commentaire_factureaaf DROP FOREIGN KEY FK_CF3DFF367F2DEE08');
$this->addSql('ALTER TABLE facture_aaf DROP FOREIGN KEY FK_B132BC1611C0C56');
$this->addSql('DROP TABLE appelqualite');
$this->addSql('DROP TABLE commentaire_factureaaf');
$this->addSql('DROP TABLE facture_aaf');
}
}