<?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 Version20230822101940 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 planning (id INT AUTO_INCREMENT NOT NULL, dossier_id INT DEFAULT NULL, dateprevisite DATETIME DEFAULT NULL, intervenant VARCHAR(255) DEFAULT NULL, datedevis DATETIME DEFAULT NULL, sourcedevis VARCHAR(255) DEFAULT NULL, dateengagement DATETIME DEFAULT NULL, datetravaux DATETIME DEFAULT NULL, poseur VARCHAR(255) DEFAULT NULL, consigne LONGTEXT DEFAULT NULL, datefacture DATETIME DEFAULT NULL, sourcefacture VARCHAR(255) DEFAULT NULL, numerofacture VARCHAR(255) DEFAULT NULL, INDEX IDX_D499BFF6611C0C56 (dossier_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE planning ADD CONSTRAINT FK_D499BFF6611C0C56 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 planning DROP FOREIGN KEY FK_D499BFF6611C0C56');
$this->addSql('DROP TABLE planning');
}
}