<?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 Version20220530112659 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 attachment_type ADD have_issue_date TINYINT(1) DEFAULT NULL, ADD have_expiration_date TINYINT(1) DEFAULT NULL, ADD have_reference TINYINT(1) DEFAULT NULL');
$this->addSql('ALTER TABLE invoice_deposit DROP FOREIGN KEY FK_6702ABEA6B253BFF');
$this->addSql('ALTER TABLE invoice_deposit DROP FOREIGN KEY FK_6702ABEA4C817138');
$this->addSql('DROP INDEX UNIQ_6702ABEA4C817138 ON invoice_deposit');
$this->addSql('DROP INDEX UNIQ_6702ABEA6B253BFF ON invoice_deposit');
$this->addSql('ALTER TABLE invoice_deposit DROP tax_document_id, DROP rib_id');
$this->addSql('ALTER TABLE provider_request DROP FOREIGN KEY FK_CBCF2D38D37A7B00');
$this->addSql('ALTER TABLE provider_request DROP FOREIGN KEY FK_CBCF2D384C817138');
$this->addSql('ALTER TABLE provider_request DROP FOREIGN KEY FK_CBCF2D38B80AEEC1');
$this->addSql('ALTER TABLE provider_request DROP FOREIGN KEY FK_CBCF2D38D60C56C5');
$this->addSql('ALTER TABLE provider_request DROP FOREIGN KEY FK_CBCF2D387957E6AE');
$this->addSql('ALTER TABLE provider_request DROP FOREIGN KEY FK_CBCF2D382418A5C4');
$this->addSql('DROP INDEX UNIQ_CBCF2D384C817138 ON provider_request');
$this->addSql('DROP INDEX UNIQ_CBCF2D382418A5C4 ON provider_request');
$this->addSql('DROP INDEX UNIQ_CBCF2D38D60C56C5 ON provider_request');
$this->addSql('DROP INDEX UNIQ_CBCF2D38B80AEEC1 ON provider_request');
$this->addSql('DROP INDEX UNIQ_CBCF2D38D37A7B00 ON provider_request');
$this->addSql('DROP INDEX UNIQ_CBCF2D387957E6AE ON provider_request');
$this->addSql('ALTER TABLE provider_request DROP tax_document_id, DROP rccm_document_id, DROP cnss_document_id, DROP rib_document_id, DROP ifu_document_id, DROP arcp_document_id');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE attachment_type DROP have_issue_date, DROP have_expiration_date, DROP have_reference');
$this->addSql('ALTER TABLE invoice_deposit ADD tax_document_id INT DEFAULT NULL, ADD rib_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE invoice_deposit ADD CONSTRAINT FK_6702ABEA6B253BFF FOREIGN KEY (rib_id) REFERENCES attachment (id)');
$this->addSql('ALTER TABLE invoice_deposit ADD CONSTRAINT FK_6702ABEA4C817138 FOREIGN KEY (tax_document_id) REFERENCES attachment (id)');
$this->addSql('CREATE UNIQUE INDEX UNIQ_6702ABEA4C817138 ON invoice_deposit (tax_document_id)');
$this->addSql('CREATE UNIQUE INDEX UNIQ_6702ABEA6B253BFF ON invoice_deposit (rib_id)');
$this->addSql('ALTER TABLE provider_request ADD tax_document_id INT DEFAULT NULL, ADD rccm_document_id INT DEFAULT NULL, ADD cnss_document_id INT DEFAULT NULL, ADD rib_document_id INT DEFAULT NULL, ADD ifu_document_id INT DEFAULT NULL, ADD arcp_document_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE provider_request ADD CONSTRAINT FK_CBCF2D38D37A7B00 FOREIGN KEY (rib_document_id) REFERENCES attachment (id)');
$this->addSql('ALTER TABLE provider_request ADD CONSTRAINT FK_CBCF2D384C817138 FOREIGN KEY (tax_document_id) REFERENCES attachment (id)');
$this->addSql('ALTER TABLE provider_request ADD CONSTRAINT FK_CBCF2D38B80AEEC1 FOREIGN KEY (rccm_document_id) REFERENCES attachment (id)');
$this->addSql('ALTER TABLE provider_request ADD CONSTRAINT FK_CBCF2D38D60C56C5 FOREIGN KEY (ifu_document_id) REFERENCES attachment (id)');
$this->addSql('ALTER TABLE provider_request ADD CONSTRAINT FK_CBCF2D387957E6AE FOREIGN KEY (arcp_document_id) REFERENCES attachment (id)');
$this->addSql('ALTER TABLE provider_request ADD CONSTRAINT FK_CBCF2D382418A5C4 FOREIGN KEY (cnss_document_id) REFERENCES attachment (id)');
$this->addSql('CREATE UNIQUE INDEX UNIQ_CBCF2D384C817138 ON provider_request (tax_document_id)');
$this->addSql('CREATE UNIQUE INDEX UNIQ_CBCF2D382418A5C4 ON provider_request (cnss_document_id)');
$this->addSql('CREATE UNIQUE INDEX UNIQ_CBCF2D38D60C56C5 ON provider_request (ifu_document_id)');
$this->addSql('CREATE UNIQUE INDEX UNIQ_CBCF2D38B80AEEC1 ON provider_request (rccm_document_id)');
$this->addSql('CREATE UNIQUE INDEX UNIQ_CBCF2D38D37A7B00 ON provider_request (rib_document_id)');
$this->addSql('CREATE UNIQUE INDEX UNIQ_CBCF2D387957E6AE ON provider_request (arcp_document_id)');
}
}