<?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 Version20220620072650 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('ALTER TABLE offer DROP FOREIGN KEY FK_17BDE61F6B3CA4B');
$this->addSql('DROP INDEX idx_17bde61f6b3ca4b ON offer');
$this->addSql('CREATE INDEX IDX_29D6873E6B3CA4B ON offer (id_user)');
$this->addSql('ALTER TABLE offer ADD CONSTRAINT FK_17BDE61F6B3CA4B FOREIGN KEY (id_user) REFERENCES user (id)');
$this->addSql('ALTER TABLE user DROP nom_structure, DROP description_structure, CHANGE roles roles LONGTEXT NOT NULL COMMENT \'(DC2Type:json)\'');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE offer DROP FOREIGN KEY FK_29D6873E6B3CA4B');
$this->addSql('DROP INDEX idx_29d6873e6b3ca4b ON offer');
$this->addSql('CREATE INDEX IDX_17BDE61F6B3CA4B ON offer (id_user)');
$this->addSql('ALTER TABLE offer ADD CONSTRAINT FK_29D6873E6B3CA4B FOREIGN KEY (id_user) REFERENCES `user` (id)');
$this->addSql('ALTER TABLE `user` ADD nom_structure VARCHAR(255) DEFAULT NULL, ADD description_structure VARCHAR(255) DEFAULT NULL, CHANGE roles roles LONGTEXT NOT NULL COMMENT \'(dc2type:json)\'');
}
}