<?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 Version20240724100556 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 dict_road_occupation_unit_fee (id UUID NOT NULL, created_by UUID DEFAULT NULL, updated_by UUID DEFAULT NULL, name VARCHAR(255) NOT NULL, code VARCHAR(255) NOT NULL, fee VARCHAR(255) NOT NULL, created_at TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL, updated_at TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL, deleted_at TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL, PRIMARY KEY(id))');
$this->addSql('CREATE UNIQUE INDEX UNIQ_710393025E237E06 ON dict_road_occupation_unit_fee (name)');
$this->addSql('CREATE UNIQUE INDEX UNIQ_7103930277153098 ON dict_road_occupation_unit_fee (code)');
$this->addSql('CREATE UNIQUE INDEX UNIQ_71039302964964B5 ON dict_road_occupation_unit_fee (fee)');
$this->addSql('CREATE INDEX IDX_71039302DE12AB56 ON dict_road_occupation_unit_fee (created_by)');
$this->addSql('CREATE INDEX IDX_7103930216FE72E1 ON dict_road_occupation_unit_fee (updated_by)');
$this->addSql('COMMENT ON COLUMN dict_road_occupation_unit_fee.id IS \'(DC2Type:uuid)\'');
$this->addSql('COMMENT ON COLUMN dict_road_occupation_unit_fee.created_by IS \'(DC2Type:uuid)\'');
$this->addSql('COMMENT ON COLUMN dict_road_occupation_unit_fee.updated_by IS \'(DC2Type:uuid)\'');
$this->addSql('ALTER TABLE dict_road_occupation_unit_fee ADD CONSTRAINT FK_71039302DE12AB56 FOREIGN KEY (created_by) REFERENCES "user" (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE dict_road_occupation_unit_fee ADD CONSTRAINT FK_7103930216FE72E1 FOREIGN KEY (updated_by) REFERENCES "user" (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('CREATE SCHEMA public');
$this->addSql('ALTER TABLE dict_road_occupation_unit_fee DROP CONSTRAINT FK_71039302DE12AB56');
$this->addSql('ALTER TABLE dict_road_occupation_unit_fee DROP CONSTRAINT FK_7103930216FE72E1');
$this->addSql('DROP TABLE dict_road_occupation_unit_fee');
}
}