generated from coulomb/repo-seed
ops-hub-bootstrap
This commit is contained in:
@@ -23,6 +23,25 @@ SET name = EXCLUDED.name,
|
||||
domain = EXCLUDED.domain,
|
||||
hub_kind = EXCLUDED.hub_kind;
|
||||
|
||||
-- Newer inter-hub schemas have first-class VSM metadata columns. Keep this
|
||||
-- block conditional so the bootstrap still works against an older deployment
|
||||
-- where the metadata is only carried by the manifest description.
|
||||
DO $$
|
||||
BEGIN
|
||||
IF EXISTS (
|
||||
SELECT 1
|
||||
FROM information_schema.columns
|
||||
WHERE table_name = 'hubs'
|
||||
AND column_name = 'hub_family'
|
||||
) THEN
|
||||
UPDATE hubs
|
||||
SET hub_family = 'vsm',
|
||||
vsm_function = 'OPS',
|
||||
vsm_system = '1'
|
||||
WHERE slug = 'ops-hub';
|
||||
END IF;
|
||||
END $$;
|
||||
|
||||
WITH hub AS (
|
||||
SELECT id FROM hubs WHERE slug = 'ops-hub'
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user