migrations/Version20240709074722.php line 1

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace DoctrineMigrations;
  4. use Doctrine\DBAL\Schema\Schema;
  5. use Doctrine\Migrations\AbstractMigration;
  6. /**
  7.  * Auto-generated Migration: Please modify to your needs!
  8.  */
  9. final class Version20240709074722 extends AbstractMigration
  10. {
  11.     public function getDescription(): string
  12.     {
  13.         return 'Adds initial data to dict_road_occupation_type table';
  14.     }
  15.     public function up(Schema $schema): void
  16.     {
  17.         $this->addSql("
  18.             INSERT INTO dict_road_occupation_type (id, name, code) VALUES
  19.             (gen_random_uuid(), 'Roboty', 'roboty'),
  20.             (gen_random_uuid(), 'Roboty związane z bud. inf. telekom.', 'roboty_telekom')
  21.         ");
  22.     }
  23.     public function down(Schema $schema): void
  24.     {
  25.         $this->addSql("
  26.             DELETE FROM dict_road_occupation_type 
  27.             WHERE name IN ('Roboty', 'Roboty związane z bud. inf. telekom.')
  28.         ");
  29.     }
  30. }