Skip to content
Snippets Groups Projects
Commit 672fa003 authored by Fabrice Gangler's avatar Fabrice Gangler :art:
Browse files

fix: add first records to [ organization_type ] table

parent 9ccd4f3d
No related branches found
No related tags found
No related merge requests found
<?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');
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment