@pgpm/metaschema-modules 0.28.5 → 0.29.0
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.
- package/deploy/schemas/metaschema_modules_public/tables/config_secrets_module/table.sql +6 -9
- package/deploy/schemas/metaschema_modules_public/tables/config_secrets_user_module/table.sql +1 -6
- package/deploy/schemas/metaschema_modules_public/tables/entity_type_provision/table.sql +0 -2
- package/deploy/schemas/metaschema_modules_public/tables/function_deployment_module/table.sql +2 -2
- package/deploy/schemas/metaschema_modules_public/tables/function_invocation_module/table.sql +2 -2
- package/deploy/schemas/metaschema_modules_public/tables/function_module/table.sql +3 -6
- package/deploy/schemas/metaschema_modules_public/tables/graph_execution_module/table.sql +2 -2
- package/deploy/schemas/metaschema_modules_public/tables/identity_providers_module/table.sql +7 -7
- package/deploy/schemas/metaschema_modules_public/tables/namespace_module/table.sql +2 -8
- package/deploy/schemas/metaschema_modules_public/tables/resource_module/table.sql +76 -0
- package/package.json +4 -4
- package/pgpm.plan +1 -5
- package/revert/schemas/metaschema_modules_public/tables/resource_module/table.sql +7 -0
- package/sql/metaschema-modules--0.15.5.sql +253 -442
- package/verify/schemas/metaschema_modules_public/tables/resource_module/table.sql +13 -0
- package/deploy/schemas/metaschema_modules_public/tables/certificate_module/table.sql +0 -66
- package/deploy/schemas/metaschema_modules_public/tables/config_secrets_org_module/table.sql +0 -32
- package/deploy/schemas/metaschema_modules_public/tables/route_module/table.sql +0 -63
- package/deploy/schemas/metaschema_modules_public/tables/server_definition_module/table.sql +0 -70
- package/deploy/schemas/metaschema_modules_public/tables/server_deployment_module/table.sql +0 -83
- package/revert/schemas/metaschema_modules_public/tables/certificate_module/table.sql +0 -7
- package/revert/schemas/metaschema_modules_public/tables/config_secrets_org_module/table.sql +0 -7
- package/revert/schemas/metaschema_modules_public/tables/route_module/table.sql +0 -7
- package/revert/schemas/metaschema_modules_public/tables/server_definition_module/table.sql +0 -7
- package/revert/schemas/metaschema_modules_public/tables/server_deployment_module/table.sql +0 -7
- package/verify/schemas/metaschema_modules_public/tables/certificate_module/table.sql +0 -7
- package/verify/schemas/metaschema_modules_public/tables/config_secrets_org_module/table.sql +0 -5
- package/verify/schemas/metaschema_modules_public/tables/route_module/table.sql +0 -7
- package/verify/schemas/metaschema_modules_public/tables/server_definition_module/table.sql +0 -7
- package/verify/schemas/metaschema_modules_public/tables/server_deployment_module/table.sql +0 -7
|
@@ -18,7 +18,6 @@ CREATE TABLE metaschema_modules_public.config_secrets_module (
|
|
|
18
18
|
|
|
19
19
|
-- Generated table IDs (populated by the generator)
|
|
20
20
|
table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
21
|
-
config_definitions_table_id uuid NULL DEFAULT NULL,
|
|
22
21
|
|
|
23
22
|
-- Table name (input — bare name without scope prefix).
|
|
24
23
|
-- The trigger prepends the scope prefix automatically.
|
|
@@ -31,7 +30,7 @@ CREATE TABLE metaschema_modules_public.config_secrets_module (
|
|
|
31
30
|
-- Scope: determines the security level for this module instance.
|
|
32
31
|
-- Resolved to a membership_type integer at trigger time via membership_types table.
|
|
33
32
|
-- 'app' = app-level (AuthzAppMembership, admin-only secrets + config)
|
|
34
|
-
-- '
|
|
33
|
+
-- 'platform' / 'database' = platform-level infra (database scope carries a database_id)
|
|
35
34
|
-- custom entity type names for entity-scoped secrets
|
|
36
35
|
-- Note: user-scoped credentials are handled by user_credentials_module (separate module)
|
|
37
36
|
scope text NOT NULL DEFAULT 'app',
|
|
@@ -50,15 +49,14 @@ CREATE TABLE metaschema_modules_public.config_secrets_module (
|
|
|
50
49
|
policies jsonb NULL,
|
|
51
50
|
|
|
52
51
|
-- Per-table provisions overrides from blueprint config.
|
|
53
|
-
-- Keys are table keys (secrets
|
|
52
|
+
-- Keys are table keys (secrets).
|
|
54
53
|
-- When a key is present, the module trigger skips default security for that table;
|
|
55
54
|
-- secure_table_provision applies the custom grants/policies instead.
|
|
56
55
|
provisions jsonb NULL,
|
|
57
56
|
|
|
58
57
|
-- Feature flags
|
|
59
58
|
|
|
60
|
-
-- When true, also creates a plaintext config table ({prefix}_config)
|
|
61
|
-
-- a config definitions registry table ({prefix}_config_definitions).
|
|
59
|
+
-- When true, also creates a plaintext config table ({prefix}_config).
|
|
62
60
|
-- Only meaningful for app-level scope (scope = 'app').
|
|
63
61
|
has_config boolean NOT NULL DEFAULT false,
|
|
64
62
|
|
|
@@ -67,7 +65,6 @@ CREATE TABLE metaschema_modules_public.config_secrets_module (
|
|
|
67
65
|
CONSTRAINT config_secrets_module_schema_fkey FOREIGN KEY (schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE,
|
|
68
66
|
CONSTRAINT config_secrets_module_private_schema_fkey FOREIGN KEY (private_schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE,
|
|
69
67
|
CONSTRAINT config_secrets_module_table_fkey FOREIGN KEY (table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE,
|
|
70
|
-
CONSTRAINT config_secrets_module_config_defs_table_fkey FOREIGN KEY (config_definitions_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE,
|
|
71
68
|
CONSTRAINT config_secrets_module_entity_table_fkey FOREIGN KEY (entity_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE
|
|
72
69
|
);
|
|
73
70
|
|
|
@@ -75,12 +72,12 @@ CREATE INDEX config_secrets_module_database_id_idx ON metaschema_modules_public.
|
|
|
75
72
|
CREATE INDEX config_secrets_module_schema_id_idx ON metaschema_modules_public.config_secrets_module ( schema_id );
|
|
76
73
|
CREATE INDEX config_secrets_module_table_id_idx ON metaschema_modules_public.config_secrets_module ( table_id );
|
|
77
74
|
|
|
78
|
-
-- Unique constraint: one config_secrets module per database per scope
|
|
79
|
-
CREATE UNIQUE INDEX config_secrets_module_unique_scope ON metaschema_modules_public.config_secrets_module ( database_id, scope
|
|
75
|
+
-- Unique constraint: one config_secrets module per database per scope (K8s infra: scopes never share).
|
|
76
|
+
CREATE UNIQUE INDEX config_secrets_module_unique_scope ON metaschema_modules_public.config_secrets_module ( database_id, scope );
|
|
80
77
|
|
|
81
78
|
COMMENT ON TABLE metaschema_modules_public.config_secrets_module IS
|
|
82
79
|
'Entity-aware PGP-encrypted key-value config/secrets module. Supports app-level (admin-only)
|
|
83
|
-
and
|
|
80
|
+
and platform/database-scoped infra secrets via the scope column.
|
|
84
81
|
User-scoped bcrypt credentials are handled by user_credentials_module.';
|
|
85
82
|
|
|
86
83
|
COMMIT;
|
package/deploy/schemas/metaschema_modules_public/tables/config_secrets_user_module/table.sql
CHANGED
|
@@ -13,18 +13,13 @@ CREATE TABLE metaschema_modules_public.config_secrets_user_module (
|
|
|
13
13
|
table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
14
14
|
table_name text NOT NULL DEFAULT 'user_secrets',
|
|
15
15
|
|
|
16
|
-
-- Config definitions table ID (populated by the generator)
|
|
17
|
-
config_definitions_table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
18
|
-
--
|
|
19
|
-
|
|
20
16
|
-- API routing (configurable per-module)
|
|
21
17
|
api_name text DEFAULT 'config',
|
|
22
18
|
private_api_name text DEFAULT NULL,
|
|
23
19
|
|
|
24
20
|
CONSTRAINT db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE,
|
|
25
21
|
CONSTRAINT schema_fkey FOREIGN KEY (schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE,
|
|
26
|
-
CONSTRAINT table_fkey FOREIGN KEY (table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE
|
|
27
|
-
CONSTRAINT config_defs_table_fkey FOREIGN KEY (config_definitions_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE
|
|
22
|
+
CONSTRAINT table_fkey FOREIGN KEY (table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE
|
|
28
23
|
);
|
|
29
24
|
|
|
30
25
|
CREATE INDEX config_secrets_user_module_database_id_idx ON metaschema_modules_public.config_secrets_user_module ( database_id );
|
|
@@ -135,8 +135,6 @@ CREATE TABLE metaschema_modules_public.entity_type_provision (
|
|
|
135
135
|
|
|
136
136
|
out_execution_logs_table_id uuid DEFAULT NULL,
|
|
137
137
|
|
|
138
|
-
out_secret_definitions_table_id uuid DEFAULT NULL,
|
|
139
|
-
|
|
140
138
|
out_graph_module_id uuid DEFAULT NULL,
|
|
141
139
|
|
|
142
140
|
out_graphs_table_id uuid DEFAULT NULL,
|
package/deploy/schemas/metaschema_modules_public/tables/function_deployment_module/table.sql
CHANGED
|
@@ -75,7 +75,7 @@ CREATE TABLE metaschema_modules_public.function_deployment_module (
|
|
|
75
75
|
|
|
76
76
|
CREATE INDEX function_deployment_module_database_id_idx ON metaschema_modules_public.function_deployment_module ( database_id );
|
|
77
77
|
|
|
78
|
-
-- Unique constraint: one function deployment module per database per scope
|
|
79
|
-
CREATE UNIQUE INDEX function_deployment_module_unique_scope ON metaschema_modules_public.function_deployment_module ( database_id, scope
|
|
78
|
+
-- Unique constraint: one function deployment module per database per scope (K8s infra: scopes never share).
|
|
79
|
+
CREATE UNIQUE INDEX function_deployment_module_unique_scope ON metaschema_modules_public.function_deployment_module ( database_id, scope );
|
|
80
80
|
|
|
81
81
|
COMMIT;
|
package/deploy/schemas/metaschema_modules_public/tables/function_invocation_module/table.sql
CHANGED
|
@@ -61,7 +61,7 @@ CREATE TABLE metaschema_modules_public.function_invocation_module (
|
|
|
61
61
|
|
|
62
62
|
CREATE INDEX function_invocation_module_database_id_idx ON metaschema_modules_public.function_invocation_module ( database_id );
|
|
63
63
|
|
|
64
|
-
-- Unique constraint: one function invocation module per database per scope
|
|
65
|
-
CREATE UNIQUE INDEX function_invocation_module_unique_scope ON metaschema_modules_public.function_invocation_module ( database_id, scope
|
|
64
|
+
-- Unique constraint: one function invocation module per database per scope (K8s infra: scopes never share).
|
|
65
|
+
CREATE UNIQUE INDEX function_invocation_module_unique_scope ON metaschema_modules_public.function_invocation_module ( database_id, scope );
|
|
66
66
|
|
|
67
67
|
COMMIT;
|
|
@@ -18,12 +18,10 @@ CREATE TABLE metaschema_modules_public.function_module (
|
|
|
18
18
|
|
|
19
19
|
-- Generated table IDs (populated by the generator)
|
|
20
20
|
definitions_table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
21
|
-
secret_definitions_table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
22
21
|
|
|
23
22
|
-- Table names (input to the generator — bare names without scope prefix).
|
|
24
23
|
-- The trigger prepends the scope prefix automatically.
|
|
25
24
|
definitions_table_name text NOT NULL DEFAULT 'function_definitions',
|
|
26
|
-
secret_definitions_table_name text NOT NULL DEFAULT 'secret_definitions',
|
|
27
25
|
|
|
28
26
|
-- API routing (get-or-create: if set, schema is added to this API; if NULL, no API is added)
|
|
29
27
|
api_name text,
|
|
@@ -47,7 +45,7 @@ CREATE TABLE metaschema_modules_public.function_module (
|
|
|
47
45
|
policies jsonb NULL,
|
|
48
46
|
|
|
49
47
|
-- Per-table provisions overrides from blueprint config.
|
|
50
|
-
-- Keys are table keys (definitions
|
|
48
|
+
-- Keys are table keys (definitions).
|
|
51
49
|
-- When a key is present, the module trigger skips default security for that table;
|
|
52
50
|
-- secure_table_provision applies the custom grants/policies instead.
|
|
53
51
|
provisions jsonb NULL,
|
|
@@ -61,13 +59,12 @@ CREATE TABLE metaschema_modules_public.function_module (
|
|
|
61
59
|
CONSTRAINT function_module_schema_fkey FOREIGN KEY (schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE,
|
|
62
60
|
CONSTRAINT function_module_private_schema_fkey FOREIGN KEY (private_schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE,
|
|
63
61
|
CONSTRAINT function_module_definitions_table_fkey FOREIGN KEY (definitions_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE,
|
|
64
|
-
CONSTRAINT function_module_secret_defs_table_fkey FOREIGN KEY (secret_definitions_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE,
|
|
65
62
|
CONSTRAINT function_module_entity_table_fkey FOREIGN KEY (entity_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE
|
|
66
63
|
);
|
|
67
64
|
|
|
68
65
|
CREATE INDEX function_module_database_id_idx ON metaschema_modules_public.function_module ( database_id );
|
|
69
66
|
|
|
70
|
-
-- Unique constraint: one function module per database per scope
|
|
71
|
-
CREATE UNIQUE INDEX function_module_unique_scope ON metaschema_modules_public.function_module ( database_id, scope
|
|
67
|
+
-- Unique constraint: one function module per database per scope (K8s infra: scopes never share).
|
|
68
|
+
CREATE UNIQUE INDEX function_module_unique_scope ON metaschema_modules_public.function_module ( database_id, scope );
|
|
72
69
|
|
|
73
70
|
COMMIT;
|
|
@@ -77,7 +77,7 @@ CREATE TABLE metaschema_modules_public.graph_execution_module (
|
|
|
77
77
|
|
|
78
78
|
CREATE INDEX graph_execution_module_database_id_idx ON metaschema_modules_public.graph_execution_module ( database_id );
|
|
79
79
|
|
|
80
|
-
-- One execution module per (database, scope
|
|
81
|
-
CREATE UNIQUE INDEX graph_execution_module_unique_scope ON metaschema_modules_public.graph_execution_module ( database_id, scope
|
|
80
|
+
-- One execution module per (database, scope) (K8s infra: scopes never share).
|
|
81
|
+
CREATE UNIQUE INDEX graph_execution_module_unique_scope ON metaschema_modules_public.graph_execution_module ( database_id, scope );
|
|
82
82
|
|
|
83
83
|
COMMIT;
|
|
@@ -25,8 +25,9 @@ CREATE TABLE metaschema_modules_public.identity_providers_module (
|
|
|
25
25
|
|
|
26
26
|
-- Entity-aware scope: determines which config_secrets_module table
|
|
27
27
|
-- the rotate_identity_provider_{prefix}_secret proc targets.
|
|
28
|
-
-- 'app'
|
|
29
|
-
-- '
|
|
28
|
+
-- 'app' = app_secrets (AuthzAppMembership, admin-only)
|
|
29
|
+
-- 'platform' = platform_secrets (platform-wide infra)
|
|
30
|
+
-- 'database' = secrets (per-database infra, carries database_id)
|
|
30
31
|
-- Future entity types are also supported via the membership_types table.
|
|
31
32
|
scope text NOT NULL DEFAULT 'app',
|
|
32
33
|
|
|
@@ -57,13 +58,12 @@ COMMENT ON TABLE metaschema_modules_public.identity_providers_module IS
|
|
|
57
58
|
'Entity-aware config row for the identity_providers_module, which provisions a per-database
|
|
58
59
|
identity_providers table holding OAuth2 / OIDC (and future SAML) provider definitions.
|
|
59
60
|
The scope column determines which config_secrets_module table the rotate proc targets
|
|
60
|
-
(app_secrets for app scope,
|
|
61
|
-
the secrets table gets a database_id column
|
|
62
|
-
AuthzRelatedEntityMembership through database.owner_id.
|
|
61
|
+
(app_secrets for app scope, platform_secrets for platform scope). When scope = database,
|
|
62
|
+
the secrets table gets a database_id column.
|
|
63
63
|
Scoping matrix:
|
|
64
64
|
scope=app → per-database flat, in-app admin manages
|
|
65
|
-
scope=platform →
|
|
66
|
-
scope=
|
|
65
|
+
scope=platform → platform-wide, platform admin manages (generate:constructive)
|
|
66
|
+
scope=database → per-database infra, carries database_id';
|
|
67
67
|
COMMENT ON COLUMN metaschema_modules_public.identity_providers_module.private_schema_id IS 'Private schema that hosts SECURITY DEFINER admin helpers which write to identity_providers (create / update / enable / disable / rotate-secret / delete) and the per-app quota check.';
|
|
68
68
|
|
|
69
69
|
COMMIT;
|
|
@@ -39,12 +39,6 @@ CREATE TABLE metaschema_modules_public.namespace_module (
|
|
|
39
39
|
-- Entity table for RLS (NULL for app-level namespaces, entity table for entity-scoped namespaces)
|
|
40
40
|
entity_table_id uuid NULL,
|
|
41
41
|
|
|
42
|
-
-- Platform namespace table reference (for cross-scope mirror trigger).
|
|
43
|
-
-- When scope != 'platform', the insert trigger resolves this automatically
|
|
44
|
-
-- from the platform-scope namespace_module row.
|
|
45
|
-
-- NULL means no mirror trigger (platform scope, or no platform module exists).
|
|
46
|
-
platform_namespaces_table_id uuid NULL,
|
|
47
|
-
|
|
48
42
|
-- Configurable security policies (NULL = use defaults based on scope).
|
|
49
43
|
-- When provided, replaces the default policy set in apply_namespace_security.
|
|
50
44
|
-- Accepts a JSON array of policy objects:
|
|
@@ -72,7 +66,7 @@ CREATE TABLE metaschema_modules_public.namespace_module (
|
|
|
72
66
|
|
|
73
67
|
CREATE INDEX namespace_module_database_id_idx ON metaschema_modules_public.namespace_module ( database_id );
|
|
74
68
|
|
|
75
|
-
-- Unique constraint: one namespace module per database per scope
|
|
76
|
-
CREATE UNIQUE INDEX namespace_module_unique_scope ON metaschema_modules_public.namespace_module ( database_id, scope
|
|
69
|
+
-- Unique constraint: one namespace module per database per scope (K8s infra: scopes never share).
|
|
70
|
+
CREATE UNIQUE INDEX namespace_module_unique_scope ON metaschema_modules_public.namespace_module ( database_id, scope );
|
|
77
71
|
|
|
78
72
|
COMMIT;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
-- Deploy schemas/metaschema_modules_public/tables/resource_module/table to pg
|
|
2
|
+
|
|
3
|
+
-- requires: schemas/metaschema_modules_public/schema
|
|
4
|
+
-- requires: schemas/metaschema_modules_public/tables/namespace_module/table
|
|
5
|
+
|
|
6
|
+
BEGIN;
|
|
7
|
+
|
|
8
|
+
CREATE TABLE metaschema_modules_public.resource_module (
|
|
9
|
+
id uuid PRIMARY KEY DEFAULT uuidv7(),
|
|
10
|
+
database_id uuid NOT NULL,
|
|
11
|
+
|
|
12
|
+
-- Schema references (if uuid_nil, resolved from schema name or default)
|
|
13
|
+
schema_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
14
|
+
private_schema_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
15
|
+
|
|
16
|
+
-- Optional schema name overrides (used when schema IDs are not provided)
|
|
17
|
+
public_schema_name text,
|
|
18
|
+
private_schema_name text,
|
|
19
|
+
|
|
20
|
+
-- Generated table IDs (populated by the generator)
|
|
21
|
+
resources_table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
22
|
+
resource_events_table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
23
|
+
resource_status_checks_table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
24
|
+
resource_definitions_table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
25
|
+
|
|
26
|
+
-- Table names (input to the generator — bare names without scope prefix).
|
|
27
|
+
-- The trigger prepends the scope prefix automatically.
|
|
28
|
+
resources_table_name text NOT NULL DEFAULT 'resources',
|
|
29
|
+
resource_events_table_name text NOT NULL DEFAULT 'resource_events',
|
|
30
|
+
resource_status_checks_table_name text NOT NULL DEFAULT 'resource_status_checks',
|
|
31
|
+
resource_definitions_table_name text NOT NULL DEFAULT 'resource_definitions',
|
|
32
|
+
|
|
33
|
+
-- API routing (get-or-create: if set, schema is added to this API; if NULL, no API is added)
|
|
34
|
+
api_name text,
|
|
35
|
+
private_api_name text,
|
|
36
|
+
|
|
37
|
+
-- Scope: determines the security level for this module instance.
|
|
38
|
+
scope text NOT NULL DEFAULT 'app',
|
|
39
|
+
|
|
40
|
+
-- Table name prefix. Auto-derived from scope by the trigger when empty.
|
|
41
|
+
prefix text NOT NULL DEFAULT '',
|
|
42
|
+
|
|
43
|
+
-- Entity table for RLS (NULL for app-level resources, entity table for entity-scoped)
|
|
44
|
+
entity_table_id uuid NULL,
|
|
45
|
+
|
|
46
|
+
-- FK to namespace_module: which namespaces table resources are scoped to
|
|
47
|
+
namespace_module_id uuid NULL,
|
|
48
|
+
|
|
49
|
+
-- Configurable security policies (NULL = use defaults based on scope).
|
|
50
|
+
policies jsonb NULL,
|
|
51
|
+
|
|
52
|
+
-- Per-table provisions overrides from blueprint config.
|
|
53
|
+
-- Keys are table keys (resources, resource_events).
|
|
54
|
+
provisions jsonb NULL,
|
|
55
|
+
|
|
56
|
+
-- Default permissions: permission names auto-granted to new members.
|
|
57
|
+
default_permissions text[] DEFAULT NULL,
|
|
58
|
+
|
|
59
|
+
-- Constraints
|
|
60
|
+
CONSTRAINT resource_module_db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE,
|
|
61
|
+
CONSTRAINT resource_module_schema_fkey FOREIGN KEY (schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE,
|
|
62
|
+
CONSTRAINT resource_module_private_schema_fkey FOREIGN KEY (private_schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE,
|
|
63
|
+
CONSTRAINT resource_module_resources_table_fkey FOREIGN KEY (resources_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE,
|
|
64
|
+
CONSTRAINT resource_module_events_table_fkey FOREIGN KEY (resource_events_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE,
|
|
65
|
+
CONSTRAINT resource_module_status_checks_table_fkey FOREIGN KEY (resource_status_checks_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE,
|
|
66
|
+
CONSTRAINT resource_module_definitions_table_fkey FOREIGN KEY (resource_definitions_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE,
|
|
67
|
+
CONSTRAINT resource_module_entity_table_fkey FOREIGN KEY (entity_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE,
|
|
68
|
+
CONSTRAINT resource_module_namespace_module_fkey FOREIGN KEY (namespace_module_id) REFERENCES metaschema_modules_public.namespace_module (id) ON DELETE SET NULL
|
|
69
|
+
);
|
|
70
|
+
|
|
71
|
+
CREATE INDEX resource_module_database_id_idx ON metaschema_modules_public.resource_module ( database_id );
|
|
72
|
+
|
|
73
|
+
-- Unique constraint: one resource module per database per scope (K8s infra: scopes never share).
|
|
74
|
+
CREATE UNIQUE INDEX resource_module_unique_scope ON metaschema_modules_public.resource_module ( database_id, scope );
|
|
75
|
+
|
|
76
|
+
COMMIT;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pgpm/metaschema-modules",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.29.0",
|
|
4
4
|
"description": "Module metadata handling and dependency tracking",
|
|
5
5
|
"author": "Dan Lynch <pyramation@gmail.com>",
|
|
6
6
|
"contributors": [
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
"test:watch": "jest --watch"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@pgpm/metaschema-schema": "0.
|
|
25
|
-
"@pgpm/verify": "0.
|
|
24
|
+
"@pgpm/metaschema-schema": "0.29.0",
|
|
25
|
+
"@pgpm/verify": "0.29.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"constructive-test": "^0.4.1",
|
|
@@ -36,5 +36,5 @@
|
|
|
36
36
|
"bugs": {
|
|
37
37
|
"url": "https://github.com/constructive-io/pgpm-modules/issues"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "a896e2ee50a376c53d94b92c0bcb59bef0071717"
|
|
40
40
|
}
|
package/pgpm.plan
CHANGED
|
@@ -49,7 +49,6 @@ schemas/metaschema_modules_public/tables/billing_module/table [schemas/metaschem
|
|
|
49
49
|
schemas/metaschema_modules_public/tables/billing_provider_module/table [schemas/metaschema_modules_public/schema] 2026-05-03T01:00:00Z devin <devin@cognition.ai> # add billing_provider_module config table for external billing provider integration
|
|
50
50
|
schemas/metaschema_modules_public/tables/realtime_module/table [schemas/metaschema_modules_public/schema] 2026-05-09T10:00:00Z devin <devin@cognition.ai> # add realtime_module config table for real-time subscription infrastructure
|
|
51
51
|
schemas/metaschema_modules_public/tables/rate_limit_meters_module/table [schemas/metaschema_modules_public/schema] 2026-05-16T00:00:00Z devin <devin@cognition.ai> # add rate_limit_meters_module for rolling window abuse protection (standalone rate limiting)
|
|
52
|
-
schemas/metaschema_modules_public/tables/config_secrets_org_module/table [schemas/metaschema_modules_public/schema] 2026-05-18T00:00:00Z devin <devin@cognition.ai> # add config_secrets_org_module config table for org-scoped encrypted secrets
|
|
53
52
|
schemas/metaschema_modules_public/tables/inference_log_module/table [schemas/metaschema_modules_public/schema] 2026-05-12T23:00:00Z devin <devin@cognition.ai> # add inference_log_module config table for partitioned LLM inference logging
|
|
54
53
|
schemas/metaschema_modules_public/tables/compute_log_module/table [schemas/metaschema_modules_public/schema] 2026-05-18T20:00:00Z devin <devin@cognition.ai> # add compute_log_module config table for partitioned compute usage logging
|
|
55
54
|
schemas/metaschema_modules_public/tables/transfer_log_module/table [schemas/metaschema_modules_public/schema] 2026-05-18T21:00:00Z devin <devin@cognition.ai> # add transfer_log_module config table for partitioned transfer/bandwidth logging
|
|
@@ -70,7 +69,4 @@ schemas/metaschema_modules_public/tables/i18n_module/table [schemas/metaschema_m
|
|
|
70
69
|
schemas/metaschema_modules_public/tables/function_deployment_module/table [schemas/metaschema_modules_public/schema schemas/metaschema_modules_public/tables/function_module/table schemas/metaschema_modules_public/tables/namespace_module/table] 2026-06-11T06:00:00Z devin <devin@cognition.ai> # add function_deployment_module config table for function-to-namespace deployment binding
|
|
71
70
|
schemas/metaschema_modules_public/tables/function_module/constraints/one_platform_database [schemas/metaschema_modules_public/tables/function_module/table] 2026-06-11T08:00:00Z devin <devin@cognition.ai> # enforce at most one platform-scope function_module (unambiguous resolveDatabaseId)
|
|
72
71
|
schemas/metaschema_modules_public/tables/principal_auth_module/table [schemas/metaschema_modules_public/schema] 2026-06-24T11:15:00Z devin <devin@cognition.ai> # add principal_auth_module config table for scoped API keys and agent principals
|
|
73
|
-
schemas/metaschema_modules_public/tables/
|
|
74
|
-
schemas/metaschema_modules_public/tables/server_deployment_module/table [schemas/metaschema_modules_public/schema schemas/metaschema_modules_public/tables/server_definition_module/table schemas/metaschema_modules_public/tables/namespace_module/table] 2026-06-30T00:00:01Z devin <devin@cognition.ai> # add server_deployment_module config table for server-to-namespace deployment binding
|
|
75
|
-
schemas/metaschema_modules_public/tables/route_module/table [schemas/metaschema_modules_public/schema] 2026-06-30T00:00:02Z devin <devin@cognition.ai> # add route_module config table for gateway route rules (domain+path to backend target)
|
|
76
|
-
schemas/metaschema_modules_public/tables/certificate_module/table [schemas/metaschema_modules_public/schema] 2026-06-30T00:00:03Z devin <devin@cognition.ai> # add certificate_module config table for TLS certificate lifecycle management
|
|
72
|
+
schemas/metaschema_modules_public/tables/resource_module/table [schemas/metaschema_modules_public/schema schemas/metaschema_modules_public/tables/namespace_module/table] 2026-07-02T00:00:00Z devin <devin@cognition.ai> # add resource_module config table for unified K8s resource management (kind-based dispatch)
|