<?php
declare(strict_types=1);
namespace CoreMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20240624071307 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 shipments_bundle__printer DROP FOREIGN KEY FK_76D0AC9AC76F1F52');
$this->addSql('ALTER TABLE shipments_bundle__printer DROP FOREIGN KEY FK_76D0AC9A896DBBDE');
$this->addSql('ALTER TABLE shipments_bundle__printer DROP FOREIGN KEY FK_76D0AC9AB03A8386');
$this->addSql('ALTER TABLE labels_bundle__printer DROP FOREIGN KEY FK_CE72EEE1B03A8386');
$this->addSql('ALTER TABLE labels_bundle__printer DROP FOREIGN KEY FK_CE72EEE1C76F1F52');
$this->addSql('ALTER TABLE labels_bundle__printer DROP FOREIGN KEY FK_CE72EEE1896DBBDE');
$this->addSql('DROP TABLE shipments_bundle__printer');
$this->addSql('DROP TABLE labels_bundle__printer');
$this->addSql('ALTER TABLE cash_register_bundle__cash_register DROP printer_name');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('CREATE TABLE shipments_bundle__printer (id BINARY(16) NOT 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)\', name VARCHAR(128) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, type VARCHAR(50) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, deleted_at DATETIME DEFAULT NULL, INDEX created_at (created_at), INDEX IDX_76D0AC9AC76F1F52 (deleted_by_id), INDEX updated_at (updated_at), INDEX name (name), INDEX IDX_76D0AC9AB03A8386 (created_by_id), INDEX deleted_at (deleted_at), INDEX IDX_76D0AC9A896DBBDE (updated_by_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('CREATE TABLE labels_bundle__printer (id BINARY(16) NOT 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)\', name VARCHAR(128) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, deleted_at DATETIME DEFAULT NULL, INDEX IDX_CE72EEE1896DBBDE (updated_by_id), INDEX created_at (created_at), INDEX IDX_CE72EEE1C76F1F52 (deleted_by_id), INDEX updated_at (updated_at), INDEX name (name), INDEX IDX_CE72EEE1B03A8386 (created_by_id), INDEX deleted_at (deleted_at), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('ALTER TABLE shipments_bundle__printer ADD CONSTRAINT FK_76D0AC9AC76F1F52 FOREIGN KEY (deleted_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE shipments_bundle__printer ADD CONSTRAINT FK_76D0AC9A896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE shipments_bundle__printer ADD CONSTRAINT FK_76D0AC9AB03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE labels_bundle__printer ADD CONSTRAINT FK_CE72EEE1B03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE labels_bundle__printer ADD CONSTRAINT FK_CE72EEE1C76F1F52 FOREIGN KEY (deleted_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE labels_bundle__printer ADD CONSTRAINT FK_CE72EEE1896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE cash_register_bundle__cash_register ADD printer_name VARCHAR(256) DEFAULT NULL');
}
}