<?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 Version20220227140359 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 job_advantage (id INT AUTO_INCREMENT NOT NULL, label VARCHAR(255) NOT NULL, position INT DEFAULT NULL, created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', updated_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE job_level (id INT AUTO_INCREMENT NOT NULL, label VARCHAR(255) NOT NULL, position INT DEFAULT NULL, created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', updated_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE job_offer (id INT AUTO_INCREMENT NOT NULL, title VARCHAR(255) NOT NULL, start_date VARCHAR(255) DEFAULT NULL, salary VARCHAR(255) DEFAULT NULL, description LONGTEXT DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE job_offer_city (job_offer_id INT NOT NULL, city_id INT NOT NULL, INDEX IDX_B9D4BC3E3481D195 (job_offer_id), INDEX IDX_B9D4BC3E8BAC62AF (city_id), PRIMARY KEY(job_offer_id, city_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE job_offer_job_type (job_offer_id INT NOT NULL, job_type_id INT NOT NULL, INDEX IDX_E016C1CF3481D195 (job_offer_id), INDEX IDX_E016C1CF5FA33B08 (job_type_id), PRIMARY KEY(job_offer_id, job_type_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE job_offer_job_advantage (job_offer_id INT NOT NULL, job_advantage_id INT NOT NULL, INDEX IDX_40C54EF53481D195 (job_offer_id), INDEX IDX_40C54EF53707DCA5 (job_advantage_id), PRIMARY KEY(job_offer_id, job_advantage_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE job_offer_job_level (job_offer_id INT NOT NULL, job_level_id INT NOT NULL, INDEX IDX_D3EF43C83481D195 (job_offer_id), INDEX IDX_D3EF43C838F6EEDC (job_level_id), PRIMARY KEY(job_offer_id, job_level_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE job_type (id INT AUTO_INCREMENT NOT NULL, label VARCHAR(255) NOT NULL, position INT DEFAULT NULL, created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE job_offer_city ADD CONSTRAINT FK_B9D4BC3E3481D195 FOREIGN KEY (job_offer_id) REFERENCES job_offer (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE job_offer_city ADD CONSTRAINT FK_B9D4BC3E8BAC62AF FOREIGN KEY (city_id) REFERENCES city (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE job_offer_job_type ADD CONSTRAINT FK_E016C1CF3481D195 FOREIGN KEY (job_offer_id) REFERENCES job_offer (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE job_offer_job_type ADD CONSTRAINT FK_E016C1CF5FA33B08 FOREIGN KEY (job_type_id) REFERENCES job_type (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE job_offer_job_advantage ADD CONSTRAINT FK_40C54EF53481D195 FOREIGN KEY (job_offer_id) REFERENCES job_offer (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE job_offer_job_advantage ADD CONSTRAINT FK_40C54EF53707DCA5 FOREIGN KEY (job_advantage_id) REFERENCES job_advantage (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE job_offer_job_level ADD CONSTRAINT FK_D3EF43C83481D195 FOREIGN KEY (job_offer_id) REFERENCES job_offer (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE job_offer_job_level ADD CONSTRAINT FK_D3EF43C838F6EEDC FOREIGN KEY (job_level_id) REFERENCES job_level (id) ON DELETE CASCADE');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE job_offer_job_advantage DROP FOREIGN KEY FK_40C54EF53707DCA5');
$this->addSql('ALTER TABLE job_offer_job_level DROP FOREIGN KEY FK_D3EF43C838F6EEDC');
$this->addSql('ALTER TABLE job_offer_city DROP FOREIGN KEY FK_B9D4BC3E3481D195');
$this->addSql('ALTER TABLE job_offer_job_type DROP FOREIGN KEY FK_E016C1CF3481D195');
$this->addSql('ALTER TABLE job_offer_job_advantage DROP FOREIGN KEY FK_40C54EF53481D195');
$this->addSql('ALTER TABLE job_offer_job_level DROP FOREIGN KEY FK_D3EF43C83481D195');
$this->addSql('ALTER TABLE job_offer_job_type DROP FOREIGN KEY FK_E016C1CF5FA33B08');
$this->addSql('DROP TABLE job_advantage');
$this->addSql('DROP TABLE job_level');
$this->addSql('DROP TABLE job_offer');
$this->addSql('DROP TABLE job_offer_city');
$this->addSql('DROP TABLE job_offer_job_type');
$this->addSql('DROP TABLE job_offer_job_advantage');
$this->addSql('DROP TABLE job_offer_job_level');
$this->addSql('DROP TABLE job_type');
$this->addSql('ALTER TABLE blog_article CHANGE status status VARCHAR(255) NOT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE type type VARCHAR(255) NOT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE link link VARCHAR(255) DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE title title VARCHAR(255) NOT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE excerpt excerpt LONGTEXT DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE featured_media featured_media VARCHAR(255) DEFAULT NULL COLLATE `utf8mb4_unicode_ci`');
$this->addSql('ALTER TABLE blog_category CHANGE name name VARCHAR(255) NOT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE link link VARCHAR(255) NOT NULL COLLATE `utf8mb4_unicode_ci`');
$this->addSql('ALTER TABLE blog_tag CHANGE name name VARCHAR(255) NOT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE link link VARCHAR(255) DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE slug slug VARCHAR(255) NOT NULL COLLATE `utf8mb4_unicode_ci`');
$this->addSql('ALTER TABLE branch_activity CHANGE label label VARCHAR(255) NOT NULL COLLATE `utf8mb4_unicode_ci`');
$this->addSql('ALTER TABLE capacity CHANGE label label VARCHAR(255) NOT NULL COLLATE `utf8mb4_unicode_ci`');
$this->addSql('ALTER TABLE city CHANGE name name VARCHAR(255) NOT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE zip_code zip_code VARCHAR(15) NOT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE slug slug VARCHAR(255) NOT NULL COLLATE `utf8mb4_unicode_ci`');
$this->addSql('ALTER TABLE civility CHANGE label label VARCHAR(255) NOT NULL COLLATE `utf8mb4_unicode_ci`');
$this->addSql('ALTER TABLE company_profile CHANGE name name VARCHAR(255) NOT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE website website VARCHAR(255) NOT NULL COLLATE `utf8mb4_unicode_ci`');
$this->addSql('ALTER TABLE contact_reason CHANGE label label VARCHAR(255) NOT NULL COLLATE `utf8mb4_unicode_ci`');
$this->addSql('ALTER TABLE department CHANGE code code VARCHAR(255) NOT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE name name VARCHAR(255) NOT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE slug slug VARCHAR(255) NOT NULL COLLATE `utf8mb4_unicode_ci`');
$this->addSql('ALTER TABLE document CHANGE file_name file_name VARCHAR(255) DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE hash hash VARCHAR(255) DEFAULT NULL COLLATE `utf8mb4_unicode_ci`');
$this->addSql('ALTER TABLE health_exercise_mode CHANGE label label VARCHAR(255) NOT NULL COLLATE `utf8mb4_unicode_ci`');
$this->addSql('ALTER TABLE health_speciality CHANGE label label VARCHAR(255) NOT NULL COLLATE `utf8mb4_unicode_ci`');
$this->addSql('ALTER TABLE icon CHANGE label label VARCHAR(50) NOT NULL COLLATE `utf8mb4_unicode_ci`');
$this->addSql('ALTER TABLE last_update_process CHANGE process process VARCHAR(255) NOT NULL COLLATE `utf8mb4_unicode_ci`');
$this->addSql('ALTER TABLE living_environment CHANGE label label VARCHAR(255) NOT NULL COLLATE `utf8mb4_unicode_ci`');
$this->addSql('ALTER TABLE notification CHANGE message message VARCHAR(255) NOT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE icon icon VARCHAR(255) DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE color color VARCHAR(255) DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE path path VARCHAR(255) NOT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE params params LONGTEXT DEFAULT NULL COLLATE `utf8mb4_unicode_ci` COMMENT \'(DC2Type:array)\'');
$this->addSql('ALTER TABLE person CHANGE last_name last_name VARCHAR(255) DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE first_name first_name VARCHAR(255) DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE email email VARCHAR(255) DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE phone phone VARCHAR(255) DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE civility civility VARCHAR(255) DEFAULT NULL COLLATE `utf8mb4_unicode_ci`');
$this->addSql('ALTER TABLE professional_profile CHANGE linkedin linkedin VARCHAR(255) DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE experience experience VARCHAR(255) DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE family_situation family_situation VARCHAR(255) DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE time_to_leave time_to_leave VARCHAR(255) DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE other_branche other_branche VARCHAR(255) DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE other_search_capacity other_search_capacity VARCHAR(255) DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE other_type_research other_type_research VARCHAR(255) DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE other_project_situation_status other_project_situation_status VARCHAR(255) DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE other_professional_type other_professional_type VARCHAR(255) DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE other_health_speciality other_health_speciality VARCHAR(255) DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE about about LONGTEXT DEFAULT NULL COLLATE `utf8mb4_unicode_ci`');
$this->addSql('ALTER TABLE professional_profile_contact CHANGE message message LONGTEXT DEFAULT NULL COLLATE `utf8mb4_unicode_ci`');
$this->addSql('ALTER TABLE professional_type CHANGE label label VARCHAR(255) NOT NULL COLLATE `utf8mb4_unicode_ci`');
$this->addSql('ALTER TABLE project_leader CHANGE description description LONGTEXT DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE other_type other_type VARCHAR(255) DEFAULT NULL COLLATE `utf8mb4_unicode_ci`');
$this->addSql('ALTER TABLE project_leader_type CHANGE label label VARCHAR(255) NOT NULL COLLATE `utf8mb4_unicode_ci`');
$this->addSql('ALTER TABLE project_situation_status CHANGE label label VARCHAR(255) NOT NULL COLLATE `utf8mb4_unicode_ci`');
$this->addSql('ALTER TABLE region CHANGE code code VARCHAR(3) NOT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE name name VARCHAR(255) NOT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE slug slug VARCHAR(255) NOT NULL COLLATE `utf8mb4_unicode_ci`');
$this->addSql('ALTER TABLE reset_password_request CHANGE selector selector VARCHAR(20) NOT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE hashed_token hashed_token VARCHAR(100) NOT NULL COLLATE `utf8mb4_unicode_ci`');
$this->addSql('ALTER TABLE socio_professional_category CHANGE label label VARCHAR(255) NOT NULL COLLATE `utf8mb4_unicode_ci`');
$this->addSql('ALTER TABLE territory CHANGE name name VARCHAR(255) NOT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE type type VARCHAR(255) NOT NULL COLLATE `utf8mb4_unicode_ci`');
$this->addSql('ALTER TABLE territory_feature CHANGE label label VARCHAR(255) NOT NULL COLLATE `utf8mb4_unicode_ci`');
$this->addSql('ALTER TABLE type_research CHANGE label label VARCHAR(255) NOT NULL COLLATE `utf8mb4_unicode_ci`');
$this->addSql('ALTER TABLE user CHANGE email email VARCHAR(180) NOT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE password password VARCHAR(255) NOT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE token token VARCHAR(255) DEFAULT NULL COLLATE `utf8mb4_unicode_ci`');
}
}