<?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 Version20240605135645 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 rookie_day_company (id INT AUTO_INCREMENT NOT NULL, address_id INT DEFAULT NULL, profile_picture_id INT DEFAULT NULL, rookie_day_district_id INT DEFAULT NULL, name VARCHAR(150) NOT NULL, url VARCHAR(300) NOT NULL, created_at DATETIME NOT NULL, UNIQUE INDEX UNIQ_96E44985F5B7AF75 (address_id), UNIQUE INDEX UNIQ_96E44985292E8AE2 (profile_picture_id), INDEX IDX_96E449857FA5CF3F (rookie_day_district_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE rookie_day_company_job_mapping (rookie_day_company_id INT NOT NULL, job_id INT NOT NULL, INDEX IDX_5F5380CA763CEE0 (rookie_day_company_id), INDEX IDX_5F5380CABE04EA9 (job_id), PRIMARY KEY(rookie_day_company_id, job_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE rookie_day_contact (id INT AUTO_INCREMENT NOT NULL, rookie_day_company_id INT DEFAULT NULL, firstname VARCHAR(191) NOT NULL, lastname VARCHAR(191) NOT NULL, email VARCHAR(191) NOT NULL, phone VARCHAR(191) NOT NULL, created_at DATETIME NOT NULL, INDEX IDX_9539A6F2763CEE0 (rookie_day_company_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE rookie_day_contact_date_mapping (rookie_day_contact_id INT NOT NULL, rookie_day_date_id INT NOT NULL, INDEX IDX_B3F682CA7759F17C (rookie_day_contact_id), INDEX IDX_B3F682CA61CC76A1 (rookie_day_date_id), PRIMARY KEY(rookie_day_contact_id, rookie_day_date_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE rookie_day_date (id INT AUTO_INCREMENT NOT NULL, rookie_day_setup_id INT DEFAULT NULL, event_at DATETIME NOT NULL, created_at DATETIME NOT NULL, INDEX IDX_66B7823B6A5C660 (rookie_day_setup_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE rookie_day_district (id INT AUTO_INCREMENT NOT NULL, district_name VARCHAR(100) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE rookie_day_school (id INT AUTO_INCREMENT NOT NULL, rookie_day_district_id INT DEFAULT NULL, school_name VARCHAR(150) NOT NULL, created_at DATETIME NOT NULL, INDEX IDX_7484CC527FA5CF3F (rookie_day_district_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE rookie_day_school_date_mapping (id INT AUTO_INCREMENT NOT NULL, rookie_day_school_id INT DEFAULT NULL, rookie_day_date_id INT DEFAULT NULL, created_at DATETIME NOT NULL, INDEX IDX_2EB83D8A84E3E0E1 (rookie_day_school_id), INDEX IDX_2EB83D8A61CC76A1 (rookie_day_date_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE rookie_day_setup (id INT AUTO_INCREMENT NOT NULL, rookie_day_district_id INT DEFAULT NULL, register_scholar_start_at DATETIME NOT NULL, register_scholar_end_at DATETIME NOT NULL, register_company_start_at DATETIME NOT NULL, register_company_end_at DATETIME NOT NULL, created_at DATETIME NOT NULL, INDEX IDX_37064A2F7FA5CF3F (rookie_day_district_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE rookie_day_student (id INT AUTO_INCREMENT NOT NULL, rookie_day_school_id INT DEFAULT NULL, firstname VARCHAR(191) NOT NULL, lastname VARCHAR(191) NOT NULL, email VARCHAR(191) NOT NULL, birth_day DATETIME DEFAULT NULL, note TEXT DEFAULT NULL, created_at DATETIME NOT NULL, INDEX IDX_6E78EFF984E3E0E1 (rookie_day_school_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE rookie_day_student_company (id INT AUTO_INCREMENT NOT NULL, rookie_day_student_id INT DEFAULT NULL, rookie_day_company_id INT DEFAULT NULL, job_id INT DEFAULT NULL, position INT NOT NULL, created_at DATETIME NOT NULL, INDEX IDX_EF48772D5B6C9B2C (rookie_day_student_id), INDEX IDX_EF48772D763CEE0 (rookie_day_company_id), INDEX IDX_EF48772DBE04EA9 (job_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE rookie_day_company ADD CONSTRAINT FK_96E44985F5B7AF75 FOREIGN KEY (address_id) REFERENCES address (id)');
$this->addSql('ALTER TABLE rookie_day_company ADD CONSTRAINT FK_96E44985292E8AE2 FOREIGN KEY (profile_picture_id) REFERENCES media__media (id)');
$this->addSql('ALTER TABLE rookie_day_company ADD CONSTRAINT FK_96E449857FA5CF3F FOREIGN KEY (rookie_day_district_id) REFERENCES rookie_day_district (id)');
$this->addSql('ALTER TABLE rookie_day_company_job_mapping ADD CONSTRAINT FK_5F5380CA763CEE0 FOREIGN KEY (rookie_day_company_id) REFERENCES rookie_day_company (id)');
$this->addSql('ALTER TABLE rookie_day_company_job_mapping ADD CONSTRAINT FK_5F5380CABE04EA9 FOREIGN KEY (job_id) REFERENCES job (id)');
$this->addSql('ALTER TABLE rookie_day_contact ADD CONSTRAINT FK_9539A6F2763CEE0 FOREIGN KEY (rookie_day_company_id) REFERENCES rookie_day_company (id)');
$this->addSql('ALTER TABLE rookie_day_contact_date_mapping ADD CONSTRAINT FK_B3F682CA7759F17C FOREIGN KEY (rookie_day_contact_id) REFERENCES rookie_day_contact (id)');
$this->addSql('ALTER TABLE rookie_day_contact_date_mapping ADD CONSTRAINT FK_B3F682CA61CC76A1 FOREIGN KEY (rookie_day_date_id) REFERENCES rookie_day_date (id)');
$this->addSql('ALTER TABLE rookie_day_date ADD CONSTRAINT FK_66B7823B6A5C660 FOREIGN KEY (rookie_day_setup_id) REFERENCES rookie_day_setup (id)');
$this->addSql('ALTER TABLE rookie_day_school ADD CONSTRAINT FK_7484CC527FA5CF3F FOREIGN KEY (rookie_day_district_id) REFERENCES rookie_day_district (id)');
$this->addSql('ALTER TABLE rookie_day_school_date_mapping ADD CONSTRAINT FK_2EB83D8A84E3E0E1 FOREIGN KEY (rookie_day_school_id) REFERENCES rookie_day_school (id)');
$this->addSql('ALTER TABLE rookie_day_school_date_mapping ADD CONSTRAINT FK_2EB83D8A61CC76A1 FOREIGN KEY (rookie_day_date_id) REFERENCES rookie_day_date (id)');
$this->addSql('ALTER TABLE rookie_day_setup ADD CONSTRAINT FK_37064A2F7FA5CF3F FOREIGN KEY (rookie_day_district_id) REFERENCES rookie_day_district (id)');
$this->addSql('ALTER TABLE rookie_day_student ADD CONSTRAINT FK_6E78EFF984E3E0E1 FOREIGN KEY (rookie_day_school_id) REFERENCES rookie_day_school (id)');
$this->addSql('ALTER TABLE rookie_day_student_company ADD CONSTRAINT FK_EF48772D5B6C9B2C FOREIGN KEY (rookie_day_student_id) REFERENCES rookie_day_student (id)');
$this->addSql('ALTER TABLE rookie_day_student_company ADD CONSTRAINT FK_EF48772D763CEE0 FOREIGN KEY (rookie_day_company_id) REFERENCES rookie_day_company (id)');
$this->addSql('ALTER TABLE rookie_day_student_company ADD CONSTRAINT FK_EF48772DBE04EA9 FOREIGN KEY (job_id) REFERENCES job (id)');
$this->addSql('ALTER TABLE speed_dating_job_contact DROP FOREIGN KEY FK_219575EA60234583');
$this->addSql('ALTER TABLE speed_dating_job_company DROP FOREIGN KEY FK_22489A9D292E8AE2');
$this->addSql('ALTER TABLE speed_dating_job_company DROP FOREIGN KEY FK_22489A9DF5B7AF75');
$this->addSql('ALTER TABLE speed_dating_job_company_job_mapping DROP FOREIGN KEY FK_6516EEBC60234583');
$this->addSql('ALTER TABLE speed_dating_job_company_job_mapping DROP FOREIGN KEY FK_6516EEBCBE04EA9');
$this->addSql('DROP TABLE speed_dating_job_contact');
$this->addSql('DROP TABLE speed_dating_job_company');
$this->addSql('DROP TABLE speed_dating_job_company_job_mapping');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('CREATE TABLE speed_dating_job_contact (id INT AUTO_INCREMENT NOT NULL, speed_dating_job_company_id INT DEFAULT NULL, firstname VARCHAR(191) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, lastname VARCHAR(191) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, email VARCHAR(191) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, phone VARCHAR(191) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, created_at DATETIME NOT NULL, INDEX IDX_219575EA60234583 (speed_dating_job_company_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('CREATE TABLE speed_dating_job_company (id INT AUTO_INCREMENT NOT NULL, address_id INT DEFAULT NULL, profile_picture_id INT DEFAULT NULL, name VARCHAR(150) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, url VARCHAR(300) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, created_at DATETIME NOT NULL, UNIQUE INDEX UNIQ_22489A9D292E8AE2 (profile_picture_id), UNIQUE INDEX UNIQ_22489A9DF5B7AF75 (address_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('CREATE TABLE speed_dating_job_company_job_mapping (speed_dating_job_company_id INT NOT NULL, job_id INT NOT NULL, INDEX IDX_6516EEBC60234583 (speed_dating_job_company_id), INDEX IDX_6516EEBCBE04EA9 (job_id), PRIMARY KEY(speed_dating_job_company_id, job_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('ALTER TABLE speed_dating_job_contact ADD CONSTRAINT FK_219575EA60234583 FOREIGN KEY (speed_dating_job_company_id) REFERENCES speed_dating_job_company (id)');
$this->addSql('ALTER TABLE speed_dating_job_company ADD CONSTRAINT FK_22489A9D292E8AE2 FOREIGN KEY (profile_picture_id) REFERENCES media__media (id)');
$this->addSql('ALTER TABLE speed_dating_job_company ADD CONSTRAINT FK_22489A9DF5B7AF75 FOREIGN KEY (address_id) REFERENCES address (id)');
$this->addSql('ALTER TABLE speed_dating_job_company_job_mapping ADD CONSTRAINT FK_6516EEBC60234583 FOREIGN KEY (speed_dating_job_company_id) REFERENCES speed_dating_job_company (id)');
$this->addSql('ALTER TABLE speed_dating_job_company_job_mapping ADD CONSTRAINT FK_6516EEBCBE04EA9 FOREIGN KEY (job_id) REFERENCES job (id)');
$this->addSql('ALTER TABLE rookie_day_company DROP FOREIGN KEY FK_96E44985F5B7AF75');
$this->addSql('ALTER TABLE rookie_day_company DROP FOREIGN KEY FK_96E44985292E8AE2');
$this->addSql('ALTER TABLE rookie_day_company DROP FOREIGN KEY FK_96E449857FA5CF3F');
$this->addSql('ALTER TABLE rookie_day_company_job_mapping DROP FOREIGN KEY FK_5F5380CA763CEE0');
$this->addSql('ALTER TABLE rookie_day_company_job_mapping DROP FOREIGN KEY FK_5F5380CABE04EA9');
$this->addSql('ALTER TABLE rookie_day_contact DROP FOREIGN KEY FK_9539A6F2763CEE0');
$this->addSql('ALTER TABLE rookie_day_contact_date_mapping DROP FOREIGN KEY FK_B3F682CA7759F17C');
$this->addSql('ALTER TABLE rookie_day_contact_date_mapping DROP FOREIGN KEY FK_B3F682CA61CC76A1');
$this->addSql('ALTER TABLE rookie_day_date DROP FOREIGN KEY FK_66B7823B6A5C660');
$this->addSql('ALTER TABLE rookie_day_school DROP FOREIGN KEY FK_7484CC527FA5CF3F');
$this->addSql('ALTER TABLE rookie_day_school_date_mapping DROP FOREIGN KEY FK_2EB83D8A84E3E0E1');
$this->addSql('ALTER TABLE rookie_day_school_date_mapping DROP FOREIGN KEY FK_2EB83D8A61CC76A1');
$this->addSql('ALTER TABLE rookie_day_setup DROP FOREIGN KEY FK_37064A2F7FA5CF3F');
$this->addSql('ALTER TABLE rookie_day_student DROP FOREIGN KEY FK_6E78EFF984E3E0E1');
$this->addSql('ALTER TABLE rookie_day_student_company DROP FOREIGN KEY FK_EF48772D5B6C9B2C');
$this->addSql('ALTER TABLE rookie_day_student_company DROP FOREIGN KEY FK_EF48772D763CEE0');
$this->addSql('ALTER TABLE rookie_day_student_company DROP FOREIGN KEY FK_EF48772DBE04EA9');
$this->addSql('DROP TABLE rookie_day_company');
$this->addSql('DROP TABLE rookie_day_company_job_mapping');
$this->addSql('DROP TABLE rookie_day_contact');
$this->addSql('DROP TABLE rookie_day_contact_date_mapping');
$this->addSql('DROP TABLE rookie_day_date');
$this->addSql('DROP TABLE rookie_day_district');
$this->addSql('DROP TABLE rookie_day_school');
$this->addSql('DROP TABLE rookie_day_school_date_mapping');
$this->addSql('DROP TABLE rookie_day_setup');
$this->addSql('DROP TABLE rookie_day_student');
$this->addSql('DROP TABLE rookie_day_student_company');
}
}