migrations/2023/06/Version20230629142352.php line 1
<?phpdeclare(strict_types=1);namespace DoctrineMigrations;use Doctrine\DBAL\Schema\Schema;use Doctrine\Migrations\AbstractMigration;final class Version20230629142352 extends AbstractMigration{public function getDescription(): string{return '';}public function up(Schema $schema): void{$this->addSql('CREATE TABLE contact_relationship_authorized_accountant (id BINARY(16) NOT NULL COMMENT \'(DC2Type:contact_relationship_authorized_accountant_id)\', created_by_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:contact_id)\', updated_by_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:contact_id)\', contact_id BINARY(16) NOT NULL COMMENT \'(DC2Type:contact_id)\', authorized_accountant_id BINARY(16) NOT NULL COMMENT \'(DC2Type:contact_id)\', created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', updated_at DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\', INDEX IDX_E2F4CCC2B03A8386 (created_by_id), INDEX IDX_E2F4CCC2896DBBDE (updated_by_id), INDEX IDX_E2F4CCC2E7A1254A (contact_id), INDEX IDX_E2F4CCC2E0427F91 (authorized_accountant_id), UNIQUE INDEX contact_relationship_authorized_accountant_unique (contact_id, authorized_accountant_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');$this->addSql('ALTER TABLE contact_relationship_authorized_accountant ADD CONSTRAINT FK_E2F4CCC2B03A8386 FOREIGN KEY (created_by_id) REFERENCES contact (id)');$this->addSql('ALTER TABLE contact_relationship_authorized_accountant ADD CONSTRAINT FK_E2F4CCC2896DBBDE FOREIGN KEY (updated_by_id) REFERENCES contact (id)');$this->addSql('ALTER TABLE contact_relationship_authorized_accountant ADD CONSTRAINT FK_E2F4CCC2E7A1254A FOREIGN KEY (contact_id) REFERENCES contact (id)');$this->addSql('ALTER TABLE contact_relationship_authorized_accountant ADD CONSTRAINT FK_E2F4CCC2E0427F91 FOREIGN KEY (authorized_accountant_id) REFERENCES contact (id)');}public function down(Schema $schema): void{$this->addSql('ALTER TABLE contact_relationship_authorized_accountant DROP FOREIGN KEY FK_E2F4CCC2B03A8386');$this->addSql('ALTER TABLE contact_relationship_authorized_accountant DROP FOREIGN KEY FK_E2F4CCC2896DBBDE');$this->addSql('ALTER TABLE contact_relationship_authorized_accountant DROP FOREIGN KEY FK_E2F4CCC2E7A1254A');$this->addSql('ALTER TABLE contact_relationship_authorized_accountant DROP FOREIGN KEY FK_E2F4CCC2E0427F91');$this->addSql('DROP TABLE contact_relationship_authorized_accountant');}}