diff --git a/webapp/migrations/Version20250312100203.php b/webapp/migrations/Version20250312100203.php new file mode 100644 index 0000000000000000000000000000000000000000..fc99945272a6d4cdf67fb6c65f758efd50f7ff41 --- /dev/null +++ b/webapp/migrations/Version20250312100203.php @@ -0,0 +1,31 @@ +<?php + +declare(strict_types=1); + +namespace DoctrineMigrations; + +use Doctrine\DBAL\Schema\Schema; +use Doctrine\Migrations\AbstractMigration; + +final class Version20250312100203 extends AbstractMigration +{ + public function getDescription(): string + { + return 'Add first records to [ organization_type ] table'; + } + + public function up(Schema $schema): void + { + $this->addSql('INSERT INTO "organization_type" (id, name) VALUES (1, \'public_sector\')' ); + $this->addSql('INSERT INTO "organization_type" (id, name) VALUES (2, \'no_profit\')' ); + $this->addSql('INSERT INTO "organization_type" (id, name) VALUES (3, \'company\')' ); + } + + public function down(Schema $schema): void + { + $this->addSql('DELETE FROM "organization_type" WHERE id = 1' ); + $this->addSql('DELETE FROM "organization_type" WHERE id = 2' ); + $this->addSql('DELETE FROM "organization_type" WHERE id = 3' ); + $this->addSql('CREATE SCHEMA public'); + } +}