spine-framework 0.3.143 → 0.3.145
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
-- Add required_roles jsonb column to apps table for get_account_apps filtering.
|
|
2
|
+
ALTER TABLE public.apps
|
|
3
|
+
ADD COLUMN IF NOT EXISTS required_roles jsonb DEFAULT '[]'::jsonb;
|
|
4
|
+
|
|
5
|
+
-- Backfill required_roles from existing min_role values.
|
|
6
|
+
UPDATE public.apps
|
|
7
|
+
SET required_roles = jsonb_build_array(min_role)
|
|
8
|
+
WHERE min_role IS NOT NULL
|
|
9
|
+
AND (required_roles = '[]'::jsonb OR required_roles IS NULL);
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
-- Enforce global uniqueness of type slugs across all apps.
|
|
2
|
+
-- This lets multiple apps share the same kind/slug (e.g. funnel_signal, support_ticket)
|
|
3
|
+
-- and makes resolveTypeId/resolveTypeRecord .single() lookups deterministic.
|
|
4
|
+
CREATE UNIQUE INDEX IF NOT EXISTS types_kind_slug_unique
|
|
5
|
+
ON public.types (kind, slug);
|