Create an event budget kind admin entity

This commit is contained in:
2025-05-05 14:27:17 +02:00
parent bb71e084b8
commit 5d94bf0556
11 changed files with 319 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
<?php
declare(strict_types=1);
namespace Chill\Migrations\Event;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
final class Version20250505120818 extends AbstractMigration
{
public function getDescription(): string
{
return 'Add budget kind admin entity';
}
public function up(Schema $schema): void
{
$this->addSql(<<<'SQL'
CREATE SEQUENCE chill_event_budget_element_kind_id_seq INCREMENT BY 1 MINVALUE 1 START 1
SQL);
$this->addSql(<<<'SQL'
CREATE TABLE chill_event_budget_element_kind (id INT NOT NULL, isActive BOOLEAN DEFAULT true NOT NULL, type VARCHAR(255) NOT NULL, name JSONB DEFAULT '{}' NOT NULL, PRIMARY KEY(id))
SQL);
}
public function down(Schema $schema): void
{
$this->addSql(<<<'SQL'
DROP SEQUENCE chill_event_budget_element_kind_id_seq CASCADE
SQL);
$this->addSql(<<<'SQL'
DROP TABLE chill_event_budget_element_kind
SQL);
}
}