-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: improve product version range migration
- Loading branch information
Showing
4 changed files
with
25 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,4 @@ services: | |
POSTGRES_PASSWORD: "trustify" | ||
POSTGRES_DB: "trustify" | ||
restart: always | ||
shm_size: '1g' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
migration/src/m0000800_alter_product_version_range_scheme/migration_down.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
WITH ranges_to_update AS ( | ||
SELECT version_range.* FROM | ||
version_range | ||
JOIN product_version_range ON version_range.id = product_version_range.version_range_id | ||
) | ||
UPDATE version_range | ||
SET version_scheme_id = 'semver' | ||
FROM ranges_to_update | ||
WHERE version_range.id = ranges_to_update.id |
9 changes: 9 additions & 0 deletions
9
migration/src/m0000800_alter_product_version_range_scheme/migration_up.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
WITH ranges_to_update AS ( | ||
SELECT version_range.* FROM | ||
version_range | ||
JOIN product_version_range ON version_range.id = product_version_range.version_range_id | ||
) | ||
UPDATE version_range | ||
SET version_scheme_id = 'rpm' | ||
FROM ranges_to_update | ||
WHERE version_range.id = ranges_to_update.id |