<?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 Version20240214104305 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 selfevalprestaquiz (id CHAR(36) NOT NULL COMMENT \'(DC2Type:uuid)\', accessib_geophy INT NOT NULL, accessib_tempor INT NOT NULL, accessib_edupop INT NOT NULL, accessib_divers INT NOT NULL, accessib_vulner INT NOT NULL, accessib_geophy_comment LONGTEXT NOT NULL, accessib_tempor_comment LONGTEXT NOT NULL, accessib_edupop_comment LONGTEXT NOT NULL, accessib_divers_comment LONGTEXT NOT NULL, accessib_vulner_comment LONGTEXT NOT NULL, bienetre_format INT NOT NULL, bienetre_format_comment LONGTEXT NOT NULL, bienetre_impgou INT NOT NULL, bienetre_impgou_comment LONGTEXT NOT NULL, bienetre_bienet INT NOT NULL, bienetre_bienet_comment LONGTEXT NOT NULL, bienetre_recben INT NOT NULL, bienetre_recben_comment LONGTEXT NOT NULL, transpar_jusrem INT NOT NULL, transpar_jusrem_comment LONGTEXT NOT NULL, transpar_transp INT NOT NULL, transpar_transp_comment LONGTEXT NOT NULL, transpar_relpro INT NOT NULL, transpar_relpro_comment LONGTEXT NOT NULL, disagdur_labels INT NOT NULL, disagdur_labels_comment LONGTEXT NOT NULL, disagdur_condur INT NOT NULL, disagdur_condur_comment LONGTEXT NOT NULL, proagdur_labels INT NOT NULL, proagdur_labels_comment LONGTEXT NOT NULL, proagdur_valbio INT NOT NULL, proagdur_valbio_comment LONGTEXT NOT NULL, proagdur_ecorec INT NOT NULL, proagdur_ecorec_comment LONGTEXT NOT NULL, proagdur_pertes INT NOT NULL, proagdur_pertes_comment LONGTEXT NOT NULL, proagdur_climat INT NOT NULL, proagdur_climat_comment LONGTEXT NOT NULL, proagdur_geneti INT NOT NULL, proagdur_geneti_comment LONGTEXT NOT NULL, proagdur_prosol INT NOT NULL, proagdur_prosol_comment LONGTEXT NOT NULL, localite_probru INT NOT NULL, localite_probru_comment LONGTEXT NOT NULL, localite_protra INT NOT NULL, localite_protra_comment LONGTEXT NOT NULL, accessib_global INT NOT NULL, accessib_global_comment LONGTEXT NOT NULL, bienetre_global INT NOT NULL, bienetre_global_comment LONGTEXT NOT NULL, transpar_global INT NOT NULL, transpar_global_comment LONGTEXT NOT NULL, disagdur_global INT NOT NULL, disagdur_global_comment LONGTEXT NOT NULL, proagdur_global INT NOT NULL, proagdur_global_comment LONGTEXT NOT NULL, localite_global INT NOT NULL, localite_global_comment LONGTEXT NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_general_ci` ENGINE = InnoDB');
        $this->addSql('ALTER TABLE prestataire ADD selfevalprestaquiz_id CHAR(36) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', ADD marketchannelfunction LONGTEXT DEFAULT NULL, CHANGE iban iban LONGTEXT DEFAULT NULL COMMENT \'(DC2Type:personal_data)\'');
        $this->addSql('ALTER TABLE prestataire ADD CONSTRAINT FK_60A26480C5DC59A8 FOREIGN KEY (selfevalprestaquiz_id) REFERENCES selfevalprestaquiz (id)');
        $this->addSql('CREATE UNIQUE INDEX UNIQ_60A26480C5DC59A8 ON prestataire (selfevalprestaquiz_id)');
    }

    public function down(Schema $schema) : void
    {
        // this down() migration is auto-generated, please modify it to your needs
        $this->addSql('ALTER TABLE prestataire DROP FOREIGN KEY FK_60A26480C5DC59A8');
        $this->addSql('DROP TABLE selfevalprestaquiz');
        $this->addSql('DROP INDEX UNIQ_60A26480C5DC59A8 ON prestataire');
        $this->addSql('ALTER TABLE prestataire DROP selfevalprestaquiz_id, DROP marketchannelfunction, CHANGE iban iban LONGTEXT CHARACTER SET utf8 DEFAULT NULL COLLATE `utf8_general_ci` COMMENT \'(DC2Type:personal_data)\'');
    }
}
