<?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 Version20220114192457 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 address (id INT AUTO_INCREMENT NOT NULL, address VARCHAR(255) DEFAULT NULL, postal_code VARCHAR(5) DEFAULT NULL, city VARCHAR(255) DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE amenageur (id INT AUTO_INCREMENT NOT NULL, society_id INT NOT NULL, ref VARCHAR(255) DEFAULT NULL, INDEX IDX_AD733C64E6389D24 (society_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE amenageur_mo (amenageur_id INT NOT NULL, mo_id INT NOT NULL, INDEX IDX_60DEE3949360FF18 (amenageur_id), INDEX IDX_60DEE3945DC5BF96 (mo_id), PRIMARY KEY(amenageur_id, mo_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE amenageur_instructeur (amenageur_id INT NOT NULL, instructeur_id INT NOT NULL, INDEX IDX_8980D9D49360FF18 (amenageur_id), INDEX IDX_8980D9D425FCA809 (instructeur_id), PRIMARY KEY(amenageur_id, instructeur_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE amenageur_constructeur (amenageur_id INT NOT NULL, constructeur_id INT NOT NULL, INDEX IDX_CFF3A1E99360FF18 (amenageur_id), INDEX IDX_CFF3A1E98815B605 (constructeur_id), PRIMARY KEY(amenageur_id, constructeur_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE amenageur_client (amenageur_id INT NOT NULL, client_id INT NOT NULL, INDEX IDX_334517319360FF18 (amenageur_id), INDEX IDX_3345173119EB6921 (client_id), PRIMARY KEY(amenageur_id, client_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE client (id INT AUTO_INCREMENT NOT NULL, uid_id INT NOT NULL, address_id INT NOT NULL, UNIQUE INDEX UNIQ_C7440455534B549B (uid_id), UNIQUE INDEX UNIQ_C7440455F5B7AF75 (address_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE constructeur (id INT AUTO_INCREMENT NOT NULL, society_id INT NOT NULL, INDEX IDX_71A7BD9EE6389D24 (society_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE instructeur (id INT AUTO_INCREMENT NOT NULL, society_id INT NOT NULL, INDEX IDX_D68CBEA6E6389D24 (society_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE instruction (id INT AUTO_INCREMENT NOT NULL, instructeur_id INT NOT NULL, constructeur_id INT DEFAULT NULL, pc_id INT DEFAULT NULL, visa_id INT DEFAULT NULL, ref VARCHAR(50) NOT NULL, state VARCHAR(255) NOT NULL, is_activ TINYINT(1) NOT NULL, price SMALLINT DEFAULT NULL, created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', started_at DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\', updated_at DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\', INDEX IDX_7BBAE15625FCA809 (instructeur_id), INDEX IDX_7BBAE1568815B605 (constructeur_id), INDEX IDX_7BBAE1568F63531D (pc_id), UNIQUE INDEX UNIQ_7BBAE15699C772A6 (visa_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE instruction_client (instruction_id INT NOT NULL, client_id INT NOT NULL, INDEX IDX_4523C05462A10F76 (instruction_id), INDEX IDX_4523C05419EB6921 (client_id), PRIMARY KEY(instruction_id, client_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE instruction_profil_mo (instruction_id INT NOT NULL, profil_mo_id INT NOT NULL, INDEX IDX_A96240F062A10F76 (instruction_id), INDEX IDX_A96240F013C964D2 (profil_mo_id), PRIMARY KEY(instruction_id, profil_mo_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE instruction_doc (id INT AUTO_INCREMENT NOT NULL, instruction_id INT NOT NULL, uid_id INT NOT NULL, originalname VARCHAR(255) NOT NULL, name VARCHAR(255) NOT NULL, ref VARCHAR(255) NOT NULL, type VARCHAR(5) NOT NULL, created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', is_valid TINYINT(1) NOT NULL, INDEX IDX_5491E0F162A10F76 (instruction_id), INDEX IDX_5491E0F1534B549B (uid_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE instruction_exam (id INT AUTO_INCREMENT NOT NULL, instruction_id INT NOT NULL, uid_id INT NOT NULL, start_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', end_at DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\', is_valid TINYINT(1) NOT NULL, reason VARCHAR(255) DEFAULT NULL, commentaire LONGTEXT DEFAULT NULL, is_granted TINYINT(1) NOT NULL, INDEX IDX_B80C111062A10F76 (instruction_id), INDEX IDX_B80C1110534B549B (uid_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE instruction_msg (id INT AUTO_INCREMENT NOT NULL, instruction_id INT NOT NULL, uid_id INT NOT NULL, content LONGTEXT NOT NULL, created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', INDEX IDX_BA5A423A62A10F76 (instruction_id), INDEX IDX_BA5A423A534B549B (uid_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE invoice (id INT AUTO_INCREMENT NOT NULL, visa_id INT NOT NULL, uid_id INT NOT NULL, pi VARCHAR(255) NOT NULL, amount SMALLINT NOT NULL, commission SMALLINT NOT NULL, dossier SMALLINT NOT NULL, ref VARCHAR(255) NOT NULL, created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', UNIQUE INDEX UNIQ_9065174499C772A6 (visa_id), INDEX IDX_90651744534B549B (uid_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE lot (id INT AUTO_INCREMENT NOT NULL, operation_id INT NOT NULL, address_id INT DEFAULT NULL, instruction_id INT DEFAULT NULL, number SMALLINT NOT NULL, secteur VARCHAR(5) DEFAULT NULL, zone VARCHAR(5) DEFAULT NULL, area SMALLINT DEFAULT NULL, created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', updated_at DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\', is_activ TINYINT(1) NOT NULL, UNIQUE INDEX UNIQ_B81291B96901F54 (number), INDEX IDX_B81291B44AC3583 (operation_id), UNIQUE INDEX UNIQ_B81291BF5B7AF75 (address_id), INDEX IDX_B81291B62A10F76 (instruction_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE mo (id INT AUTO_INCREMENT NOT NULL, society_id INT NOT NULL, INDEX IDX_4C877BDCE6389D24 (society_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE notification (id INT AUTO_INCREMENT NOT NULL, instruction_id INT NOT NULL, uid_id INT NOT NULL, amenageur_id INT NOT NULL, type VARCHAR(50) NOT NULL, created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', INDEX IDX_BF5476CA62A10F76 (instruction_id), INDEX IDX_BF5476CA534B549B (uid_id), INDEX IDX_BF5476CA9360FF18 (amenageur_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE operation (id INT AUTO_INCREMENT NOT NULL, amenageur_id INT NOT NULL, instructeur_id INT NOT NULL, ref VARCHAR(50) NOT NULL, name VARCHAR(255) NOT NULL, type VARCHAR(20) NOT NULL, lat DOUBLE PRECISION NOT NULL, lng DOUBLE PRECISION NOT NULL, created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', updated_at DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\', is_activ TINYINT(1) NOT NULL, INDEX IDX_1981A66D9360FF18 (amenageur_id), INDEX IDX_1981A66D25FCA809 (instructeur_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE operation_doc (id INT AUTO_INCREMENT NOT NULL, operation_id INT NOT NULL, uid_id INT NOT NULL, type VARCHAR(5) NOT NULL, originalname VARCHAR(255) NOT NULL, name VARCHAR(255) NOT NULL, ref VARCHAR(255) NOT NULL, created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', INDEX IDX_9960EB5844AC3583 (operation_id), INDEX IDX_9960EB58534B549B (uid_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE profil_amenageur (id INT AUTO_INCREMENT NOT NULL, uid_id INT NOT NULL, amenageur_id INT NOT NULL, UNIQUE INDEX UNIQ_5080A44534B549B (uid_id), INDEX IDX_5080A449360FF18 (amenageur_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE profil_constructeur (id INT AUTO_INCREMENT NOT NULL, uid_id INT NOT NULL, constructeur_id INT NOT NULL, UNIQUE INDEX UNIQ_721C217534B549B (uid_id), INDEX IDX_721C2178815B605 (constructeur_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE profil_instructeur (id INT AUTO_INCREMENT NOT NULL, uid_id INT NOT NULL, instructeur_id INT NOT NULL, UNIQUE INDEX UNIQ_8CB2A7E6534B549B (uid_id), INDEX IDX_8CB2A7E625FCA809 (instructeur_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE profil_mo (id INT AUTO_INCREMENT NOT NULL, uid_id INT NOT NULL, mo_id INT NOT NULL, UNIQUE INDEX UNIQ_D4E0CCF4534B549B (uid_id), INDEX IDX_D4E0CCF45DC5BF96 (mo_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE society (id INT AUTO_INCREMENT NOT NULL, address_id INT DEFAULT NULL, siren VARCHAR(14) NOT NULL, denomination VARCHAR(255) NOT NULL, price SMALLINT DEFAULT NULL, UNIQUE INDEX UNIQ_D6461F2F5B7AF75 (address_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE uid (id INT AUTO_INCREMENT NOT NULL, email VARCHAR(180) NOT NULL, roles LONGTEXT NOT NULL COMMENT \'(DC2Type:json)\', password VARCHAR(255) NOT NULL, firstname VARCHAR(255) NOT NULL, lastname VARCHAR(255) NOT NULL, phone VARCHAR(20) DEFAULT NULL, is_activ TINYINT(1) NOT NULL, created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', updated_at DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\', connected_at DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\', UNIQUE INDEX UNIQ_539B0606E7927C74 (email), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE visa (id INT AUTO_INCREMENT NOT NULL, instruction_id INT NOT NULL, ref VARCHAR(255) NOT NULL, is_granted TINYINT(1) NOT NULL, state TINYINT(1) NOT NULL, price SMALLINT NOT NULL, created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', INDEX IDX_16B1AB0862A10F76 (instruction_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE amenageur ADD CONSTRAINT FK_AD733C64E6389D24 FOREIGN KEY (society_id) REFERENCES society (id)');
$this->addSql('ALTER TABLE amenageur_mo ADD CONSTRAINT FK_60DEE3949360FF18 FOREIGN KEY (amenageur_id) REFERENCES amenageur (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE amenageur_mo ADD CONSTRAINT FK_60DEE3945DC5BF96 FOREIGN KEY (mo_id) REFERENCES mo (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE amenageur_instructeur ADD CONSTRAINT FK_8980D9D49360FF18 FOREIGN KEY (amenageur_id) REFERENCES amenageur (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE amenageur_instructeur ADD CONSTRAINT FK_8980D9D425FCA809 FOREIGN KEY (instructeur_id) REFERENCES instructeur (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE amenageur_constructeur ADD CONSTRAINT FK_CFF3A1E99360FF18 FOREIGN KEY (amenageur_id) REFERENCES amenageur (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE amenageur_constructeur ADD CONSTRAINT FK_CFF3A1E98815B605 FOREIGN KEY (constructeur_id) REFERENCES constructeur (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE amenageur_client ADD CONSTRAINT FK_334517319360FF18 FOREIGN KEY (amenageur_id) REFERENCES amenageur (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE amenageur_client ADD CONSTRAINT FK_3345173119EB6921 FOREIGN KEY (client_id) REFERENCES client (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE client ADD CONSTRAINT FK_C7440455534B549B FOREIGN KEY (uid_id) REFERENCES uid (id)');
$this->addSql('ALTER TABLE client ADD CONSTRAINT FK_C7440455F5B7AF75 FOREIGN KEY (address_id) REFERENCES address (id)');
$this->addSql('ALTER TABLE constructeur ADD CONSTRAINT FK_71A7BD9EE6389D24 FOREIGN KEY (society_id) REFERENCES society (id)');
$this->addSql('ALTER TABLE instructeur ADD CONSTRAINT FK_D68CBEA6E6389D24 FOREIGN KEY (society_id) REFERENCES society (id)');
$this->addSql('ALTER TABLE instruction ADD CONSTRAINT FK_7BBAE15625FCA809 FOREIGN KEY (instructeur_id) REFERENCES profil_instructeur (id)');
$this->addSql('ALTER TABLE instruction ADD CONSTRAINT FK_7BBAE1568815B605 FOREIGN KEY (constructeur_id) REFERENCES profil_constructeur (id)');
$this->addSql('ALTER TABLE instruction ADD CONSTRAINT FK_7BBAE1568F63531D FOREIGN KEY (pc_id) REFERENCES instruction (id)');
$this->addSql('ALTER TABLE instruction ADD CONSTRAINT FK_7BBAE15699C772A6 FOREIGN KEY (visa_id) REFERENCES visa (id)');
$this->addSql('ALTER TABLE instruction_client ADD CONSTRAINT FK_4523C05462A10F76 FOREIGN KEY (instruction_id) REFERENCES instruction (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE instruction_client ADD CONSTRAINT FK_4523C05419EB6921 FOREIGN KEY (client_id) REFERENCES client (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE instruction_profil_mo ADD CONSTRAINT FK_A96240F062A10F76 FOREIGN KEY (instruction_id) REFERENCES instruction (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE instruction_profil_mo ADD CONSTRAINT FK_A96240F013C964D2 FOREIGN KEY (profil_mo_id) REFERENCES profil_mo (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE instruction_doc ADD CONSTRAINT FK_5491E0F162A10F76 FOREIGN KEY (instruction_id) REFERENCES instruction (id)');
$this->addSql('ALTER TABLE instruction_doc ADD CONSTRAINT FK_5491E0F1534B549B FOREIGN KEY (uid_id) REFERENCES uid (id)');
$this->addSql('ALTER TABLE instruction_exam ADD CONSTRAINT FK_B80C111062A10F76 FOREIGN KEY (instruction_id) REFERENCES instruction (id)');
$this->addSql('ALTER TABLE instruction_exam ADD CONSTRAINT FK_B80C1110534B549B FOREIGN KEY (uid_id) REFERENCES uid (id)');
$this->addSql('ALTER TABLE instruction_msg ADD CONSTRAINT FK_BA5A423A62A10F76 FOREIGN KEY (instruction_id) REFERENCES instruction (id)');
$this->addSql('ALTER TABLE instruction_msg ADD CONSTRAINT FK_BA5A423A534B549B FOREIGN KEY (uid_id) REFERENCES uid (id)');
$this->addSql('ALTER TABLE invoice ADD CONSTRAINT FK_9065174499C772A6 FOREIGN KEY (visa_id) REFERENCES visa (id)');
$this->addSql('ALTER TABLE invoice ADD CONSTRAINT FK_90651744534B549B FOREIGN KEY (uid_id) REFERENCES uid (id)');
$this->addSql('ALTER TABLE lot ADD CONSTRAINT FK_B81291B44AC3583 FOREIGN KEY (operation_id) REFERENCES operation (id)');
$this->addSql('ALTER TABLE lot ADD CONSTRAINT FK_B81291BF5B7AF75 FOREIGN KEY (address_id) REFERENCES address (id)');
$this->addSql('ALTER TABLE lot ADD CONSTRAINT FK_B81291B62A10F76 FOREIGN KEY (instruction_id) REFERENCES instruction (id)');
$this->addSql('ALTER TABLE mo ADD CONSTRAINT FK_4C877BDCE6389D24 FOREIGN KEY (society_id) REFERENCES society (id)');
$this->addSql('ALTER TABLE notification ADD CONSTRAINT FK_BF5476CA62A10F76 FOREIGN KEY (instruction_id) REFERENCES instruction (id)');
$this->addSql('ALTER TABLE notification ADD CONSTRAINT FK_BF5476CA534B549B FOREIGN KEY (uid_id) REFERENCES uid (id)');
$this->addSql('ALTER TABLE notification ADD CONSTRAINT FK_BF5476CA9360FF18 FOREIGN KEY (amenageur_id) REFERENCES amenageur (id)');
$this->addSql('ALTER TABLE operation ADD CONSTRAINT FK_1981A66D9360FF18 FOREIGN KEY (amenageur_id) REFERENCES amenageur (id)');
$this->addSql('ALTER TABLE operation ADD CONSTRAINT FK_1981A66D25FCA809 FOREIGN KEY (instructeur_id) REFERENCES instructeur (id)');
$this->addSql('ALTER TABLE operation_doc ADD CONSTRAINT FK_9960EB5844AC3583 FOREIGN KEY (operation_id) REFERENCES operation (id)');
$this->addSql('ALTER TABLE operation_doc ADD CONSTRAINT FK_9960EB58534B549B FOREIGN KEY (uid_id) REFERENCES uid (id)');
$this->addSql('ALTER TABLE profil_amenageur ADD CONSTRAINT FK_5080A44534B549B FOREIGN KEY (uid_id) REFERENCES uid (id)');
$this->addSql('ALTER TABLE profil_amenageur ADD CONSTRAINT FK_5080A449360FF18 FOREIGN KEY (amenageur_id) REFERENCES amenageur (id)');
$this->addSql('ALTER TABLE profil_constructeur ADD CONSTRAINT FK_721C217534B549B FOREIGN KEY (uid_id) REFERENCES uid (id)');
$this->addSql('ALTER TABLE profil_constructeur ADD CONSTRAINT FK_721C2178815B605 FOREIGN KEY (constructeur_id) REFERENCES constructeur (id)');
$this->addSql('ALTER TABLE profil_instructeur ADD CONSTRAINT FK_8CB2A7E6534B549B FOREIGN KEY (uid_id) REFERENCES uid (id)');
$this->addSql('ALTER TABLE profil_instructeur ADD CONSTRAINT FK_8CB2A7E625FCA809 FOREIGN KEY (instructeur_id) REFERENCES instructeur (id)');
$this->addSql('ALTER TABLE profil_mo ADD CONSTRAINT FK_D4E0CCF4534B549B FOREIGN KEY (uid_id) REFERENCES uid (id)');
$this->addSql('ALTER TABLE profil_mo ADD CONSTRAINT FK_D4E0CCF45DC5BF96 FOREIGN KEY (mo_id) REFERENCES mo (id)');
$this->addSql('ALTER TABLE society ADD CONSTRAINT FK_D6461F2F5B7AF75 FOREIGN KEY (address_id) REFERENCES address (id)');
$this->addSql('ALTER TABLE visa ADD CONSTRAINT FK_16B1AB0862A10F76 FOREIGN KEY (instruction_id) REFERENCES instruction (id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE client DROP FOREIGN KEY FK_C7440455F5B7AF75');
$this->addSql('ALTER TABLE lot DROP FOREIGN KEY FK_B81291BF5B7AF75');
$this->addSql('ALTER TABLE society DROP FOREIGN KEY FK_D6461F2F5B7AF75');
$this->addSql('ALTER TABLE amenageur_mo DROP FOREIGN KEY FK_60DEE3949360FF18');
$this->addSql('ALTER TABLE amenageur_instructeur DROP FOREIGN KEY FK_8980D9D49360FF18');
$this->addSql('ALTER TABLE amenageur_constructeur DROP FOREIGN KEY FK_CFF3A1E99360FF18');
$this->addSql('ALTER TABLE amenageur_client DROP FOREIGN KEY FK_334517319360FF18');
$this->addSql('ALTER TABLE notification DROP FOREIGN KEY FK_BF5476CA9360FF18');
$this->addSql('ALTER TABLE operation DROP FOREIGN KEY FK_1981A66D9360FF18');
$this->addSql('ALTER TABLE profil_amenageur DROP FOREIGN KEY FK_5080A449360FF18');
$this->addSql('ALTER TABLE amenageur_client DROP FOREIGN KEY FK_3345173119EB6921');
$this->addSql('ALTER TABLE instruction_client DROP FOREIGN KEY FK_4523C05419EB6921');
$this->addSql('ALTER TABLE amenageur_constructeur DROP FOREIGN KEY FK_CFF3A1E98815B605');
$this->addSql('ALTER TABLE profil_constructeur DROP FOREIGN KEY FK_721C2178815B605');
$this->addSql('ALTER TABLE amenageur_instructeur DROP FOREIGN KEY FK_8980D9D425FCA809');
$this->addSql('ALTER TABLE operation DROP FOREIGN KEY FK_1981A66D25FCA809');
$this->addSql('ALTER TABLE profil_instructeur DROP FOREIGN KEY FK_8CB2A7E625FCA809');
$this->addSql('ALTER TABLE instruction DROP FOREIGN KEY FK_7BBAE1568F63531D');
$this->addSql('ALTER TABLE instruction_client DROP FOREIGN KEY FK_4523C05462A10F76');
$this->addSql('ALTER TABLE instruction_profil_mo DROP FOREIGN KEY FK_A96240F062A10F76');
$this->addSql('ALTER TABLE instruction_doc DROP FOREIGN KEY FK_5491E0F162A10F76');
$this->addSql('ALTER TABLE instruction_exam DROP FOREIGN KEY FK_B80C111062A10F76');
$this->addSql('ALTER TABLE instruction_msg DROP FOREIGN KEY FK_BA5A423A62A10F76');
$this->addSql('ALTER TABLE lot DROP FOREIGN KEY FK_B81291B62A10F76');
$this->addSql('ALTER TABLE notification DROP FOREIGN KEY FK_BF5476CA62A10F76');
$this->addSql('ALTER TABLE visa DROP FOREIGN KEY FK_16B1AB0862A10F76');
$this->addSql('ALTER TABLE amenageur_mo DROP FOREIGN KEY FK_60DEE3945DC5BF96');
$this->addSql('ALTER TABLE profil_mo DROP FOREIGN KEY FK_D4E0CCF45DC5BF96');
$this->addSql('ALTER TABLE lot DROP FOREIGN KEY FK_B81291B44AC3583');
$this->addSql('ALTER TABLE operation_doc DROP FOREIGN KEY FK_9960EB5844AC3583');
$this->addSql('ALTER TABLE instruction DROP FOREIGN KEY FK_7BBAE1568815B605');
$this->addSql('ALTER TABLE instruction DROP FOREIGN KEY FK_7BBAE15625FCA809');
$this->addSql('ALTER TABLE instruction_profil_mo DROP FOREIGN KEY FK_A96240F013C964D2');
$this->addSql('ALTER TABLE amenageur DROP FOREIGN KEY FK_AD733C64E6389D24');
$this->addSql('ALTER TABLE constructeur DROP FOREIGN KEY FK_71A7BD9EE6389D24');
$this->addSql('ALTER TABLE instructeur DROP FOREIGN KEY FK_D68CBEA6E6389D24');
$this->addSql('ALTER TABLE mo DROP FOREIGN KEY FK_4C877BDCE6389D24');
$this->addSql('ALTER TABLE client DROP FOREIGN KEY FK_C7440455534B549B');
$this->addSql('ALTER TABLE instruction_doc DROP FOREIGN KEY FK_5491E0F1534B549B');
$this->addSql('ALTER TABLE instruction_exam DROP FOREIGN KEY FK_B80C1110534B549B');
$this->addSql('ALTER TABLE instruction_msg DROP FOREIGN KEY FK_BA5A423A534B549B');
$this->addSql('ALTER TABLE invoice DROP FOREIGN KEY FK_90651744534B549B');
$this->addSql('ALTER TABLE notification DROP FOREIGN KEY FK_BF5476CA534B549B');
$this->addSql('ALTER TABLE operation_doc DROP FOREIGN KEY FK_9960EB58534B549B');
$this->addSql('ALTER TABLE profil_amenageur DROP FOREIGN KEY FK_5080A44534B549B');
$this->addSql('ALTER TABLE profil_constructeur DROP FOREIGN KEY FK_721C217534B549B');
$this->addSql('ALTER TABLE profil_instructeur DROP FOREIGN KEY FK_8CB2A7E6534B549B');
$this->addSql('ALTER TABLE profil_mo DROP FOREIGN KEY FK_D4E0CCF4534B549B');
$this->addSql('ALTER TABLE instruction DROP FOREIGN KEY FK_7BBAE15699C772A6');
$this->addSql('ALTER TABLE invoice DROP FOREIGN KEY FK_9065174499C772A6');
$this->addSql('DROP TABLE address');
$this->addSql('DROP TABLE amenageur');
$this->addSql('DROP TABLE amenageur_mo');
$this->addSql('DROP TABLE amenageur_instructeur');
$this->addSql('DROP TABLE amenageur_constructeur');
$this->addSql('DROP TABLE amenageur_client');
$this->addSql('DROP TABLE client');
$this->addSql('DROP TABLE constructeur');
$this->addSql('DROP TABLE instructeur');
$this->addSql('DROP TABLE instruction');
$this->addSql('DROP TABLE instruction_client');
$this->addSql('DROP TABLE instruction_profil_mo');
$this->addSql('DROP TABLE instruction_doc');
$this->addSql('DROP TABLE instruction_exam');
$this->addSql('DROP TABLE instruction_msg');
$this->addSql('DROP TABLE invoice');
$this->addSql('DROP TABLE lot');
$this->addSql('DROP TABLE mo');
$this->addSql('DROP TABLE notification');
$this->addSql('DROP TABLE operation');
$this->addSql('DROP TABLE operation_doc');
$this->addSql('DROP TABLE profil_amenageur');
$this->addSql('DROP TABLE profil_constructeur');
$this->addSql('DROP TABLE profil_instructeur');
$this->addSql('DROP TABLE profil_mo');
$this->addSql('DROP TABLE society');
$this->addSql('DROP TABLE uid');
$this->addSql('DROP TABLE visa');
}
}