<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
final class Version20250114191512 extends AbstractMigration
{
public function getDescription(): string
{
return 'Add dict_property_legal_title data';
}
public function up(Schema $schema): void
{
$this->addSql("INSERT INTO dict_property_legal_title (id, name, code) VALUES (gen_random_uuid(), 'Właściciel', 'wlasciciel')");
$this->addSql("INSERT INTO dict_property_legal_title (id, name, code) VALUES (gen_random_uuid(), 'Użytkownik wieczysty', 'uzytkownik_wieczysty')");
$this->addSql("INSERT INTO dict_property_legal_title (id, name, code) VALUES (gen_random_uuid(), 'Użytkownik', 'uzytkownik')");
$this->addSql("INSERT INTO dict_property_legal_title (id, name, code) VALUES (gen_random_uuid(), 'Zarządca', 'zarzadca')");
$this->addSql("INSERT INTO dict_property_legal_title (id, name, code) VALUES (gen_random_uuid(), 'Dzierżawca', 'dzierzawca')");
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql("DELETE FROM dict_applicant_type WHERE code IN ('wlasciciel', 'uzytkownik_wieczysty', 'uzytkownik', 'zarzadca', 'dzierzawca')");
}
}