@nextsparkjs/theme-default 0.1.0-beta.164 → 0.1.0-beta.167
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.
|
@@ -1,39 +1,31 @@
|
|
|
1
1
|
-- Migration: 089_add_editor_team_role.sql
|
|
2
|
-
-- Description:
|
|
2
|
+
-- Description: (No-op) 'editor' team role — now config-driven, no DDL required
|
|
3
3
|
-- Date: 2025-12-24
|
|
4
4
|
-- Theme: default
|
|
5
5
|
-- Phase: Theme extension - demonstrates extensible team roles system
|
|
6
6
|
--
|
|
7
|
-
--
|
|
8
|
-
--
|
|
7
|
+
-- HISTORICAL NOTE:
|
|
8
|
+
-- This migration used to run `ALTER TYPE team_role ADD VALUE 'editor'` because
|
|
9
|
+
-- team roles were a Postgres ENUM. As of core beta.167, `team_members.role` /
|
|
10
|
+
-- `team_invitations.role` are TEXT (see core migration 007), so themes extend
|
|
11
|
+
-- team roles purely via config — no DB DDL, no ENUM patching.
|
|
9
12
|
--
|
|
10
|
-
--
|
|
11
|
-
--
|
|
12
|
-
|
|
13
|
-
--
|
|
14
|
-
--
|
|
15
|
-
ALTER TYPE team_role ADD VALUE IF NOT EXISTS 'editor';
|
|
13
|
+
-- The 'editor' role is declared in this theme's config:
|
|
14
|
+
-- - app.config.ts -> availableTeamRoles
|
|
15
|
+
-- - config/permissions.config.ts -> roles.additionalRoles + entity permissions
|
|
16
|
+
--
|
|
17
|
+
-- This file is kept as a no-op so the migration sequence/tracking stays stable.
|
|
16
18
|
|
|
17
|
-
-- Success message
|
|
18
19
|
DO $$
|
|
19
20
|
BEGIN
|
|
20
21
|
RAISE NOTICE '';
|
|
21
22
|
RAISE NOTICE '════════════════════════════════════════════════════════════';
|
|
22
|
-
RAISE NOTICE ' Migration 089_add_editor_team_role.sql
|
|
23
|
+
RAISE NOTICE ' Migration 089_add_editor_team_role.sql (no-op)';
|
|
23
24
|
RAISE NOTICE '════════════════════════════════════════════════════════════';
|
|
24
25
|
RAISE NOTICE '';
|
|
25
|
-
RAISE NOTICE '
|
|
26
|
-
RAISE NOTICE '';
|
|
27
|
-
RAISE NOTICE '
|
|
28
|
-
RAISE NOTICE ' owner: 100 (protected)';
|
|
29
|
-
RAISE NOTICE ' admin: 50';
|
|
30
|
-
RAISE NOTICE ' member: 10';
|
|
31
|
-
RAISE NOTICE ' editor: 5 (NEW)';
|
|
32
|
-
RAISE NOTICE ' viewer: 1';
|
|
33
|
-
RAISE NOTICE '';
|
|
34
|
-
RAISE NOTICE ' Editor permissions (defined in app.config.ts):';
|
|
35
|
-
RAISE NOTICE ' - team.view';
|
|
36
|
-
RAISE NOTICE ' - team.members.view';
|
|
26
|
+
RAISE NOTICE ' ℹ️ team_members.role is now TEXT (core 007).';
|
|
27
|
+
RAISE NOTICE ' ℹ️ The "editor" role is config-driven (availableTeamRoles +';
|
|
28
|
+
RAISE NOTICE ' permissions.config.ts) — no ALTER TYPE needed.';
|
|
37
29
|
RAISE NOTICE '';
|
|
38
30
|
RAISE NOTICE '════════════════════════════════════════════════════════════';
|
|
39
31
|
END $$;
|