<?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 Version20221012085901 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 dhl_bundle__package_type (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(255) NOT NULL, weight NUMERIC(20, 6) NOT NULL, width NUMERIC(20, 6) NOT NULL, height NUMERIC(20, 6) NOT NULL, depth NUMERIC(20, 6) NOT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, deleted_at DATETIME DEFAULT NULL, INDEX IDX_E0041E8AB03A8386 (created_by_id), INDEX IDX_E0041E8A896DBBDE (updated_by_id), INDEX IDX_E0041E8AC76F1F52 (deleted_by_id), INDEX name (name), INDEX weight (weight), INDEX width (width), INDEX height (height), INDEX depth (depth), 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 dhl_bundle__package_type ADD CONSTRAINT FK_E0041E8AB03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE dhl_bundle__package_type ADD CONSTRAINT FK_E0041E8A896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE dhl_bundle__package_type ADD CONSTRAINT FK_E0041E8AC76F1F52 FOREIGN KEY (deleted_by_id) REFERENCES user (id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE dhl_bundle__package_type DROP FOREIGN KEY FK_E0041E8AB03A8386');
$this->addSql('ALTER TABLE dhl_bundle__package_type DROP FOREIGN KEY FK_E0041E8A896DBBDE');
$this->addSql('ALTER TABLE dhl_bundle__package_type DROP FOREIGN KEY FK_E0041E8AC76F1F52');
$this->addSql('DROP TABLE dhl_bundle__package_type');
}
}