Skip to content

Commit

Permalink
Merge pull request #1618 from ConductionNL/feature/migration-version-…
Browse files Browse the repository at this point in the history
…default

Fix last version migration to set version fields that are null to: 0.0.0
  • Loading branch information
WilcoLouwerse authored Feb 12, 2024
2 parents 346d2d4 + dab7204 commit 42c2553
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions api/migrations/Version20240109135300.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,29 @@ public function getDescription(): string

public function up(Schema $schema): void
{
$this->addSql('UPDATE action SET version = \'0.0.0\' WHERE version IS NULL');
$this->addSql('ALTER TABLE action ALTER version SET DEFAULT \'0.0.0\'');
$this->addSql('UPDATE application SET version = \'0.0.0\' WHERE version IS NULL');
$this->addSql('ALTER TABLE application ALTER version SET DEFAULT \'0.0.0\'');
$this->addSql('UPDATE collection_entity SET version = \'0.0.0\' WHERE version IS NULL');
$this->addSql('ALTER TABLE collection_entity ALTER version SET DEFAULT \'0.0.0\'');
$this->addSql('UPDATE cronjob SET version = \'0.0.0\' WHERE version IS NULL');
$this->addSql('ALTER TABLE cronjob ALTER version SET DEFAULT \'0.0.0\'');
$this->addSql('UPDATE endpoint SET version = \'0.0.0\' WHERE version IS NULL');
$this->addSql('ALTER TABLE endpoint ALTER version SET DEFAULT \'0.0.0\'');
$this->addSql('UPDATE entity SET version = \'0.0.0\' WHERE version IS NULL');
$this->addSql('ALTER TABLE entity ALTER version SET DEFAULT \'0.0.0\'');
$this->addSql('UPDATE gateway SET version = \'0.0.0\' WHERE version IS NULL');
$this->addSql('ALTER TABLE gateway ALTER version SET DEFAULT \'0.0.0\'');
$this->addSql('UPDATE mapping SET version = \'0.0.0\' WHERE version IS NULL');
$this->addSql('ALTER TABLE mapping ALTER version SET DEFAULT \'0.0.0\'');
$this->addSql('UPDATE organization SET version = \'0.0.0\' WHERE version IS NULL');
$this->addSql('ALTER TABLE organization ALTER version SET DEFAULT \'0.0.0\'');
$this->addSql('UPDATE security_group SET version = \'0.0.0\' WHERE version IS NULL');
$this->addSql('ALTER TABLE security_group ALTER version SET DEFAULT \'0.0.0\'');
$this->addSql('UPDATE template SET version = \'0.0.0\' WHERE version IS NULL');
$this->addSql('ALTER TABLE template ALTER version SET DEFAULT \'0.0.0\'');
$this->addSql('UPDATE "user" SET version = \'0.0.0\' WHERE version IS NULL');
$this->addSql('ALTER TABLE "user" ALTER version SET DEFAULT \'0.0.0\'');
}

Expand Down

0 comments on commit 42c2553

Please sign in to comment.