-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
45 additions
and
0 deletions.
There are no files selected for viewing
45 changes: 45 additions & 0 deletions
45
registry/migrations/20240807190128_add-missing-shared-libraries.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,45 @@ | ||
-- Add the library for pg_search | ||
WITH trunk_project_cte AS ( | ||
SELECT id | ||
FROM v1.trunk_project_versions | ||
WHERE trunk_project_name = 'pg_search' | ||
AND version = '0.7.3' | ||
), | ||
extension_version_cte AS ( | ||
SELECT ev.id | ||
FROM v1.extension_versions ev | ||
JOIN trunk_project_cte tpv ON ev.trunk_project_version_id = tpv.id | ||
WHERE ev.extension_name = 'pg_search' | ||
) | ||
INSERT INTO v1.extensions_loadable_libraries ( | ||
extension_version_id, library_name, requires_restart, priority | ||
) | ||
SELECT ev.id, 'pg_search', true, 2147483647 | ||
FROM extension_version_cte ev | ||
ON CONFLICT (extension_version_id, library_name) | ||
DO UPDATE SET | ||
requires_restart = EXCLUDED.requires_restart, | ||
priority = EXCLUDED.priority; | ||
|
||
-- Add the library for vectorize | ||
WITH trunk_project_cte AS ( | ||
SELECT id | ||
FROM v1.trunk_project_versions | ||
WHERE trunk_project_name = 'vectorize' | ||
AND version = '0.17.0' | ||
), | ||
extension_version_cte AS ( | ||
SELECT ev.id | ||
FROM v1.extension_versions ev | ||
JOIN trunk_project_cte tpv ON ev.trunk_project_version_id = tpv.id | ||
WHERE ev.extension_name = 'vectorize' | ||
) | ||
INSERT INTO v1.extensions_loadable_libraries ( | ||
extension_version_id, library_name, requires_restart, priority | ||
) | ||
SELECT ev.id, 'vectorize', true, 2147483647 | ||
FROM extension_version_cte ev | ||
ON CONFLICT (extension_version_id, library_name) | ||
DO UPDATE SET | ||
requires_restart = EXCLUDED.requires_restart, | ||
priority = EXCLUDED.priority; |