<?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 Version20241115145444 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_76D0AC9A896DBBDE');
$this->addSql('ALTER TABLE shipments_bundle__printer DROP FOREIGN KEY FK_76D0AC9AB03A8386');
$this->addSql('ALTER TABLE shipments_bundle__printer DROP FOREIGN KEY FK_76D0AC9AC76F1F52');
$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 labels_bundle__print_waiting_list RENAME INDEX idx_7f1f8a497975b7e7 TO IDX_7F1F8A495DA0FB8');
$this->addSql('ALTER TABLE products_bundle__declination_context CHANGE is_default is_default TINYINT(1) NOT NULL');
$this->addSql('ALTER TABLE sales_bundle__relaunch_level CHANGE send_notification send_notification TINYINT(1) DEFAULT 0 NOT NULL');
$this->addSql('ALTER TABLE tickets_bundle__ticket_state ADD task_state_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\'');
$this->addSql('ALTER TABLE tickets_bundle__ticket_state ADD CONSTRAINT FK_D5EB48964518D68D FOREIGN KEY (task_state_id) REFERENCES projects_bundle__task_state (id)');
$this->addSql('CREATE INDEX IDX_D5EB48964518D68D ON tickets_bundle__ticket_state (task_state_id)');
}
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 updated_at (updated_at), INDEX name (name), INDEX IDX_CE72EEE1B03A8386 (created_by_id), INDEX deleted_at (deleted_at), INDEX IDX_CE72EEE1896DBBDE (updated_by_id), INDEX created_at (created_at), INDEX IDX_CE72EEE1C76F1F52 (deleted_by_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
$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 shipments_bundle__printer ADD CONSTRAINT FK_76D0AC9AC76F1F52 FOREIGN KEY (deleted_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 products_bundle__declination_context CHANGE is_default is_default TINYINT(1) DEFAULT 0 NOT NULL');
$this->addSql('ALTER TABLE labels_bundle__print_waiting_list RENAME INDEX idx_7f1f8a495da0fb8 TO IDX_7F1F8A497975B7E7');
$this->addSql('ALTER TABLE tickets_bundle__ticket_state DROP FOREIGN KEY FK_D5EB48964518D68D');
$this->addSql('DROP INDEX IDX_D5EB48964518D68D ON tickets_bundle__ticket_state');
$this->addSql('ALTER TABLE tickets_bundle__ticket_state DROP task_state_id');
$this->addSql('ALTER TABLE sales_bundle__relaunch_level CHANGE send_notification send_notification TINYINT(1) NOT NULL');
}
}