spine-framework 0.3.0 → 0.3.1

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.
@@ -862,6 +862,15 @@ CREATE UNIQUE INDEX IF NOT EXISTS idx_roles_slug_no_app
862
862
  CREATE UNIQUE INDEX IF NOT EXISTS idx_roles_slug_with_app
863
863
  ON public.roles (app_id, slug)
864
864
  WHERE app_id IS NOT NULL;
865
+ -- Non-partial unique constraint required for PostgREST ON CONFLICT upsert on (app_id, slug)
866
+ DO $$ BEGIN
867
+ IF NOT EXISTS (
868
+ SELECT 1 FROM pg_constraint
869
+ WHERE conname = 'roles_app_id_slug_key' AND conrelid = 'public.roles'::regclass
870
+ ) THEN
871
+ ALTER TABLE public.roles ADD CONSTRAINT roles_app_id_slug_key UNIQUE (app_id, slug);
872
+ END IF;
873
+ END $$;
865
874
 
866
875
  CREATE INDEX IF NOT EXISTS idx_se_account ON public.schedule_executions (account_id);
867
876
  CREATE INDEX IF NOT EXISTS idx_se_schedule ON public.schedule_executions (schedule_id);
@@ -1279,6 +1288,22 @@ BEGIN
1279
1288
  END;
1280
1289
  $$;
1281
1290
 
1291
+ -- ---------------------------------------------------------------------------
1292
+ -- App Installations
1293
+ -- Tracks which apps have been installed via `spine-framework install-app`
1294
+ -- ---------------------------------------------------------------------------
1295
+ CREATE TABLE IF NOT EXISTS public.app_installations (
1296
+ id uuid PRIMARY KEY DEFAULT gen_random_uuid(),
1297
+ app_slug text NOT NULL,
1298
+ account_id uuid,
1299
+ is_enabled boolean DEFAULT true,
1300
+ installed_version text,
1301
+ package_name text,
1302
+ created_at timestamptz DEFAULT now(),
1303
+ updated_at timestamptz DEFAULT now(),
1304
+ UNIQUE (app_slug, account_id)
1305
+ );
1306
+
1282
1307
  -- ---------------------------------------------------------------------------
1283
1308
  -- Role Grants
1284
1309
  -- Raw SQL migrations bypass Supabase's automatic grant setup. These grants
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spine-framework",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "private": false,
5
5
  "description": "Spine — enterprise application framework built on Supabase + Netlify + React",
6
6
  "type": "module",