<?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 Version20230713151912 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 user_file_document DROP FOREIGN KEY FK_87B7A8BB7195281E');
$this->addSql('ALTER TABLE user_file_missing_files DROP FOREIGN KEY FK_6E1B4857856A6B10');
$this->addSql('ALTER TABLE user_file_document_group DROP FOREIGN KEY FK_B37DE49E2B8C4FD6');
$this->addSql('ALTER TABLE user_file_document_group DROP FOREIGN KEY FK_B37DE49E393B4FE');
$this->addSql('ALTER TABLE user_file_document_group DROP FOREIGN KEY FK_B37DE49E50CE1DB6');
$this->addSql('ALTER TABLE user_file_document_group DROP FOREIGN KEY FK_B37DE49E58A5FF00');
$this->addSql('ALTER TABLE user_file_document_group DROP FOREIGN KEY FK_B37DE49EB3CAF53');
$this->addSql('ALTER TABLE user_file_document_group DROP FOREIGN KEY FK_B37DE49EC33F7837');
$this->addSql('ALTER TABLE user_file_document_group DROP FOREIGN KEY FK_B37DE49EC4F1DB68');
$this->addSql('ALTER TABLE user_file_document_group DROP FOREIGN KEY FK_B37DE49ECBC66766');
$this->addSql('ALTER TABLE user_file_document_group DROP FOREIGN KEY FK_B37DE49ECF915DAB');
$this->addSql('ALTER TABLE user_file_document_group DROP FOREIGN KEY FK_B37DE49EE00338F0');
$this->addSql('DROP TABLE user_file_document_group');
$this->addSql('DROP INDEX IDX_87B7A8BB7195281E ON user_file_document');
$this->addSql('ALTER TABLE user_file_document DROP document_group_id');
$this->addSql('ALTER TABLE user_file_missing_files DROP FOREIGN KEY FK_6E1B48572B8C4FD6');
$this->addSql('ALTER TABLE user_file_missing_files DROP FOREIGN KEY FK_6E1B485750CE1DB6');
$this->addSql('ALTER TABLE user_file_missing_files DROP FOREIGN KEY FK_6E1B485758A5FF00');
$this->addSql('ALTER TABLE user_file_missing_files DROP FOREIGN KEY FK_6E1B4857B3CAF53');
$this->addSql('ALTER TABLE user_file_missing_files DROP FOREIGN KEY FK_6E1B4857C33F7837');
$this->addSql('ALTER TABLE user_file_missing_files DROP FOREIGN KEY FK_6E1B4857C4F1DB68');
$this->addSql('ALTER TABLE user_file_missing_files DROP FOREIGN KEY FK_6E1B4857CF915DAB');
$this->addSql('ALTER TABLE user_file_missing_files DROP FOREIGN KEY FK_6E1B4857E00338F0');
$this->addSql('DROP INDEX IDX_6E1B4857C33F7837 ON user_file_missing_files');
$this->addSql('DROP INDEX IDX_6E1B4857C4F1DB68 ON user_file_missing_files');
$this->addSql('DROP INDEX IDX_6E1B4857E00338F0 ON user_file_missing_files');
$this->addSql('DROP INDEX IDX_6E1B4857B3CAF53 ON user_file_missing_files');
$this->addSql('DROP INDEX IDX_6E1B4857CF915DAB ON user_file_missing_files');
$this->addSql('DROP INDEX IDX_6E1B48572B8C4FD6 ON user_file_missing_files');
$this->addSql('DROP INDEX IDX_6E1B485758A5FF00 ON user_file_missing_files');
$this->addSql('DROP INDEX IDX_6E1B4857856A6B10 ON user_file_missing_files');
$this->addSql('DROP INDEX IDX_6E1B485750CE1DB6 ON user_file_missing_files');
$this->addSql('ALTER TABLE user_file_missing_files DROP document_id, DROP user_file_person_id, DROP user_file_person_revenue_id, DROP user_file_property_id, DROP user_file_investment_id, DROP user_file_credit_id, DROP user_file_property_credit_id, DROP user_file_document_group_id, DROP user_file_bank_account_id');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('CREATE TABLE user_file_document_group (id INT AUTO_INCREMENT NOT NULL, user_file_id INT NOT NULL, document_id INT NOT NULL, user_file_person_id INT DEFAULT NULL, user_file_person_revenue_id INT DEFAULT NULL, user_file_property_id INT DEFAULT NULL, user_file_investment_id INT DEFAULT NULL, user_file_credit_id INT DEFAULT NULL, user_file_property_credit_id INT DEFAULT NULL, user_file_missing_file_id INT DEFAULT NULL, user_file_bank_account_id INT DEFAULT NULL, INDEX IDX_B37DE49ECBC66766 (user_file_id), INDEX IDX_B37DE49EC33F7837 (document_id), INDEX IDX_B37DE49EC4F1DB68 (user_file_person_id), INDEX IDX_B37DE49EE00338F0 (user_file_person_revenue_id), INDEX IDX_B37DE49EB3CAF53 (user_file_property_id), INDEX IDX_B37DE49ECF915DAB (user_file_investment_id), INDEX IDX_B37DE49E2B8C4FD6 (user_file_credit_id), INDEX IDX_B37DE49E58A5FF00 (user_file_property_credit_id), INDEX IDX_B37DE49E393B4FE (user_file_missing_file_id), INDEX IDX_B37DE49E50CE1DB6 (user_file_bank_account_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('ALTER TABLE user_file_document_group ADD CONSTRAINT FK_B37DE49E2B8C4FD6 FOREIGN KEY (user_file_credit_id) REFERENCES user_file_credit (id) ON UPDATE NO ACTION ON DELETE NO ACTION');
$this->addSql('ALTER TABLE user_file_document_group ADD CONSTRAINT FK_B37DE49E393B4FE FOREIGN KEY (user_file_missing_file_id) REFERENCES user_file_missing_files (id) ON UPDATE NO ACTION ON DELETE NO ACTION');
$this->addSql('ALTER TABLE user_file_document_group ADD CONSTRAINT FK_B37DE49E50CE1DB6 FOREIGN KEY (user_file_bank_account_id) REFERENCES user_file_bank_account (id) ON UPDATE NO ACTION ON DELETE NO ACTION');
$this->addSql('ALTER TABLE user_file_document_group ADD CONSTRAINT FK_B37DE49E58A5FF00 FOREIGN KEY (user_file_property_credit_id) REFERENCES user_file_property_credit (id) ON UPDATE NO ACTION ON DELETE NO ACTION');
$this->addSql('ALTER TABLE user_file_document_group ADD CONSTRAINT FK_B37DE49EB3CAF53 FOREIGN KEY (user_file_property_id) REFERENCES user_file_property (id) ON UPDATE NO ACTION ON DELETE NO ACTION');
$this->addSql('ALTER TABLE user_file_document_group ADD CONSTRAINT FK_B37DE49EC33F7837 FOREIGN KEY (document_id) REFERENCES document (id) ON UPDATE NO ACTION ON DELETE NO ACTION');
$this->addSql('ALTER TABLE user_file_document_group ADD CONSTRAINT FK_B37DE49EC4F1DB68 FOREIGN KEY (user_file_person_id) REFERENCES user_file_person (id) ON UPDATE NO ACTION ON DELETE NO ACTION');
$this->addSql('ALTER TABLE user_file_document_group ADD CONSTRAINT FK_B37DE49ECBC66766 FOREIGN KEY (user_file_id) REFERENCES user_file (id) ON UPDATE NO ACTION ON DELETE NO ACTION');
$this->addSql('ALTER TABLE user_file_document_group ADD CONSTRAINT FK_B37DE49ECF915DAB FOREIGN KEY (user_file_investment_id) REFERENCES user_file_investment (id) ON UPDATE NO ACTION ON DELETE NO ACTION');
$this->addSql('ALTER TABLE user_file_document_group ADD CONSTRAINT FK_B37DE49EE00338F0 FOREIGN KEY (user_file_person_revenue_id) REFERENCES user_file_person_revenue (id) ON UPDATE NO ACTION ON DELETE NO ACTION');
$this->addSql('ALTER TABLE user_file_document ADD document_group_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE user_file_document ADD CONSTRAINT FK_87B7A8BB7195281E FOREIGN KEY (document_group_id) REFERENCES user_file_document_group (id) ON UPDATE NO ACTION ON DELETE NO ACTION');
$this->addSql('CREATE INDEX IDX_87B7A8BB7195281E ON user_file_document (document_group_id)');
$this->addSql('ALTER TABLE user_file_missing_files ADD document_id INT DEFAULT NULL, ADD user_file_person_id INT DEFAULT NULL, ADD user_file_person_revenue_id INT DEFAULT NULL, ADD user_file_property_id INT DEFAULT NULL, ADD user_file_investment_id INT DEFAULT NULL, ADD user_file_credit_id INT DEFAULT NULL, ADD user_file_property_credit_id INT DEFAULT NULL, ADD user_file_document_group_id INT DEFAULT NULL, ADD user_file_bank_account_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE user_file_missing_files ADD CONSTRAINT FK_6E1B48572B8C4FD6 FOREIGN KEY (user_file_credit_id) REFERENCES user_file_credit (id) ON UPDATE NO ACTION ON DELETE NO ACTION');
$this->addSql('ALTER TABLE user_file_missing_files ADD CONSTRAINT FK_6E1B485750CE1DB6 FOREIGN KEY (user_file_bank_account_id) REFERENCES user_file_bank_account (id) ON UPDATE NO ACTION ON DELETE NO ACTION');
$this->addSql('ALTER TABLE user_file_missing_files ADD CONSTRAINT FK_6E1B485758A5FF00 FOREIGN KEY (user_file_property_credit_id) REFERENCES user_file_property_credit (id) ON UPDATE NO ACTION ON DELETE NO ACTION');
$this->addSql('ALTER TABLE user_file_missing_files ADD CONSTRAINT FK_6E1B4857856A6B10 FOREIGN KEY (user_file_document_group_id) REFERENCES user_file_document_group (id) ON UPDATE NO ACTION ON DELETE NO ACTION');
$this->addSql('ALTER TABLE user_file_missing_files ADD CONSTRAINT FK_6E1B4857B3CAF53 FOREIGN KEY (user_file_property_id) REFERENCES user_file_property (id) ON UPDATE NO ACTION ON DELETE NO ACTION');
$this->addSql('ALTER TABLE user_file_missing_files ADD CONSTRAINT FK_6E1B4857C33F7837 FOREIGN KEY (document_id) REFERENCES document (id) ON UPDATE NO ACTION ON DELETE NO ACTION');
$this->addSql('ALTER TABLE user_file_missing_files ADD CONSTRAINT FK_6E1B4857C4F1DB68 FOREIGN KEY (user_file_person_id) REFERENCES user_file_person (id) ON UPDATE NO ACTION ON DELETE NO ACTION');
$this->addSql('ALTER TABLE user_file_missing_files ADD CONSTRAINT FK_6E1B4857CF915DAB FOREIGN KEY (user_file_investment_id) REFERENCES user_file_investment (id) ON UPDATE NO ACTION ON DELETE NO ACTION');
$this->addSql('ALTER TABLE user_file_missing_files ADD CONSTRAINT FK_6E1B4857E00338F0 FOREIGN KEY (user_file_person_revenue_id) REFERENCES user_file_person_revenue (id) ON UPDATE NO ACTION ON DELETE NO ACTION');
$this->addSql('CREATE INDEX IDX_6E1B4857C33F7837 ON user_file_missing_files (document_id)');
$this->addSql('CREATE INDEX IDX_6E1B4857C4F1DB68 ON user_file_missing_files (user_file_person_id)');
$this->addSql('CREATE INDEX IDX_6E1B4857E00338F0 ON user_file_missing_files (user_file_person_revenue_id)');
$this->addSql('CREATE INDEX IDX_6E1B4857B3CAF53 ON user_file_missing_files (user_file_property_id)');
$this->addSql('CREATE INDEX IDX_6E1B4857CF915DAB ON user_file_missing_files (user_file_investment_id)');
$this->addSql('CREATE INDEX IDX_6E1B48572B8C4FD6 ON user_file_missing_files (user_file_credit_id)');
$this->addSql('CREATE INDEX IDX_6E1B485758A5FF00 ON user_file_missing_files (user_file_property_credit_id)');
$this->addSql('CREATE INDEX IDX_6E1B4857856A6B10 ON user_file_missing_files (user_file_document_group_id)');
$this->addSql('CREATE INDEX IDX_6E1B485750CE1DB6 ON user_file_missing_files (user_file_bank_account_id)');
}
}