ops-hub-bootstrap
This commit is contained in:
parent
9cc03a0a87
commit
4025e8947d
3 changed files with 89 additions and 5 deletions
|
|
@ -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'
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue