<?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 Version20220202165316 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 offer (id INT AUTO_INCREMENT NOT NULL, titre VARCHAR(255) NOT NULL, name_file VARCHAR(255) DEFAULT NULL, intitule_poste VARCHAR(255) NOT NULL, description_poste VARCHAR(255) NOT NULL, missions VARCHAR(255) NOT NULL, statut VARCHAR(255) DEFAULT NULL, logo_structure VARCHAR(255) DEFAULT NULL, nombre_candidature INT DEFAULT NULL, experience INT NOT NULL, convention_collective VARCHAR(255) NOT NULL, outils VARCHAR(255) DEFAULT NULL, temps_travail INT NOT NULL, date_debut_contrat DATE NOT NULL, date_entretien DATE NOT NULL, date_publication DATE NOT NULL, date_archivage DATE DEFAULT NULL, salaire INT DEFAULT NULL, formation VARCHAR(255) DEFAULT NULL, competences VARCHAR(255) DEFAULT NULL, qualites VARCHAR(255) DEFAULT NULL, type_contrat VARCHAR(255) NOT NULL, categorie_contrat VARCHAR(255) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE upload (id INT AUTO_INCREMENT NOT NULL, namepdf VARCHAR(255) DEFAULT NULL, titre VARCHAR(255) DEFAULT NULL, nom_structure VARCHAR(255) DEFAULT NULL, description_structure VARCHAR(255) DEFAULT NULL, intitule_poste VARCHAR(255) DEFAULT NULL, description_poste VARCHAR(255) DEFAULT NULL, missions VARCHAR(255) DEFAULT NULL, statut VARCHAR(255) DEFAULT NULL, logo_structure VARCHAR(255) DEFAULT NULL, nombre_candidature INT DEFAULT NULL, experience INT DEFAULT NULL, convention_collective VARCHAR(255) DEFAULT NULL, outils VARCHAR(255) DEFAULT NULL, temps_travail INT DEFAULT NULL, date_debut_contrat DATE DEFAULT NULL, date_entretien DATE DEFAULT NULL, date_publication DATE DEFAULT NULL, date_archivage DATE DEFAULT NULL, salaire INT DEFAULT NULL, formation VARCHAR(255) DEFAULT NULL, competences VARCHAR(255) DEFAULT NULL, qualites VARCHAR(255) DEFAULT NULL, type_contrat VARCHAR(255) DEFAULT NULL, categorie_contrat VARCHAR(255) DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE user DROP user_type, CHANGE first_name first_name VARCHAR(255) DEFAULT NULL, CHANGE last_name last_name VARCHAR(255) DEFAULT NULL, CHANGE nom_structure nom_structure VARCHAR(255) DEFAULT NULL, CHANGE description_structure description_structure VARCHAR(255) DEFAULT NULL, CHANGE logo_structure logo_structure INT DEFAULT NULL');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('DROP TABLE offer');
$this->addSql('DROP TABLE upload');
$this->addSql('ALTER TABLE `user` ADD user_type VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE first_name first_name VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE last_name last_name VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE nom_structure nom_structure VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE description_structure description_structure VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE logo_structure logo_structure INT NOT NULL');
}
}