<?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 Version20251111135209 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 as_demenagement_address ADD quotation_id INT NOT NULL');
$this->addSql('ALTER TABLE as_demenagement_address ADD CONSTRAINT FK_9987E465B4EA4E60 FOREIGN KEY (quotation_id) REFERENCES as_demenagement_quotation (id)');
$this->addSql('CREATE INDEX IDX_9987E465B4EA4E60 ON as_demenagement_address (quotation_id)');
$this->addSql('ALTER TABLE as_demenagement_quotation DROP FOREIGN KEY FK_732753010AEBBB');
$this->addSql('ALTER TABLE as_demenagement_quotation DROP FOREIGN KEY FK_7327530727DB8F6');
$this->addSql('DROP INDEX IDX_732753010AEBBB ON as_demenagement_quotation');
$this->addSql('DROP INDEX IDX_7327530727DB8F6 ON as_demenagement_quotation');
$this->addSql('ALTER TABLE as_demenagement_quotation DROP loading_address_id, DROP unloading_address_id');
$this->addSql('ALTER TABLE exemple_page_content CHANGE content content LONGTEXT DEFAULT NULL COMMENT \'(DC2Type:json)\'');
$this->addSql('ALTER TABLE user 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 exemple_page_content CHANGE content content LONGTEXT DEFAULT NULL COLLATE `utf8mb4_bin`');
$this->addSql('ALTER TABLE user CHANGE roles roles LONGTEXT NOT NULL COLLATE `utf8mb4_bin`');
$this->addSql('ALTER TABLE as_demenagement_quotation ADD loading_address_id INT DEFAULT NULL, ADD unloading_address_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE as_demenagement_quotation ADD CONSTRAINT FK_732753010AEBBB FOREIGN KEY (loading_address_id) REFERENCES as_demenagement_address (id)');
$this->addSql('ALTER TABLE as_demenagement_quotation ADD CONSTRAINT FK_7327530727DB8F6 FOREIGN KEY (unloading_address_id) REFERENCES as_demenagement_address (id)');
$this->addSql('CREATE INDEX IDX_732753010AEBBB ON as_demenagement_quotation (loading_address_id)');
$this->addSql('CREATE INDEX IDX_7327530727DB8F6 ON as_demenagement_quotation (unloading_address_id)');
$this->addSql('ALTER TABLE as_demenagement_address DROP FOREIGN KEY FK_9987E465B4EA4E60');
$this->addSql('DROP INDEX IDX_9987E465B4EA4E60 ON as_demenagement_address');
$this->addSql('ALTER TABLE as_demenagement_address DROP quotation_id');
}
}