Skip to content

Commit

Permalink
Added postgres to the AbstractMultiPlatformMigration class
Browse files Browse the repository at this point in the history
  • Loading branch information
jbtronics committed Jun 6, 2024
1 parent d202ecf commit 02acafc
Showing 30 changed files with 655 additions and 0 deletions.
10 changes: 10 additions & 0 deletions migrations/Version1.php
Original file line number Diff line number Diff line change
@@ -235,4 +235,14 @@ public function sqLiteDown(Schema $schema): void
{
$this->warnIf(true, "Migration not needed for SQLite. Skipping...");
}

public function postgreSQLUp(Schema $schema): void
{
$this->warnIf(true, "Migration not needed for Postgres. Skipping...");
}

public function postgreSQLDown(Schema $schema): void
{
$this->warnIf(true, "Migration not needed for Postgres. Skipping...");
}
}
10 changes: 10 additions & 0 deletions migrations/Version20190902140506.php
Original file line number Diff line number Diff line change
@@ -380,4 +380,14 @@ public function sqLiteDown(Schema $schema): void
{
$this->warnIf(true, "Migration not needed for SQLite. Skipping...");
}

public function postgreSQLUp(Schema $schema): void
{
$this->warnIf(true, "Migration not needed for Postgres. Skipping...");
}

public function postgreSQLDown(Schema $schema): void
{
$this->warnIf(true, "Migration not needed for Postgres. Skipping...");
}
}
10 changes: 10 additions & 0 deletions migrations/Version20190913141126.php
Original file line number Diff line number Diff line change
@@ -88,4 +88,14 @@ public function sqLiteDown(Schema $schema): void
{
$this->warnIf(true, "Migration not needed for SQLite. Skipping...");
}

public function postgreSQLUp(Schema $schema): void
{
$this->warnIf(true, "Migration not needed for Postgres. Skipping...");
}

public function postgreSQLDown(Schema $schema): void
{
$this->warnIf(true, "Migration not needed for Postgres. Skipping...");
}
}
10 changes: 10 additions & 0 deletions migrations/Version20190924113252.php
Original file line number Diff line number Diff line change
@@ -179,4 +179,14 @@ public function sqLiteDown(Schema $schema): void
{
$this->warnIf(true, "Migration not needed for SQLite. Skipping...");
}

public function postgreSQLUp(Schema $schema): void
{
$this->warnIf(true, "Migration not needed for Postgres. Skipping...");
}

public function postgreSQLDown(Schema $schema): void
{
$this->warnIf(true, "Migration not needed for Postgres. Skipping...");
}
}
10 changes: 10 additions & 0 deletions migrations/Version20191214153125.php
Original file line number Diff line number Diff line change
@@ -65,4 +65,14 @@ public function sqLiteDown(Schema $schema): void
{
$this->warnIf(true, "Migration not needed for SQLite. Skipping...");
}

public function postgreSQLUp(Schema $schema): void
{
$this->warnIf(true, "Migration not needed for Postgres. Skipping...");
}

public function postgreSQLDown(Schema $schema): void
{
$this->warnIf(true, "Migration not needed for Postgres. Skipping...");
}
}
10 changes: 10 additions & 0 deletions migrations/Version20200126191823.php
Original file line number Diff line number Diff line change
@@ -68,4 +68,14 @@ public function sqLiteDown(Schema $schema): void
{
$this->warnIf(true, "Migration not needed for SQLite. Skipping...");
}

public function postgreSQLUp(Schema $schema): void
{
$this->warnIf(true, "Migration not needed for Postgres. Skipping...");
}

public function postgreSQLDown(Schema $schema): void
{
$this->warnIf(true, "Migration not needed for Postgres. Skipping...");
}
}
10 changes: 10 additions & 0 deletions migrations/Version20200311204104.php
Original file line number Diff line number Diff line change
@@ -56,4 +56,14 @@ public function sqLiteDown(Schema $schema): void
{
$this->warnIf(true, "Migration not needed for SQLite. Skipping...");
}

public function postgreSQLUp(Schema $schema): void
{
$this->warnIf(true, "Migration not needed for Postgres. Skipping...");
}

public function postgreSQLDown(Schema $schema): void
{
$this->warnIf(true, "Migration not needed for Postgres. Skipping...");
}
}
10 changes: 10 additions & 0 deletions migrations/Version20200409130946.php
Original file line number Diff line number Diff line change
@@ -42,4 +42,14 @@ public function sqLiteDown(Schema $schema): void
{
$this->warnIf(true, "Migration not needed for SQLite. Skipping...");
}

public function postgreSQLUp(Schema $schema): void
{
$this->warnIf(true, "Migration not needed for Postgres. Skipping...");
}

public function postgreSQLDown(Schema $schema): void
{
$this->warnIf(true, "Migration not needed for Postgres. Skipping...");
}
}
10 changes: 10 additions & 0 deletions migrations/Version20200502161750.php
Original file line number Diff line number Diff line change
@@ -163,4 +163,14 @@ public function sqLiteDown(Schema $schema): void
$this->addSql('DROP TABLE u2f_keys');
$this->addSql('DROP TABLE "users"');
}

public function postgreSQLUp(Schema $schema): void
{
$this->warnIf(true, "Migration not needed for Postgres. Skipping...");
}

public function postgreSQLDown(Schema $schema): void
{
$this->warnIf(true, "Migration not needed for Postgres. Skipping...");
}
}
10 changes: 10 additions & 0 deletions migrations/Version20220925162725.php
Original file line number Diff line number Diff line change
@@ -535,4 +535,14 @@ public function sqLiteDown(Schema $schema): void
$this->addSql('CREATE INDEX IDX_1483A5E938248176 ON "users" (currency_id)');
$this->addSql('CREATE INDEX IDX_1483A5E96DEDCEC2 ON "users" (id_preview_attachement)');
}

public function postgreSQLUp(Schema $schema): void
{
$this->warnIf(true, "Migration not needed for Postgres. Skipping...");
}

public function postgreSQLDown(Schema $schema): void
{
$this->warnIf(true, "Migration not needed for Postgres. Skipping...");
}
}
10 changes: 10 additions & 0 deletions migrations/Version20221003212851.php
Original file line number Diff line number Diff line change
@@ -47,4 +47,14 @@ public function sqLiteDown(Schema $schema): void
{
$this->addSql('DROP TABLE webauthn_keys');
}

public function postgreSQLUp(Schema $schema): void
{
$this->warnIf(true, "Migration not needed for Postgres. Skipping...");
}

public function postgreSQLDown(Schema $schema): void
{
$this->warnIf(true, "Migration not needed for Postgres. Skipping...");
}
}
10 changes: 10 additions & 0 deletions migrations/Version20221114193325.php
Original file line number Diff line number Diff line change
@@ -171,4 +171,14 @@ public function setContainer(ContainerInterface $container = null)
$this->permission_presets_helper = $container->get(PermissionPresetsHelper::class);
}
}

public function postgreSQLUp(Schema $schema): void
{
$this->warnIf(true, "Migration not needed for Postgres. Skipping...");
}

public function postgreSQLDown(Schema $schema): void
{
$this->warnIf(true, "Migration not needed for Postgres. Skipping...");
}
}
10 changes: 10 additions & 0 deletions migrations/Version20221204004815.php
Original file line number Diff line number Diff line change
@@ -55,4 +55,14 @@ public function sqLiteDown(Schema $schema): void
$this->addSql('CREATE INDEX parts_idx_datet_name_last_id_needs ON "parts" (datetime_added, name, last_modified, id, needs_review)');
$this->addSql('CREATE INDEX parts_idx_name ON "parts" (name)');
}

public function postgreSQLUp(Schema $schema): void
{
$this->warnIf(true, "Migration not needed for Postgres. Skipping...");
}

public function postgreSQLDown(Schema $schema): void
{
$this->warnIf(true, "Migration not needed for Postgres. Skipping...");
}
}
9 changes: 9 additions & 0 deletions migrations/Version20221216224745.php
Original file line number Diff line number Diff line change
@@ -67,6 +67,15 @@ public function sqLiteDown(Schema $schema): void
$this->addSql('CREATE INDEX log_idx_type ON log (type)');
$this->addSql('CREATE INDEX log_idx_type_target ON log (type, target_type, target_id)');
$this->addSql('CREATE INDEX log_idx_datetime ON log (datetime)');
}

public function postgreSQLUp(Schema $schema): void
{
$this->warnIf(true, "Migration not needed for Postgres. Skipping...");
}

public function postgreSQLDown(Schema $schema): void
{
$this->warnIf(true, "Migration not needed for Postgres. Skipping...");
}
}
10 changes: 10 additions & 0 deletions migrations/Version20230108165410.php
Original file line number Diff line number Diff line change
@@ -320,4 +320,14 @@ public function sqLiteDown(Schema $schema): void
$this->addSql('ALTER TABLE projects RENAME TO devices');
$this->addSql('ALTER TABLE project_bom_entries RENAME TO device_parts');
}

public function postgreSQLUp(Schema $schema): void
{
$this->warnIf(true, "Migration not needed for Postgres. Skipping...");
}

public function postgreSQLDown(Schema $schema): void
{
$this->warnIf(true, "Migration not needed for Postgres. Skipping...");
}
}
10 changes: 10 additions & 0 deletions migrations/Version20230219225340.php
Original file line number Diff line number Diff line change
@@ -521,4 +521,14 @@ public function sqLiteDown(Schema $schema): void
$this->addSql('CREATE INDEX IDX_799FD143A76ED395 ON webauthn_keys (user_id)');
}

public function postgreSQLUp(Schema $schema): void
{
$this->warnIf(true, "Migration not needed for Postgres. Skipping...");
}

public function postgreSQLDown(Schema $schema): void
{
$this->warnIf(true, "Migration not needed for Postgres. Skipping...");
}

}
10 changes: 10 additions & 0 deletions migrations/Version20230220221024.php
Original file line number Diff line number Diff line change
@@ -37,4 +37,14 @@ public function sqLiteDown(Schema $schema): void
{
$this->addSql('ALTER TABLE `users` DROP saml_user');
}

public function postgreSQLUp(Schema $schema): void
{
$this->warnIf(true, "Migration not needed for Postgres. Skipping...");
}

public function postgreSQLDown(Schema $schema): void
{
$this->warnIf(true, "Migration not needed for Postgres. Skipping...");
}
}
10 changes: 10 additions & 0 deletions migrations/Version20230402170923.php
Original file line number Diff line number Diff line change
@@ -297,4 +297,14 @@ public function sqLiteDown(Schema $schema): void
$this->addSql('DROP TABLE __temp__webauthn_keys');
$this->addSql('CREATE INDEX IDX_799FD143A76ED395 ON webauthn_keys (user_id)');
}

public function postgreSQLUp(Schema $schema): void
{
$this->warnIf(true, "Migration not needed for Postgres. Skipping...");
}

public function postgreSQLDown(Schema $schema): void
{
$this->warnIf(true, "Migration not needed for Postgres. Skipping...");
}
}
10 changes: 10 additions & 0 deletions migrations/Version20230408170059.php
Original file line number Diff line number Diff line change
@@ -49,4 +49,14 @@ public function sqLiteDown(Schema $schema): void
$this->addSql('CREATE INDEX IDX_1483A5E9EA7100A1 ON "users" (id_preview_attachment)');
$this->addSql('CREATE INDEX user_idx_username ON "users" (name)');
}

public function postgreSQLUp(Schema $schema): void
{
$this->warnIf(true, "Migration not needed for Postgres. Skipping...");
}

public function postgreSQLDown(Schema $schema): void
{
$this->warnIf(true, "Migration not needed for Postgres. Skipping...");
}
}
10 changes: 10 additions & 0 deletions migrations/Version20230408213957.php
Original file line number Diff line number Diff line change
@@ -434,4 +434,14 @@ public function sqLiteDown(Schema $schema): void
$this->addSql('DROP TABLE __temp__webauthn_keys');
$this->addSql('CREATE INDEX IDX_799FD143A76ED395 ON webauthn_keys (user_id)');
}

public function postgreSQLUp(Schema $schema): void
{
$this->warnIf(true, "Migration not needed for Postgres. Skipping...");
}

public function postgreSQLDown(Schema $schema): void
{
$this->warnIf(true, "Migration not needed for Postgres. Skipping...");
}
}
10 changes: 10 additions & 0 deletions migrations/Version20230417211732.php
Original file line number Diff line number Diff line change
@@ -45,4 +45,14 @@ public function sqLiteDown(Schema $schema): void
{
//As we done nothing, we don't need to implement this method.
}

public function postgreSQLUp(Schema $schema): void
{
$this->warnIf(true, "Migration not needed for Postgres. Skipping...");
}

public function postgreSQLDown(Schema $schema): void
{
$this->warnIf(true, "Migration not needed for Postgres. Skipping...");
}
}
10 changes: 10 additions & 0 deletions migrations/Version20230528000149.php
Original file line number Diff line number Diff line change
@@ -62,4 +62,14 @@ public function sqLiteDown(Schema $schema): void
$this->addSql('DROP TABLE __temp__webauthn_keys');
$this->addSql('CREATE INDEX IDX_799FD143A76ED395 ON webauthn_keys (user_id)');
}

public function postgreSQLUp(Schema $schema): void
{
$this->warnIf(true, "Migration not needed for Postgres. Skipping...");
}

public function postgreSQLDown(Schema $schema): void
{
$this->warnIf(true, "Migration not needed for Postgres. Skipping...");
}
}
10 changes: 10 additions & 0 deletions migrations/Version20230716184033.php
Original file line number Diff line number Diff line change
@@ -348,4 +348,14 @@ public function sqLiteDown(Schema $schema): void
$this->addSql('DROP TABLE __temp__webauthn_keys');
$this->addSql('CREATE INDEX IDX_799FD143A76ED395 ON webauthn_keys (user_id)');
}

public function postgreSQLUp(Schema $schema): void
{
$this->warnIf(true, "Migration not needed for Postgres. Skipping...");
}

public function postgreSQLDown(Schema $schema): void
{
$this->warnIf(true, "Migration not needed for Postgres. Skipping...");
}
}
10 changes: 10 additions & 0 deletions migrations/Version20230730131708.php
Original file line number Diff line number Diff line change
@@ -99,4 +99,14 @@ public function sqLiteDown(Schema $schema): void
$this->addSql('CREATE INDEX parts_idx_name ON "parts" (name)');
$this->addSql('CREATE INDEX parts_idx_ipn ON "parts" (ipn)');
}

public function postgreSQLUp(Schema $schema): void
{
$this->warnIf(true, "Migration not needed for Postgres. Skipping...");
}

public function postgreSQLDown(Schema $schema): void
{
$this->warnIf(true, "Migration not needed for Postgres. Skipping...");
}
}
10 changes: 10 additions & 0 deletions migrations/Version20230816213201.php
Original file line number Diff line number Diff line change
@@ -41,4 +41,14 @@ public function sqLiteDown(Schema $schema): void
{
$this->addSql('DROP TABLE api_tokens');
}

public function postgreSQLUp(Schema $schema): void
{
$this->warnIf(true, "Migration not needed for Postgres. Skipping...");
}

public function postgreSQLDown(Schema $schema): void
{
$this->warnIf(true, "Migration not needed for Postgres. Skipping...");
}
}
10 changes: 10 additions & 0 deletions migrations/Version20231114223101.php
Original file line number Diff line number Diff line change
@@ -68,4 +68,14 @@ public function sqLiteDown(Schema $schema): void
$this->addSql('CREATE INDEX part_lots_idx_instock_un_expiration_id_part ON part_lots (instock_unknown, expiration_date, id_part)');
$this->addSql('CREATE INDEX part_lots_idx_needs_refill ON part_lots (needs_refill)');
}

public function postgreSQLUp(Schema $schema): void
{
$this->warnIf(true, "Migration not needed for Postgres. Skipping...");
}

public function postgreSQLDown(Schema $schema): void
{
$this->warnIf(true, "Migration not needed for Postgres. Skipping...");
}
}
Loading

0 comments on commit 02acafc

Please sign in to comment.