<?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 Version20221210151801 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('CREATE TABLE cal_inventory_proxy (id INT AUTO_INCREMENT NOT NULL, inventory_id INT DEFAULT NULL, document_id INT DEFAULT NULL, status VARCHAR(50) NOT NULL, firstname VARCHAR(255) NOT NULL, lastname VARCHAR(255) NOT NULL, email VARCHAR(255) NOT NULL, address VARCHAR(255) NOT NULL, created_at DATETIME NOT NULL, INDEX IDX_C2385A139EEA759 (inventory_id), UNIQUE INDEX UNIQ_C2385A13C33F7837 (document_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE cal_inventory_proxy ADD CONSTRAINT FK_C2385A139EEA759 FOREIGN KEY (inventory_id) REFERENCES cal_inventory (id)');
$this->addSql('ALTER TABLE cal_inventory_proxy ADD CONSTRAINT FK_C2385A13C33F7837 FOREIGN KEY (document_id) REFERENCES cal_booking_document (id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE cal_inventory_proxy DROP FOREIGN KEY FK_C2385A139EEA759');
$this->addSql('ALTER TABLE cal_inventory_proxy DROP FOREIGN KEY FK_C2385A13C33F7837');
$this->addSql('DROP TABLE cal_inventory_proxy');
}
}