<?php
declare(strict_types=1);
namespace LabelsBundleMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
final class Version20240910134237 extends AbstractMigration
{
public function up(Schema $schema): void
{
$this->addSql('CREATE TABLE labels_bundle__print_waiting_list (id BINARY(16) NOT NULL COMMENT \'(DC2Type:uuid)\', label_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', template_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', created_by_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', updated_by_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', deleted_by_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', quantity INT DEFAULT NULL, status INT DEFAULT 0 NOT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, deleted_at DATETIME DEFAULT NULL, INDEX IDX_7F1F8A4933B92F39 (label_id), INDEX IDX_7F1F8A497975B7E7 (template_id), INDEX IDX_7F1F8A49B03A8386 (created_by_id), INDEX IDX_7F1F8A49896DBBDE (updated_by_id), INDEX IDX_7F1F8A49C76F1F52 (deleted_by_id), INDEX status (status), INDEX deleted_at (deleted_at), INDEX created_at (created_at), INDEX updated_at (updated_at), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE labels_bundle__print_waiting_list ADD CONSTRAINT FK_7F1F8A4933B92F39 FOREIGN KEY (label_id) REFERENCES labels_bundle__label (id)');
$this->addSql('ALTER TABLE labels_bundle__print_waiting_list ADD CONSTRAINT FK_7F1F8A497975B7E7 FOREIGN KEY (template_id) REFERENCES labels_bundle__template (id)');
$this->addSql('ALTER TABLE labels_bundle__print_waiting_list ADD CONSTRAINT FK_7F1F8A49B03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE labels_bundle__print_waiting_list ADD CONSTRAINT FK_7F1F8A49896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE labels_bundle__print_waiting_list ADD CONSTRAINT FK_7F1F8A49C76F1F52 FOREIGN KEY (deleted_by_id) REFERENCES user (id)');
}
public function down(Schema $schema): void
{
$this->addSql('ALTER TABLE labels_bundle__print_waiting_list DROP FOREIGN KEY FK_7F1F8A4933B92F39');
$this->addSql('ALTER TABLE labels_bundle__print_waiting_list DROP FOREIGN KEY FK_7F1F8A497975B7E7');
$this->addSql('ALTER TABLE labels_bundle__print_waiting_list DROP FOREIGN KEY FK_7F1F8A49B03A8386');
$this->addSql('ALTER TABLE labels_bundle__print_waiting_list DROP FOREIGN KEY FK_7F1F8A49896DBBDE');
$this->addSql('ALTER TABLE labels_bundle__print_waiting_list DROP FOREIGN KEY FK_7F1F8A49C76F1F52');
$this->addSql('DROP TABLE labels_bundle__print_waiting_list');
}
}