<?php
declare(strict_types=1);
namespace CrmBundleMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
final class Version20230124123922 extends AbstractMigration
{
public function up(Schema $schema): void
{
$this->addSql('CREATE TABLE crm_bundle__opportunity_product (id BINARY(16) NOT NULL COMMENT \'(DC2Type:uuid)\', opportunity_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', INDEX IDX_C34790E39A34590F (opportunity_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE crm_bundle__opportunity_product ADD CONSTRAINT FK_C34790E39A34590F FOREIGN KEY (opportunity_id) REFERENCES crm_bundle__opportunity (id)');
}
public function down(Schema $schema): void
{
$this->addSql('DROP TABLE crm_bundle__opportunity_product');
}
}