From 672fa003ce1fcb28d4eed2ef2ef056ba23cff216 Mon Sep 17 00:00:00 2001
From: Fabrice Gangler <fabrice.gangler@adullact.org>
Date: Tue, 18 Mar 2025 11:17:57 +0100
Subject: [PATCH] fix: add first records to [ organization_type ] table

---
 webapp/migrations/Version20250312100203.php | 31 +++++++++++++++++++++
 1 file changed, 31 insertions(+)
 create mode 100644 webapp/migrations/Version20250312100203.php

diff --git a/webapp/migrations/Version20250312100203.php b/webapp/migrations/Version20250312100203.php
new file mode 100644
index 0000000..fc99945
--- /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');
+    }
+}
-- 
GitLab