@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
|
@@ -39,11 +39,11 @@ CREATE TABLE metaschema_modules_public.connected_accounts_module (
|
|
|
39
39
|
ON DELETE CASCADE,
|
|
40
40
|
CONSTRAINT table_fkey
|
|
41
41
|
FOREIGN KEY(table_id)
|
|
42
|
-
REFERENCES metaschema_public.
|
|
42
|
+
REFERENCES metaschema_public.table (id)
|
|
43
43
|
ON DELETE CASCADE,
|
|
44
44
|
CONSTRAINT owner_table_fkey
|
|
45
45
|
FOREIGN KEY(owner_table_id)
|
|
46
|
-
REFERENCES metaschema_public.
|
|
46
|
+
REFERENCES metaschema_public.table (id)
|
|
47
47
|
ON DELETE CASCADE,
|
|
48
48
|
CONSTRAINT schema_fkey
|
|
49
49
|
FOREIGN KEY(schema_id)
|
|
@@ -74,11 +74,11 @@ CREATE TABLE metaschema_modules_public.crypto_addresses_module (
|
|
|
74
74
|
ON DELETE CASCADE,
|
|
75
75
|
CONSTRAINT table_fkey
|
|
76
76
|
FOREIGN KEY(table_id)
|
|
77
|
-
REFERENCES metaschema_public.
|
|
77
|
+
REFERENCES metaschema_public.table (id)
|
|
78
78
|
ON DELETE CASCADE,
|
|
79
79
|
CONSTRAINT owner_table_fkey
|
|
80
80
|
FOREIGN KEY(owner_table_id)
|
|
81
|
-
REFERENCES metaschema_public.
|
|
81
|
+
REFERENCES metaschema_public.table (id)
|
|
82
82
|
ON DELETE CASCADE,
|
|
83
83
|
CONSTRAINT schema_fkey
|
|
84
84
|
FOREIGN KEY(schema_id)
|
|
@@ -113,19 +113,19 @@ CREATE TABLE metaschema_modules_public.crypto_auth_module (
|
|
|
113
113
|
ON DELETE CASCADE,
|
|
114
114
|
CONSTRAINT secrets_table_fkey
|
|
115
115
|
FOREIGN KEY(secrets_table_id)
|
|
116
|
-
REFERENCES metaschema_public.
|
|
116
|
+
REFERENCES metaschema_public.table (id)
|
|
117
117
|
ON DELETE CASCADE,
|
|
118
118
|
CONSTRAINT users_table_fkey
|
|
119
119
|
FOREIGN KEY(users_table_id)
|
|
120
|
-
REFERENCES metaschema_public.
|
|
120
|
+
REFERENCES metaschema_public.table (id)
|
|
121
121
|
ON DELETE CASCADE,
|
|
122
122
|
CONSTRAINT sessions_table_fkey
|
|
123
123
|
FOREIGN KEY(sessions_table_id)
|
|
124
|
-
REFERENCES metaschema_public.
|
|
124
|
+
REFERENCES metaschema_public.table (id)
|
|
125
125
|
ON DELETE CASCADE,
|
|
126
126
|
CONSTRAINT session_credentials_table_fkey
|
|
127
127
|
FOREIGN KEY(session_credentials_table_id)
|
|
128
|
-
REFERENCES metaschema_public.
|
|
128
|
+
REFERENCES metaschema_public.table (id)
|
|
129
129
|
ON DELETE CASCADE,
|
|
130
130
|
CONSTRAINT schema_fkey
|
|
131
131
|
FOREIGN KEY(schema_id)
|
|
@@ -165,11 +165,11 @@ CREATE TABLE metaschema_modules_public.denormalized_table_field (
|
|
|
165
165
|
ON DELETE CASCADE,
|
|
166
166
|
CONSTRAINT table_fkey
|
|
167
167
|
FOREIGN KEY(table_id)
|
|
168
|
-
REFERENCES metaschema_public.
|
|
168
|
+
REFERENCES metaschema_public.table (id)
|
|
169
169
|
ON DELETE CASCADE,
|
|
170
170
|
CONSTRAINT ref_table_fkey
|
|
171
171
|
FOREIGN KEY(ref_table_id)
|
|
172
|
-
REFERENCES metaschema_public.
|
|
172
|
+
REFERENCES metaschema_public.table (id)
|
|
173
173
|
ON DELETE CASCADE,
|
|
174
174
|
CONSTRAINT field_fkey
|
|
175
175
|
FOREIGN KEY(field_id)
|
|
@@ -199,11 +199,11 @@ CREATE TABLE metaschema_modules_public.emails_module (
|
|
|
199
199
|
ON DELETE CASCADE,
|
|
200
200
|
CONSTRAINT table_fkey
|
|
201
201
|
FOREIGN KEY(table_id)
|
|
202
|
-
REFERENCES metaschema_public.
|
|
202
|
+
REFERENCES metaschema_public.table (id)
|
|
203
203
|
ON DELETE CASCADE,
|
|
204
204
|
CONSTRAINT owner_table_fkey
|
|
205
205
|
FOREIGN KEY(owner_table_id)
|
|
206
|
-
REFERENCES metaschema_public.
|
|
206
|
+
REFERENCES metaschema_public.table (id)
|
|
207
207
|
ON DELETE CASCADE,
|
|
208
208
|
CONSTRAINT schema_fkey
|
|
209
209
|
FOREIGN KEY(schema_id)
|
|
@@ -223,7 +223,6 @@ CREATE TABLE metaschema_modules_public.config_secrets_user_module (
|
|
|
223
223
|
schema_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
224
224
|
table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
225
225
|
table_name text NOT NULL DEFAULT 'user_secrets',
|
|
226
|
-
config_definitions_table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
227
226
|
api_name text DEFAULT 'config',
|
|
228
227
|
private_api_name text DEFAULT NULL,
|
|
229
228
|
CONSTRAINT db_fkey
|
|
@@ -236,11 +235,7 @@ CREATE TABLE metaschema_modules_public.config_secrets_user_module (
|
|
|
236
235
|
ON DELETE CASCADE,
|
|
237
236
|
CONSTRAINT table_fkey
|
|
238
237
|
FOREIGN KEY(table_id)
|
|
239
|
-
REFERENCES metaschema_public.
|
|
240
|
-
ON DELETE CASCADE,
|
|
241
|
-
CONSTRAINT config_defs_table_fkey
|
|
242
|
-
FOREIGN KEY(config_definitions_table_id)
|
|
243
|
-
REFERENCES metaschema_public."table" (id)
|
|
238
|
+
REFERENCES metaschema_public.table (id)
|
|
244
239
|
ON DELETE CASCADE
|
|
245
240
|
);
|
|
246
241
|
|
|
@@ -271,23 +266,23 @@ CREATE TABLE metaschema_modules_public.invites_module (
|
|
|
271
266
|
ON DELETE CASCADE,
|
|
272
267
|
CONSTRAINT invites_table_fkey
|
|
273
268
|
FOREIGN KEY(invites_table_id)
|
|
274
|
-
REFERENCES metaschema_public.
|
|
269
|
+
REFERENCES metaschema_public.table (id)
|
|
275
270
|
ON DELETE CASCADE,
|
|
276
271
|
CONSTRAINT emails_table_fkey
|
|
277
272
|
FOREIGN KEY(emails_table_id)
|
|
278
|
-
REFERENCES metaschema_public.
|
|
273
|
+
REFERENCES metaschema_public.table (id)
|
|
279
274
|
ON DELETE CASCADE,
|
|
280
275
|
CONSTRAINT users_table_fkey
|
|
281
276
|
FOREIGN KEY(users_table_id)
|
|
282
|
-
REFERENCES metaschema_public.
|
|
277
|
+
REFERENCES metaschema_public.table (id)
|
|
283
278
|
ON DELETE CASCADE,
|
|
284
279
|
CONSTRAINT entity_table_fkey
|
|
285
280
|
FOREIGN KEY(entity_table_id)
|
|
286
|
-
REFERENCES metaschema_public.
|
|
281
|
+
REFERENCES metaschema_public.table (id)
|
|
287
282
|
ON DELETE CASCADE,
|
|
288
283
|
CONSTRAINT claimed_invites_table_fkey
|
|
289
284
|
FOREIGN KEY(claimed_invites_table_id)
|
|
290
|
-
REFERENCES metaschema_public.
|
|
285
|
+
REFERENCES metaschema_public.table (id)
|
|
291
286
|
ON DELETE CASCADE,
|
|
292
287
|
CONSTRAINT schema_fkey
|
|
293
288
|
FOREIGN KEY(schema_id)
|
|
@@ -338,7 +333,7 @@ CREATE TABLE metaschema_modules_public.events_module (
|
|
|
338
333
|
tg_check_achievements text NOT NULL DEFAULT '',
|
|
339
334
|
grant_achievement text NOT NULL DEFAULT '',
|
|
340
335
|
tg_achievement_reward text NOT NULL DEFAULT '',
|
|
341
|
-
interval text NOT NULL DEFAULT '1 month',
|
|
336
|
+
"interval" text NOT NULL DEFAULT '1 month',
|
|
342
337
|
retention text DEFAULT '12 months',
|
|
343
338
|
premake int NOT NULL DEFAULT 2,
|
|
344
339
|
scope text NOT NULL DEFAULT 'app',
|
|
@@ -362,39 +357,39 @@ CREATE TABLE metaschema_modules_public.events_module (
|
|
|
362
357
|
ON DELETE CASCADE,
|
|
363
358
|
CONSTRAINT events_table_fkey
|
|
364
359
|
FOREIGN KEY(events_table_id)
|
|
365
|
-
REFERENCES metaschema_public.
|
|
360
|
+
REFERENCES metaschema_public.table (id)
|
|
366
361
|
ON DELETE CASCADE,
|
|
367
362
|
CONSTRAINT event_aggregates_table_fkey
|
|
368
363
|
FOREIGN KEY(event_aggregates_table_id)
|
|
369
|
-
REFERENCES metaschema_public.
|
|
364
|
+
REFERENCES metaschema_public.table (id)
|
|
370
365
|
ON DELETE CASCADE,
|
|
371
366
|
CONSTRAINT event_types_table_fkey
|
|
372
367
|
FOREIGN KEY(event_types_table_id)
|
|
373
|
-
REFERENCES metaschema_public.
|
|
368
|
+
REFERENCES metaschema_public.table (id)
|
|
374
369
|
ON DELETE CASCADE,
|
|
375
370
|
CONSTRAINT levels_table_fkey
|
|
376
371
|
FOREIGN KEY(levels_table_id)
|
|
377
|
-
REFERENCES metaschema_public.
|
|
372
|
+
REFERENCES metaschema_public.table (id)
|
|
378
373
|
ON DELETE CASCADE,
|
|
379
374
|
CONSTRAINT level_requirements_table_fkey
|
|
380
375
|
FOREIGN KEY(level_requirements_table_id)
|
|
381
|
-
REFERENCES metaschema_public.
|
|
376
|
+
REFERENCES metaschema_public.table (id)
|
|
382
377
|
ON DELETE CASCADE,
|
|
383
378
|
CONSTRAINT level_grants_table_fkey
|
|
384
379
|
FOREIGN KEY(level_grants_table_id)
|
|
385
|
-
REFERENCES metaschema_public.
|
|
380
|
+
REFERENCES metaschema_public.table (id)
|
|
386
381
|
ON DELETE CASCADE,
|
|
387
382
|
CONSTRAINT achievement_rewards_table_fkey
|
|
388
383
|
FOREIGN KEY(achievement_rewards_table_id)
|
|
389
|
-
REFERENCES metaschema_public.
|
|
384
|
+
REFERENCES metaschema_public.table (id)
|
|
390
385
|
ON DELETE CASCADE,
|
|
391
386
|
CONSTRAINT entity_table_fkey
|
|
392
387
|
FOREIGN KEY(entity_table_id)
|
|
393
|
-
REFERENCES metaschema_public.
|
|
388
|
+
REFERENCES metaschema_public.table (id)
|
|
394
389
|
ON DELETE CASCADE,
|
|
395
390
|
CONSTRAINT actor_table_fkey
|
|
396
391
|
FOREIGN KEY(actor_table_id)
|
|
397
|
-
REFERENCES metaschema_public.
|
|
392
|
+
REFERENCES metaschema_public.table (id)
|
|
398
393
|
ON DELETE CASCADE
|
|
399
394
|
);
|
|
400
395
|
|
|
@@ -451,59 +446,59 @@ CREATE TABLE metaschema_modules_public.limits_module (
|
|
|
451
446
|
ON DELETE CASCADE,
|
|
452
447
|
CONSTRAINT table_fkey
|
|
453
448
|
FOREIGN KEY(table_id)
|
|
454
|
-
REFERENCES metaschema_public.
|
|
449
|
+
REFERENCES metaschema_public.table (id)
|
|
455
450
|
ON DELETE CASCADE,
|
|
456
451
|
CONSTRAINT default_table_fkey
|
|
457
452
|
FOREIGN KEY(default_table_id)
|
|
458
|
-
REFERENCES metaschema_public.
|
|
453
|
+
REFERENCES metaschema_public.table (id)
|
|
459
454
|
ON DELETE CASCADE,
|
|
460
455
|
CONSTRAINT entity_table_fkey
|
|
461
456
|
FOREIGN KEY(entity_table_id)
|
|
462
|
-
REFERENCES metaschema_public.
|
|
457
|
+
REFERENCES metaschema_public.table (id)
|
|
463
458
|
ON DELETE CASCADE,
|
|
464
459
|
CONSTRAINT actor_table_fkey
|
|
465
460
|
FOREIGN KEY(actor_table_id)
|
|
466
|
-
REFERENCES metaschema_public.
|
|
461
|
+
REFERENCES metaschema_public.table (id)
|
|
467
462
|
ON DELETE CASCADE,
|
|
468
463
|
CONSTRAINT aggregate_table_fkey
|
|
469
464
|
FOREIGN KEY(aggregate_table_id)
|
|
470
|
-
REFERENCES metaschema_public.
|
|
465
|
+
REFERENCES metaschema_public.table (id)
|
|
471
466
|
ON DELETE CASCADE,
|
|
472
467
|
CONSTRAINT limit_credits_table_fkey
|
|
473
468
|
FOREIGN KEY(limit_credits_table_id)
|
|
474
|
-
REFERENCES metaschema_public.
|
|
469
|
+
REFERENCES metaschema_public.table (id)
|
|
475
470
|
ON DELETE CASCADE,
|
|
476
471
|
CONSTRAINT events_table_fkey
|
|
477
472
|
FOREIGN KEY(events_table_id)
|
|
478
|
-
REFERENCES metaschema_public.
|
|
473
|
+
REFERENCES metaschema_public.table (id)
|
|
479
474
|
ON DELETE CASCADE,
|
|
480
475
|
CONSTRAINT credit_codes_table_fkey
|
|
481
476
|
FOREIGN KEY(credit_codes_table_id)
|
|
482
|
-
REFERENCES metaschema_public.
|
|
477
|
+
REFERENCES metaschema_public.table (id)
|
|
483
478
|
ON DELETE CASCADE,
|
|
484
479
|
CONSTRAINT credit_code_items_table_fkey
|
|
485
480
|
FOREIGN KEY(credit_code_items_table_id)
|
|
486
|
-
REFERENCES metaschema_public.
|
|
481
|
+
REFERENCES metaschema_public.table (id)
|
|
487
482
|
ON DELETE CASCADE,
|
|
488
483
|
CONSTRAINT credit_redemptions_table_fkey
|
|
489
484
|
FOREIGN KEY(credit_redemptions_table_id)
|
|
490
|
-
REFERENCES metaschema_public.
|
|
485
|
+
REFERENCES metaschema_public.table (id)
|
|
491
486
|
ON DELETE CASCADE,
|
|
492
487
|
CONSTRAINT limit_caps_table_fkey
|
|
493
488
|
FOREIGN KEY(limit_caps_table_id)
|
|
494
|
-
REFERENCES metaschema_public.
|
|
489
|
+
REFERENCES metaschema_public.table (id)
|
|
495
490
|
ON DELETE CASCADE,
|
|
496
491
|
CONSTRAINT limit_caps_defaults_table_fkey
|
|
497
492
|
FOREIGN KEY(limit_caps_defaults_table_id)
|
|
498
|
-
REFERENCES metaschema_public.
|
|
493
|
+
REFERENCES metaschema_public.table (id)
|
|
499
494
|
ON DELETE CASCADE,
|
|
500
495
|
CONSTRAINT limit_warnings_table_fkey
|
|
501
496
|
FOREIGN KEY(limit_warnings_table_id)
|
|
502
|
-
REFERENCES metaschema_public.
|
|
497
|
+
REFERENCES metaschema_public.table (id)
|
|
503
498
|
ON DELETE CASCADE,
|
|
504
499
|
CONSTRAINT limit_warning_state_table_fkey
|
|
505
500
|
FOREIGN KEY(limit_warning_state_table_id)
|
|
506
|
-
REFERENCES metaschema_public.
|
|
501
|
+
REFERENCES metaschema_public.table (id)
|
|
507
502
|
ON DELETE CASCADE
|
|
508
503
|
);
|
|
509
504
|
|
|
@@ -525,7 +520,7 @@ CREATE TABLE metaschema_modules_public.membership_types_module (
|
|
|
525
520
|
ON DELETE CASCADE,
|
|
526
521
|
CONSTRAINT table_fkey
|
|
527
522
|
FOREIGN KEY(table_id)
|
|
528
|
-
REFERENCES metaschema_public.
|
|
523
|
+
REFERENCES metaschema_public.table (id)
|
|
529
524
|
ON DELETE CASCADE
|
|
530
525
|
);
|
|
531
526
|
|
|
@@ -587,31 +582,31 @@ CREATE TABLE metaschema_modules_public.memberships_module (
|
|
|
587
582
|
ON DELETE CASCADE,
|
|
588
583
|
CONSTRAINT memberships_table_fkey
|
|
589
584
|
FOREIGN KEY(memberships_table_id)
|
|
590
|
-
REFERENCES metaschema_public.
|
|
585
|
+
REFERENCES metaschema_public.table (id)
|
|
591
586
|
ON DELETE CASCADE,
|
|
592
587
|
CONSTRAINT membership_defaults_table_fkey
|
|
593
588
|
FOREIGN KEY(membership_defaults_table_id)
|
|
594
|
-
REFERENCES metaschema_public.
|
|
589
|
+
REFERENCES metaschema_public.table (id)
|
|
595
590
|
ON DELETE CASCADE,
|
|
596
591
|
CONSTRAINT membership_settings_table_fkey
|
|
597
592
|
FOREIGN KEY(membership_settings_table_id)
|
|
598
|
-
REFERENCES metaschema_public.
|
|
593
|
+
REFERENCES metaschema_public.table (id)
|
|
599
594
|
ON DELETE CASCADE,
|
|
600
595
|
CONSTRAINT members_table_fkey
|
|
601
596
|
FOREIGN KEY(members_table_id)
|
|
602
|
-
REFERENCES metaschema_public.
|
|
597
|
+
REFERENCES metaschema_public.table (id)
|
|
603
598
|
ON DELETE CASCADE,
|
|
604
599
|
CONSTRAINT grants_table_fkey
|
|
605
600
|
FOREIGN KEY(grants_table_id)
|
|
606
|
-
REFERENCES metaschema_public.
|
|
601
|
+
REFERENCES metaschema_public.table (id)
|
|
607
602
|
ON DELETE CASCADE,
|
|
608
603
|
CONSTRAINT sprt_table_fkey
|
|
609
604
|
FOREIGN KEY(sprt_table_id)
|
|
610
|
-
REFERENCES metaschema_public.
|
|
605
|
+
REFERENCES metaschema_public.table (id)
|
|
611
606
|
ON DELETE CASCADE,
|
|
612
607
|
CONSTRAINT entity_table_fkey
|
|
613
608
|
FOREIGN KEY(entity_table_id)
|
|
614
|
-
REFERENCES metaschema_public.
|
|
609
|
+
REFERENCES metaschema_public.table (id)
|
|
615
610
|
ON DELETE CASCADE,
|
|
616
611
|
CONSTRAINT entity_table_owner_fkey
|
|
617
612
|
FOREIGN KEY(entity_table_owner_id)
|
|
@@ -619,23 +614,23 @@ CREATE TABLE metaschema_modules_public.memberships_module (
|
|
|
619
614
|
ON DELETE CASCADE,
|
|
620
615
|
CONSTRAINT actor_table_fkey
|
|
621
616
|
FOREIGN KEY(actor_table_id)
|
|
622
|
-
REFERENCES metaschema_public.
|
|
617
|
+
REFERENCES metaschema_public.table (id)
|
|
623
618
|
ON DELETE CASCADE,
|
|
624
619
|
CONSTRAINT limits_table_fkey
|
|
625
620
|
FOREIGN KEY(limits_table_id)
|
|
626
|
-
REFERENCES metaschema_public.
|
|
621
|
+
REFERENCES metaschema_public.table (id)
|
|
627
622
|
ON DELETE CASCADE,
|
|
628
623
|
CONSTRAINT default_limits_table_fkey
|
|
629
624
|
FOREIGN KEY(default_limits_table_id)
|
|
630
|
-
REFERENCES metaschema_public.
|
|
625
|
+
REFERENCES metaschema_public.table (id)
|
|
631
626
|
ON DELETE CASCADE,
|
|
632
627
|
CONSTRAINT permissions_table_fkey
|
|
633
628
|
FOREIGN KEY(permissions_table_id)
|
|
634
|
-
REFERENCES metaschema_public.
|
|
629
|
+
REFERENCES metaschema_public.table (id)
|
|
635
630
|
ON DELETE CASCADE,
|
|
636
631
|
CONSTRAINT default_permissions_table_fkey
|
|
637
632
|
FOREIGN KEY(default_permissions_table_id)
|
|
638
|
-
REFERENCES metaschema_public.
|
|
633
|
+
REFERENCES metaschema_public.table (id)
|
|
639
634
|
ON DELETE CASCADE,
|
|
640
635
|
CONSTRAINT memberships_module_unique
|
|
641
636
|
UNIQUE (database_id, scope, prefix)
|
|
@@ -679,19 +674,19 @@ CREATE TABLE metaschema_modules_public.permissions_module (
|
|
|
679
674
|
ON DELETE CASCADE,
|
|
680
675
|
CONSTRAINT table_fkey
|
|
681
676
|
FOREIGN KEY(table_id)
|
|
682
|
-
REFERENCES metaschema_public.
|
|
677
|
+
REFERENCES metaschema_public.table (id)
|
|
683
678
|
ON DELETE CASCADE,
|
|
684
679
|
CONSTRAINT default_table_fkey
|
|
685
680
|
FOREIGN KEY(default_table_id)
|
|
686
|
-
REFERENCES metaschema_public.
|
|
681
|
+
REFERENCES metaschema_public.table (id)
|
|
687
682
|
ON DELETE CASCADE,
|
|
688
683
|
CONSTRAINT entity_table_fkey
|
|
689
684
|
FOREIGN KEY(entity_table_id)
|
|
690
|
-
REFERENCES metaschema_public.
|
|
685
|
+
REFERENCES metaschema_public.table (id)
|
|
691
686
|
ON DELETE CASCADE,
|
|
692
687
|
CONSTRAINT actor_table_fkey
|
|
693
688
|
FOREIGN KEY(actor_table_id)
|
|
694
|
-
REFERENCES metaschema_public.
|
|
689
|
+
REFERENCES metaschema_public.table (id)
|
|
695
690
|
ON DELETE CASCADE
|
|
696
691
|
);
|
|
697
692
|
|
|
@@ -713,11 +708,11 @@ CREATE TABLE metaschema_modules_public.phone_numbers_module (
|
|
|
713
708
|
ON DELETE CASCADE,
|
|
714
709
|
CONSTRAINT table_fkey
|
|
715
710
|
FOREIGN KEY(table_id)
|
|
716
|
-
REFERENCES metaschema_public.
|
|
711
|
+
REFERENCES metaschema_public.table (id)
|
|
717
712
|
ON DELETE CASCADE,
|
|
718
713
|
CONSTRAINT owner_table_fkey
|
|
719
714
|
FOREIGN KEY(owner_table_id)
|
|
720
|
-
REFERENCES metaschema_public.
|
|
715
|
+
REFERENCES metaschema_public.table (id)
|
|
721
716
|
ON DELETE CASCADE,
|
|
722
717
|
CONSTRAINT schema_fkey
|
|
723
718
|
FOREIGN KEY(schema_id)
|
|
@@ -770,39 +765,39 @@ CREATE TABLE metaschema_modules_public.profiles_module (
|
|
|
770
765
|
ON DELETE CASCADE,
|
|
771
766
|
CONSTRAINT table_fkey
|
|
772
767
|
FOREIGN KEY(table_id)
|
|
773
|
-
REFERENCES metaschema_public.
|
|
768
|
+
REFERENCES metaschema_public.table (id)
|
|
774
769
|
ON DELETE CASCADE,
|
|
775
770
|
CONSTRAINT profile_permissions_table_fkey
|
|
776
771
|
FOREIGN KEY(profile_permissions_table_id)
|
|
777
|
-
REFERENCES metaschema_public.
|
|
772
|
+
REFERENCES metaschema_public.table (id)
|
|
778
773
|
ON DELETE CASCADE,
|
|
779
774
|
CONSTRAINT profile_grants_table_fkey
|
|
780
775
|
FOREIGN KEY(profile_grants_table_id)
|
|
781
|
-
REFERENCES metaschema_public.
|
|
776
|
+
REFERENCES metaschema_public.table (id)
|
|
782
777
|
ON DELETE CASCADE,
|
|
783
778
|
CONSTRAINT profile_definition_grants_table_fkey
|
|
784
779
|
FOREIGN KEY(profile_definition_grants_table_id)
|
|
785
|
-
REFERENCES metaschema_public.
|
|
780
|
+
REFERENCES metaschema_public.table (id)
|
|
786
781
|
ON DELETE CASCADE,
|
|
787
782
|
CONSTRAINT profile_templates_table_fkey
|
|
788
783
|
FOREIGN KEY(profile_templates_table_id)
|
|
789
|
-
REFERENCES metaschema_public.
|
|
784
|
+
REFERENCES metaschema_public.table (id)
|
|
790
785
|
ON DELETE CASCADE,
|
|
791
786
|
CONSTRAINT entity_table_fkey
|
|
792
787
|
FOREIGN KEY(entity_table_id)
|
|
793
|
-
REFERENCES metaschema_public.
|
|
788
|
+
REFERENCES metaschema_public.table (id)
|
|
794
789
|
ON DELETE CASCADE,
|
|
795
790
|
CONSTRAINT actor_table_fkey
|
|
796
791
|
FOREIGN KEY(actor_table_id)
|
|
797
|
-
REFERENCES metaschema_public.
|
|
792
|
+
REFERENCES metaschema_public.table (id)
|
|
798
793
|
ON DELETE CASCADE,
|
|
799
794
|
CONSTRAINT permissions_table_fkey
|
|
800
795
|
FOREIGN KEY(permissions_table_id)
|
|
801
|
-
REFERENCES metaschema_public.
|
|
796
|
+
REFERENCES metaschema_public.table (id)
|
|
802
797
|
ON DELETE CASCADE,
|
|
803
798
|
CONSTRAINT memberships_table_fkey
|
|
804
799
|
FOREIGN KEY(memberships_table_id)
|
|
805
|
-
REFERENCES metaschema_public.
|
|
800
|
+
REFERENCES metaschema_public.table (id)
|
|
806
801
|
ON DELETE CASCADE,
|
|
807
802
|
CONSTRAINT profiles_module_unique
|
|
808
803
|
UNIQUE (database_id, scope, prefix)
|
|
@@ -830,15 +825,15 @@ CREATE TABLE metaschema_modules_public.rls_module (
|
|
|
830
825
|
ON DELETE CASCADE,
|
|
831
826
|
CONSTRAINT session_credentials_table_fkey
|
|
832
827
|
FOREIGN KEY(session_credentials_table_id)
|
|
833
|
-
REFERENCES metaschema_public.
|
|
828
|
+
REFERENCES metaschema_public.table (id)
|
|
834
829
|
ON DELETE CASCADE,
|
|
835
830
|
CONSTRAINT sessions_table_fkey
|
|
836
831
|
FOREIGN KEY(sessions_table_id)
|
|
837
|
-
REFERENCES metaschema_public.
|
|
832
|
+
REFERENCES metaschema_public.table (id)
|
|
838
833
|
ON DELETE CASCADE,
|
|
839
834
|
CONSTRAINT users_table_fkey
|
|
840
835
|
FOREIGN KEY(users_table_id)
|
|
841
|
-
REFERENCES metaschema_public.
|
|
836
|
+
REFERENCES metaschema_public.table (id)
|
|
842
837
|
ON DELETE CASCADE,
|
|
843
838
|
CONSTRAINT schema_fkey
|
|
844
839
|
FOREIGN KEY(schema_id)
|
|
@@ -878,7 +873,7 @@ CREATE TABLE metaschema_modules_public.user_state_module (
|
|
|
878
873
|
ON DELETE CASCADE,
|
|
879
874
|
CONSTRAINT table_fkey
|
|
880
875
|
FOREIGN KEY(table_id)
|
|
881
|
-
REFERENCES metaschema_public.
|
|
876
|
+
REFERENCES metaschema_public.table (id)
|
|
882
877
|
ON DELETE CASCADE
|
|
883
878
|
);
|
|
884
879
|
|
|
@@ -906,19 +901,19 @@ CREATE TABLE metaschema_modules_public.sessions_module (
|
|
|
906
901
|
ON DELETE CASCADE,
|
|
907
902
|
CONSTRAINT sessions_table_fkey
|
|
908
903
|
FOREIGN KEY(sessions_table_id)
|
|
909
|
-
REFERENCES metaschema_public.
|
|
904
|
+
REFERENCES metaschema_public.table (id)
|
|
910
905
|
ON DELETE CASCADE,
|
|
911
906
|
CONSTRAINT session_credentials_table_fkey
|
|
912
907
|
FOREIGN KEY(session_credentials_table_id)
|
|
913
|
-
REFERENCES metaschema_public.
|
|
908
|
+
REFERENCES metaschema_public.table (id)
|
|
914
909
|
ON DELETE CASCADE,
|
|
915
910
|
CONSTRAINT auth_settings_table_fkey
|
|
916
911
|
FOREIGN KEY(auth_settings_table_id)
|
|
917
|
-
REFERENCES metaschema_public.
|
|
912
|
+
REFERENCES metaschema_public.table (id)
|
|
918
913
|
ON DELETE CASCADE,
|
|
919
914
|
CONSTRAINT users_table_fkey
|
|
920
915
|
FOREIGN KEY(users_table_id)
|
|
921
|
-
REFERENCES metaschema_public.
|
|
916
|
+
REFERENCES metaschema_public.table (id)
|
|
922
917
|
ON DELETE CASCADE
|
|
923
918
|
);
|
|
924
919
|
|
|
@@ -969,27 +964,27 @@ CREATE TABLE metaschema_modules_public.user_auth_module (
|
|
|
969
964
|
ON DELETE CASCADE,
|
|
970
965
|
CONSTRAINT email_table_fkey
|
|
971
966
|
FOREIGN KEY(emails_table_id)
|
|
972
|
-
REFERENCES metaschema_public.
|
|
967
|
+
REFERENCES metaschema_public.table (id)
|
|
973
968
|
ON DELETE CASCADE,
|
|
974
969
|
CONSTRAINT users_table_fkey
|
|
975
970
|
FOREIGN KEY(users_table_id)
|
|
976
|
-
REFERENCES metaschema_public.
|
|
971
|
+
REFERENCES metaschema_public.table (id)
|
|
977
972
|
ON DELETE CASCADE,
|
|
978
973
|
CONSTRAINT secrets_table_fkey
|
|
979
974
|
FOREIGN KEY(secrets_table_id)
|
|
980
|
-
REFERENCES metaschema_public.
|
|
975
|
+
REFERENCES metaschema_public.table (id)
|
|
981
976
|
ON DELETE CASCADE,
|
|
982
977
|
CONSTRAINT encrypted_table_fkey
|
|
983
978
|
FOREIGN KEY(encrypted_table_id)
|
|
984
|
-
REFERENCES metaschema_public.
|
|
979
|
+
REFERENCES metaschema_public.table (id)
|
|
985
980
|
ON DELETE CASCADE,
|
|
986
981
|
CONSTRAINT sessions_table_fkey
|
|
987
982
|
FOREIGN KEY(sessions_table_id)
|
|
988
|
-
REFERENCES metaschema_public.
|
|
983
|
+
REFERENCES metaschema_public.table (id)
|
|
989
984
|
ON DELETE CASCADE,
|
|
990
985
|
CONSTRAINT session_credentials_table_fkey
|
|
991
986
|
FOREIGN KEY(session_credentials_table_id)
|
|
992
|
-
REFERENCES metaschema_public.
|
|
987
|
+
REFERENCES metaschema_public.table (id)
|
|
993
988
|
ON DELETE CASCADE
|
|
994
989
|
);
|
|
995
990
|
|
|
@@ -1027,11 +1022,11 @@ CREATE TABLE metaschema_modules_public.users_module (
|
|
|
1027
1022
|
ON DELETE CASCADE,
|
|
1028
1023
|
CONSTRAINT table_fkey
|
|
1029
1024
|
FOREIGN KEY(table_id)
|
|
1030
|
-
REFERENCES metaschema_public.
|
|
1025
|
+
REFERENCES metaschema_public.table (id)
|
|
1031
1026
|
ON DELETE CASCADE,
|
|
1032
1027
|
CONSTRAINT type_table_fkey
|
|
1033
1028
|
FOREIGN KEY(type_table_id)
|
|
1034
|
-
REFERENCES metaschema_public.
|
|
1029
|
+
REFERENCES metaschema_public.table (id)
|
|
1035
1030
|
ON DELETE CASCADE
|
|
1036
1031
|
);
|
|
1037
1032
|
|
|
@@ -1074,23 +1069,23 @@ CREATE TABLE metaschema_modules_public.hierarchy_module (
|
|
|
1074
1069
|
ON DELETE CASCADE,
|
|
1075
1070
|
CONSTRAINT chart_edges_table_fkey
|
|
1076
1071
|
FOREIGN KEY(chart_edges_table_id)
|
|
1077
|
-
REFERENCES metaschema_public.
|
|
1072
|
+
REFERENCES metaschema_public.table (id)
|
|
1078
1073
|
ON DELETE CASCADE,
|
|
1079
1074
|
CONSTRAINT hierarchy_sprt_table_fkey
|
|
1080
1075
|
FOREIGN KEY(hierarchy_sprt_table_id)
|
|
1081
|
-
REFERENCES metaschema_public.
|
|
1076
|
+
REFERENCES metaschema_public.table (id)
|
|
1082
1077
|
ON DELETE CASCADE,
|
|
1083
1078
|
CONSTRAINT chart_edge_grants_table_fkey
|
|
1084
1079
|
FOREIGN KEY(chart_edge_grants_table_id)
|
|
1085
|
-
REFERENCES metaschema_public.
|
|
1080
|
+
REFERENCES metaschema_public.table (id)
|
|
1086
1081
|
ON DELETE CASCADE,
|
|
1087
1082
|
CONSTRAINT entity_table_fkey
|
|
1088
1083
|
FOREIGN KEY(entity_table_id)
|
|
1089
|
-
REFERENCES metaschema_public.
|
|
1084
|
+
REFERENCES metaschema_public.table (id)
|
|
1090
1085
|
ON DELETE CASCADE,
|
|
1091
1086
|
CONSTRAINT users_table_fkey
|
|
1092
1087
|
FOREIGN KEY(users_table_id)
|
|
1093
|
-
REFERENCES metaschema_public.
|
|
1088
|
+
REFERENCES metaschema_public.table (id)
|
|
1094
1089
|
ON DELETE CASCADE,
|
|
1095
1090
|
CONSTRAINT hierarchy_module_database_unique
|
|
1096
1091
|
UNIQUE (database_id)
|
|
@@ -1116,7 +1111,7 @@ CREATE TABLE metaschema_modules_public.secure_table_provision (
|
|
|
1116
1111
|
ON DELETE CASCADE,
|
|
1117
1112
|
CONSTRAINT table_fkey
|
|
1118
1113
|
FOREIGN KEY(table_id)
|
|
1119
|
-
REFERENCES metaschema_public.
|
|
1114
|
+
REFERENCES metaschema_public.table (id)
|
|
1120
1115
|
ON DELETE CASCADE,
|
|
1121
1116
|
CONSTRAINT schema_fkey
|
|
1122
1117
|
FOREIGN KEY(schema_id)
|
|
@@ -1183,11 +1178,11 @@ CREATE TABLE metaschema_modules_public.relation_provision (
|
|
|
1183
1178
|
ON DELETE CASCADE,
|
|
1184
1179
|
CONSTRAINT source_table_fkey
|
|
1185
1180
|
FOREIGN KEY(source_table_id)
|
|
1186
|
-
REFERENCES metaschema_public.
|
|
1181
|
+
REFERENCES metaschema_public.table (id)
|
|
1187
1182
|
ON DELETE CASCADE,
|
|
1188
1183
|
CONSTRAINT target_table_fkey
|
|
1189
1184
|
FOREIGN KEY(target_table_id)
|
|
1190
|
-
REFERENCES metaschema_public.
|
|
1185
|
+
REFERENCES metaschema_public.table (id)
|
|
1191
1186
|
ON DELETE CASCADE
|
|
1192
1187
|
);
|
|
1193
1188
|
|
|
@@ -1554,23 +1549,23 @@ CREATE TABLE metaschema_modules_public.storage_module (
|
|
|
1554
1549
|
ON DELETE CASCADE,
|
|
1555
1550
|
CONSTRAINT buckets_table_fkey
|
|
1556
1551
|
FOREIGN KEY(buckets_table_id)
|
|
1557
|
-
REFERENCES metaschema_public.
|
|
1552
|
+
REFERENCES metaschema_public.table (id)
|
|
1558
1553
|
ON DELETE CASCADE,
|
|
1559
1554
|
CONSTRAINT files_table_fkey
|
|
1560
1555
|
FOREIGN KEY(files_table_id)
|
|
1561
|
-
REFERENCES metaschema_public.
|
|
1556
|
+
REFERENCES metaschema_public.table (id)
|
|
1562
1557
|
ON DELETE CASCADE,
|
|
1563
1558
|
CONSTRAINT entity_table_fkey
|
|
1564
1559
|
FOREIGN KEY(entity_table_id)
|
|
1565
|
-
REFERENCES metaschema_public.
|
|
1560
|
+
REFERENCES metaschema_public.table (id)
|
|
1566
1561
|
ON DELETE CASCADE,
|
|
1567
1562
|
CONSTRAINT path_shares_table_fkey
|
|
1568
1563
|
FOREIGN KEY(path_shares_table_id)
|
|
1569
|
-
REFERENCES metaschema_public.
|
|
1564
|
+
REFERENCES metaschema_public.table (id)
|
|
1570
1565
|
ON DELETE CASCADE,
|
|
1571
1566
|
CONSTRAINT file_events_table_fkey
|
|
1572
1567
|
FOREIGN KEY(file_events_table_id)
|
|
1573
|
-
REFERENCES metaschema_public.
|
|
1568
|
+
REFERENCES metaschema_public.table (id)
|
|
1574
1569
|
ON DELETE CASCADE
|
|
1575
1570
|
);
|
|
1576
1571
|
|
|
@@ -1615,7 +1610,6 @@ CREATE TABLE metaschema_modules_public.entity_type_provision (
|
|
|
1615
1610
|
out_definitions_table_id uuid DEFAULT NULL,
|
|
1616
1611
|
out_invocations_table_id uuid DEFAULT NULL,
|
|
1617
1612
|
out_execution_logs_table_id uuid DEFAULT NULL,
|
|
1618
|
-
out_secret_definitions_table_id uuid DEFAULT NULL,
|
|
1619
1613
|
out_graph_module_id uuid DEFAULT NULL,
|
|
1620
1614
|
out_graphs_table_id uuid DEFAULT NULL,
|
|
1621
1615
|
out_agent_module_id uuid DEFAULT NULL,
|
|
@@ -1850,15 +1844,15 @@ CREATE TABLE metaschema_modules_public.rate_limits_module (
|
|
|
1850
1844
|
ON DELETE CASCADE,
|
|
1851
1845
|
CONSTRAINT rate_limit_settings_table_fkey
|
|
1852
1846
|
FOREIGN KEY(rate_limit_settings_table_id)
|
|
1853
|
-
REFERENCES metaschema_public.
|
|
1847
|
+
REFERENCES metaschema_public.table (id)
|
|
1854
1848
|
ON DELETE CASCADE,
|
|
1855
1849
|
CONSTRAINT ip_rate_limits_table_fkey
|
|
1856
1850
|
FOREIGN KEY(ip_rate_limits_table_id)
|
|
1857
|
-
REFERENCES metaschema_public.
|
|
1851
|
+
REFERENCES metaschema_public.table (id)
|
|
1858
1852
|
ON DELETE CASCADE,
|
|
1859
1853
|
CONSTRAINT rate_limits_table_fkey
|
|
1860
1854
|
FOREIGN KEY(rate_limits_table_id)
|
|
1861
|
-
REFERENCES metaschema_public.
|
|
1855
|
+
REFERENCES metaschema_public.table (id)
|
|
1862
1856
|
ON DELETE CASCADE,
|
|
1863
1857
|
CONSTRAINT rate_limits_module_database_id_uniq
|
|
1864
1858
|
UNIQUE (database_id)
|
|
@@ -1890,11 +1884,11 @@ CREATE TABLE metaschema_modules_public.devices_module (
|
|
|
1890
1884
|
ON DELETE CASCADE,
|
|
1891
1885
|
CONSTRAINT user_devices_table_fkey
|
|
1892
1886
|
FOREIGN KEY(user_devices_table_id)
|
|
1893
|
-
REFERENCES metaschema_public.
|
|
1887
|
+
REFERENCES metaschema_public.table (id)
|
|
1894
1888
|
ON DELETE CASCADE,
|
|
1895
1889
|
CONSTRAINT device_settings_table_fkey
|
|
1896
1890
|
FOREIGN KEY(device_settings_table_id)
|
|
1897
|
-
REFERENCES metaschema_public.
|
|
1891
|
+
REFERENCES metaschema_public.table (id)
|
|
1898
1892
|
ON DELETE CASCADE,
|
|
1899
1893
|
CONSTRAINT devices_module_database_id_uniq
|
|
1900
1894
|
UNIQUE (database_id)
|
|
@@ -1923,11 +1917,11 @@ CREATE TABLE metaschema_modules_public.session_secrets_module (
|
|
|
1923
1917
|
ON DELETE CASCADE,
|
|
1924
1918
|
CONSTRAINT table_fkey
|
|
1925
1919
|
FOREIGN KEY(table_id)
|
|
1926
|
-
REFERENCES metaschema_public.
|
|
1920
|
+
REFERENCES metaschema_public.table (id)
|
|
1927
1921
|
ON DELETE CASCADE,
|
|
1928
1922
|
CONSTRAINT sessions_table_fkey
|
|
1929
1923
|
FOREIGN KEY(sessions_table_id)
|
|
1930
|
-
REFERENCES metaschema_public.
|
|
1924
|
+
REFERENCES metaschema_public.table (id)
|
|
1931
1925
|
ON DELETE CASCADE
|
|
1932
1926
|
);
|
|
1933
1927
|
|
|
@@ -1959,11 +1953,11 @@ CREATE TABLE metaschema_modules_public.webauthn_credentials_module (
|
|
|
1959
1953
|
ON DELETE CASCADE,
|
|
1960
1954
|
CONSTRAINT table_fkey
|
|
1961
1955
|
FOREIGN KEY(table_id)
|
|
1962
|
-
REFERENCES metaschema_public.
|
|
1956
|
+
REFERENCES metaschema_public.table (id)
|
|
1963
1957
|
ON DELETE CASCADE,
|
|
1964
1958
|
CONSTRAINT owner_table_fkey
|
|
1965
1959
|
FOREIGN KEY(owner_table_id)
|
|
1966
|
-
REFERENCES metaschema_public.
|
|
1960
|
+
REFERENCES metaschema_public.table (id)
|
|
1967
1961
|
ON DELETE CASCADE,
|
|
1968
1962
|
CONSTRAINT schema_fkey
|
|
1969
1963
|
FOREIGN KEY(schema_id)
|
|
@@ -2008,27 +2002,27 @@ CREATE TABLE metaschema_modules_public.webauthn_auth_module (
|
|
|
2008
2002
|
ON DELETE CASCADE,
|
|
2009
2003
|
CONSTRAINT users_table_fkey
|
|
2010
2004
|
FOREIGN KEY(users_table_id)
|
|
2011
|
-
REFERENCES metaschema_public.
|
|
2005
|
+
REFERENCES metaschema_public.table (id)
|
|
2012
2006
|
ON DELETE CASCADE,
|
|
2013
2007
|
CONSTRAINT credentials_table_fkey
|
|
2014
2008
|
FOREIGN KEY(credentials_table_id)
|
|
2015
|
-
REFERENCES metaschema_public.
|
|
2009
|
+
REFERENCES metaschema_public.table (id)
|
|
2016
2010
|
ON DELETE CASCADE,
|
|
2017
2011
|
CONSTRAINT sessions_table_fkey
|
|
2018
2012
|
FOREIGN KEY(sessions_table_id)
|
|
2019
|
-
REFERENCES metaschema_public.
|
|
2013
|
+
REFERENCES metaschema_public.table (id)
|
|
2020
2014
|
ON DELETE CASCADE,
|
|
2021
2015
|
CONSTRAINT session_credentials_table_fkey
|
|
2022
2016
|
FOREIGN KEY(session_credentials_table_id)
|
|
2023
|
-
REFERENCES metaschema_public.
|
|
2017
|
+
REFERENCES metaschema_public.table (id)
|
|
2024
2018
|
ON DELETE CASCADE,
|
|
2025
2019
|
CONSTRAINT session_secrets_table_fkey
|
|
2026
2020
|
FOREIGN KEY(session_secrets_table_id)
|
|
2027
|
-
REFERENCES metaschema_public.
|
|
2021
|
+
REFERENCES metaschema_public.table (id)
|
|
2028
2022
|
ON DELETE CASCADE,
|
|
2029
2023
|
CONSTRAINT auth_settings_table_fkey
|
|
2030
2024
|
FOREIGN KEY(auth_settings_table_id)
|
|
2031
|
-
REFERENCES metaschema_public.
|
|
2025
|
+
REFERENCES metaschema_public.table (id)
|
|
2032
2026
|
ON DELETE CASCADE
|
|
2033
2027
|
);
|
|
2034
2028
|
|
|
@@ -2054,7 +2048,7 @@ CREATE TABLE metaschema_modules_public.identity_providers_module (
|
|
|
2054
2048
|
ON DELETE CASCADE,
|
|
2055
2049
|
CONSTRAINT table_fkey
|
|
2056
2050
|
FOREIGN KEY(table_id)
|
|
2057
|
-
REFERENCES metaschema_public.
|
|
2051
|
+
REFERENCES metaschema_public.table (id)
|
|
2058
2052
|
ON DELETE CASCADE,
|
|
2059
2053
|
CONSTRAINT schema_fkey
|
|
2060
2054
|
FOREIGN KEY(schema_id)
|
|
@@ -2066,7 +2060,7 @@ CREATE TABLE metaschema_modules_public.identity_providers_module (
|
|
|
2066
2060
|
ON DELETE CASCADE,
|
|
2067
2061
|
CONSTRAINT entity_table_fkey
|
|
2068
2062
|
FOREIGN KEY(entity_table_id)
|
|
2069
|
-
REFERENCES metaschema_public.
|
|
2063
|
+
REFERENCES metaschema_public.table (id)
|
|
2070
2064
|
ON DELETE CASCADE
|
|
2071
2065
|
);
|
|
2072
2066
|
|
|
@@ -2083,13 +2077,12 @@ CREATE UNIQUE INDEX identity_providers_module_unique_scope ON metaschema_modules
|
|
|
2083
2077
|
COMMENT ON TABLE metaschema_modules_public.identity_providers_module IS 'Entity-aware config row for the identity_providers_module, which provisions a per-database
|
|
2084
2078
|
identity_providers table holding OAuth2 / OIDC (and future SAML) provider definitions.
|
|
2085
2079
|
The scope column determines which config_secrets_module table the rotate proc targets
|
|
2086
|
-
(app_secrets for app scope,
|
|
2087
|
-
the secrets table gets a database_id column
|
|
2088
|
-
AuthzRelatedEntityMembership through database.owner_id.
|
|
2080
|
+
(app_secrets for app scope, platform_secrets for platform scope). When scope = database,
|
|
2081
|
+
the secrets table gets a database_id column.
|
|
2089
2082
|
Scoping matrix:
|
|
2090
2083
|
scope=app → per-database flat, in-app admin manages
|
|
2091
|
-
scope=platform →
|
|
2092
|
-
scope=
|
|
2084
|
+
scope=platform → platform-wide, platform admin manages (generate:constructive)
|
|
2085
|
+
scope=database → per-database infra, carries database_id';
|
|
2093
2086
|
|
|
2094
2087
|
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.';
|
|
2095
2088
|
|
|
@@ -2123,39 +2116,39 @@ CREATE TABLE metaschema_modules_public.notifications_module (
|
|
|
2123
2116
|
ON DELETE CASCADE,
|
|
2124
2117
|
CONSTRAINT notifications_table_fkey
|
|
2125
2118
|
FOREIGN KEY(notifications_table_id)
|
|
2126
|
-
REFERENCES metaschema_public.
|
|
2119
|
+
REFERENCES metaschema_public.table (id)
|
|
2127
2120
|
ON DELETE CASCADE,
|
|
2128
2121
|
CONSTRAINT read_state_table_fkey
|
|
2129
2122
|
FOREIGN KEY(read_state_table_id)
|
|
2130
|
-
REFERENCES metaschema_public.
|
|
2123
|
+
REFERENCES metaschema_public.table (id)
|
|
2131
2124
|
ON DELETE CASCADE,
|
|
2132
2125
|
CONSTRAINT preferences_table_fkey
|
|
2133
2126
|
FOREIGN KEY(preferences_table_id)
|
|
2134
|
-
REFERENCES metaschema_public.
|
|
2127
|
+
REFERENCES metaschema_public.table (id)
|
|
2135
2128
|
ON DELETE SET NULL,
|
|
2136
2129
|
CONSTRAINT channels_table_fkey
|
|
2137
2130
|
FOREIGN KEY(channels_table_id)
|
|
2138
|
-
REFERENCES metaschema_public.
|
|
2131
|
+
REFERENCES metaschema_public.table (id)
|
|
2139
2132
|
ON DELETE SET NULL,
|
|
2140
2133
|
CONSTRAINT delivery_log_table_fkey
|
|
2141
2134
|
FOREIGN KEY(delivery_log_table_id)
|
|
2142
|
-
REFERENCES metaschema_public.
|
|
2135
|
+
REFERENCES metaschema_public.table (id)
|
|
2143
2136
|
ON DELETE SET NULL,
|
|
2144
2137
|
CONSTRAINT suppressions_table_fkey
|
|
2145
2138
|
FOREIGN KEY(suppressions_table_id)
|
|
2146
|
-
REFERENCES metaschema_public.
|
|
2139
|
+
REFERENCES metaschema_public.table (id)
|
|
2147
2140
|
ON DELETE SET NULL,
|
|
2148
2141
|
CONSTRAINT owner_table_fkey
|
|
2149
2142
|
FOREIGN KEY(owner_table_id)
|
|
2150
|
-
REFERENCES metaschema_public.
|
|
2143
|
+
REFERENCES metaschema_public.table (id)
|
|
2151
2144
|
ON DELETE CASCADE,
|
|
2152
2145
|
CONSTRAINT user_settings_table_fkey
|
|
2153
2146
|
FOREIGN KEY(user_settings_table_id)
|
|
2154
|
-
REFERENCES metaschema_public.
|
|
2147
|
+
REFERENCES metaschema_public.table (id)
|
|
2155
2148
|
ON DELETE SET NULL,
|
|
2156
2149
|
CONSTRAINT organization_settings_table_fkey
|
|
2157
2150
|
FOREIGN KEY(organization_settings_table_id)
|
|
2158
|
-
REFERENCES metaschema_public.
|
|
2151
|
+
REFERENCES metaschema_public.table (id)
|
|
2159
2152
|
ON DELETE SET NULL,
|
|
2160
2153
|
CONSTRAINT schema_fkey
|
|
2161
2154
|
FOREIGN KEY(schema_id)
|
|
@@ -2236,27 +2229,27 @@ CREATE TABLE metaschema_modules_public.plans_module (
|
|
|
2236
2229
|
ON DELETE CASCADE,
|
|
2237
2230
|
CONSTRAINT plans_table_fkey
|
|
2238
2231
|
FOREIGN KEY(plans_table_id)
|
|
2239
|
-
REFERENCES metaschema_public.
|
|
2232
|
+
REFERENCES metaschema_public.table (id)
|
|
2240
2233
|
ON DELETE CASCADE,
|
|
2241
2234
|
CONSTRAINT plan_limits_table_fkey
|
|
2242
2235
|
FOREIGN KEY(plan_limits_table_id)
|
|
2243
|
-
REFERENCES metaschema_public.
|
|
2236
|
+
REFERENCES metaschema_public.table (id)
|
|
2244
2237
|
ON DELETE CASCADE,
|
|
2245
2238
|
CONSTRAINT plan_pricing_table_fkey
|
|
2246
2239
|
FOREIGN KEY(plan_pricing_table_id)
|
|
2247
|
-
REFERENCES metaschema_public.
|
|
2240
|
+
REFERENCES metaschema_public.table (id)
|
|
2248
2241
|
ON DELETE CASCADE,
|
|
2249
2242
|
CONSTRAINT plan_overrides_table_fkey
|
|
2250
2243
|
FOREIGN KEY(plan_overrides_table_id)
|
|
2251
|
-
REFERENCES metaschema_public.
|
|
2244
|
+
REFERENCES metaschema_public.table (id)
|
|
2252
2245
|
ON DELETE CASCADE,
|
|
2253
2246
|
CONSTRAINT plan_meter_limits_table_fkey
|
|
2254
2247
|
FOREIGN KEY(plan_meter_limits_table_id)
|
|
2255
|
-
REFERENCES metaschema_public.
|
|
2248
|
+
REFERENCES metaschema_public.table (id)
|
|
2256
2249
|
ON DELETE CASCADE,
|
|
2257
2250
|
CONSTRAINT plan_caps_table_fkey
|
|
2258
2251
|
FOREIGN KEY(plan_caps_table_id)
|
|
2259
|
-
REFERENCES metaschema_public.
|
|
2252
|
+
REFERENCES metaschema_public.table (id)
|
|
2260
2253
|
ON DELETE CASCADE,
|
|
2261
2254
|
CONSTRAINT plans_module_database_id_unique
|
|
2262
2255
|
UNIQUE (database_id)
|
|
@@ -2304,31 +2297,31 @@ CREATE TABLE metaschema_modules_public.billing_module (
|
|
|
2304
2297
|
ON DELETE CASCADE,
|
|
2305
2298
|
CONSTRAINT meters_table_fkey
|
|
2306
2299
|
FOREIGN KEY(meters_table_id)
|
|
2307
|
-
REFERENCES metaschema_public.
|
|
2300
|
+
REFERENCES metaschema_public.table (id)
|
|
2308
2301
|
ON DELETE CASCADE,
|
|
2309
2302
|
CONSTRAINT plan_subscriptions_table_fkey
|
|
2310
2303
|
FOREIGN KEY(plan_subscriptions_table_id)
|
|
2311
|
-
REFERENCES metaschema_public.
|
|
2304
|
+
REFERENCES metaschema_public.table (id)
|
|
2312
2305
|
ON DELETE CASCADE,
|
|
2313
2306
|
CONSTRAINT ledger_table_fkey
|
|
2314
2307
|
FOREIGN KEY(ledger_table_id)
|
|
2315
|
-
REFERENCES metaschema_public.
|
|
2308
|
+
REFERENCES metaschema_public.table (id)
|
|
2316
2309
|
ON DELETE CASCADE,
|
|
2317
2310
|
CONSTRAINT balances_table_fkey
|
|
2318
2311
|
FOREIGN KEY(balances_table_id)
|
|
2319
|
-
REFERENCES metaschema_public.
|
|
2312
|
+
REFERENCES metaschema_public.table (id)
|
|
2320
2313
|
ON DELETE CASCADE,
|
|
2321
2314
|
CONSTRAINT meter_credits_table_fkey
|
|
2322
2315
|
FOREIGN KEY(meter_credits_table_id)
|
|
2323
|
-
REFERENCES metaschema_public.
|
|
2316
|
+
REFERENCES metaschema_public.table (id)
|
|
2324
2317
|
ON DELETE CASCADE,
|
|
2325
2318
|
CONSTRAINT meter_sources_table_fkey
|
|
2326
2319
|
FOREIGN KEY(meter_sources_table_id)
|
|
2327
|
-
REFERENCES metaschema_public.
|
|
2320
|
+
REFERENCES metaschema_public.table (id)
|
|
2328
2321
|
ON DELETE CASCADE,
|
|
2329
2322
|
CONSTRAINT meter_defaults_table_fkey
|
|
2330
2323
|
FOREIGN KEY(meter_defaults_table_id)
|
|
2331
|
-
REFERENCES metaschema_public.
|
|
2324
|
+
REFERENCES metaschema_public.table (id)
|
|
2332
2325
|
ON DELETE CASCADE,
|
|
2333
2326
|
CONSTRAINT billing_module_database_id_unique
|
|
2334
2327
|
UNIQUE (database_id)
|
|
@@ -2373,35 +2366,35 @@ CREATE TABLE metaschema_modules_public.billing_provider_module (
|
|
|
2373
2366
|
ON DELETE CASCADE,
|
|
2374
2367
|
CONSTRAINT billing_customers_table_fkey
|
|
2375
2368
|
FOREIGN KEY(billing_customers_table_id)
|
|
2376
|
-
REFERENCES metaschema_public.
|
|
2369
|
+
REFERENCES metaschema_public.table (id)
|
|
2377
2370
|
ON DELETE CASCADE,
|
|
2378
2371
|
CONSTRAINT billing_products_table_fkey
|
|
2379
2372
|
FOREIGN KEY(billing_products_table_id)
|
|
2380
|
-
REFERENCES metaschema_public.
|
|
2373
|
+
REFERENCES metaschema_public.table (id)
|
|
2381
2374
|
ON DELETE CASCADE,
|
|
2382
2375
|
CONSTRAINT billing_prices_table_fkey
|
|
2383
2376
|
FOREIGN KEY(billing_prices_table_id)
|
|
2384
|
-
REFERENCES metaschema_public.
|
|
2377
|
+
REFERENCES metaschema_public.table (id)
|
|
2385
2378
|
ON DELETE CASCADE,
|
|
2386
2379
|
CONSTRAINT billing_subscriptions_table_fkey
|
|
2387
2380
|
FOREIGN KEY(billing_subscriptions_table_id)
|
|
2388
|
-
REFERENCES metaschema_public.
|
|
2381
|
+
REFERENCES metaschema_public.table (id)
|
|
2389
2382
|
ON DELETE CASCADE,
|
|
2390
2383
|
CONSTRAINT billing_webhook_events_table_fkey
|
|
2391
2384
|
FOREIGN KEY(billing_webhook_events_table_id)
|
|
2392
|
-
REFERENCES metaschema_public.
|
|
2385
|
+
REFERENCES metaschema_public.table (id)
|
|
2393
2386
|
ON DELETE CASCADE,
|
|
2394
2387
|
CONSTRAINT products_table_fkey
|
|
2395
2388
|
FOREIGN KEY(products_table_id)
|
|
2396
|
-
REFERENCES metaschema_public.
|
|
2389
|
+
REFERENCES metaschema_public.table (id)
|
|
2397
2390
|
ON DELETE SET NULL,
|
|
2398
2391
|
CONSTRAINT prices_table_fkey
|
|
2399
2392
|
FOREIGN KEY(prices_table_id)
|
|
2400
|
-
REFERENCES metaschema_public.
|
|
2393
|
+
REFERENCES metaschema_public.table (id)
|
|
2401
2394
|
ON DELETE SET NULL,
|
|
2402
2395
|
CONSTRAINT subscriptions_table_fkey
|
|
2403
2396
|
FOREIGN KEY(subscriptions_table_id)
|
|
2404
|
-
REFERENCES metaschema_public.
|
|
2397
|
+
REFERENCES metaschema_public.table (id)
|
|
2405
2398
|
ON DELETE SET NULL,
|
|
2406
2399
|
CONSTRAINT billing_provider_module_database_id_unique
|
|
2407
2400
|
UNIQUE (database_id)
|
|
@@ -2420,7 +2413,7 @@ CREATE TABLE metaschema_modules_public.realtime_module (
|
|
|
2420
2413
|
source_registry_table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
2421
2414
|
retention_hours int NOT NULL DEFAULT 168,
|
|
2422
2415
|
premake int NOT NULL DEFAULT 7,
|
|
2423
|
-
interval text NOT NULL DEFAULT '1 day',
|
|
2416
|
+
"interval" text NOT NULL DEFAULT '1 day',
|
|
2424
2417
|
notify_channel text NULL,
|
|
2425
2418
|
api_name text DEFAULT 'realtime',
|
|
2426
2419
|
private_api_name text DEFAULT NULL,
|
|
@@ -2442,15 +2435,15 @@ CREATE TABLE metaschema_modules_public.realtime_module (
|
|
|
2442
2435
|
ON DELETE CASCADE,
|
|
2443
2436
|
CONSTRAINT change_log_table_fkey
|
|
2444
2437
|
FOREIGN KEY(change_log_table_id)
|
|
2445
|
-
REFERENCES metaschema_public.
|
|
2438
|
+
REFERENCES metaschema_public.table (id)
|
|
2446
2439
|
ON DELETE CASCADE,
|
|
2447
2440
|
CONSTRAINT listener_node_table_fkey
|
|
2448
2441
|
FOREIGN KEY(listener_node_table_id)
|
|
2449
|
-
REFERENCES metaschema_public.
|
|
2442
|
+
REFERENCES metaschema_public.table (id)
|
|
2450
2443
|
ON DELETE CASCADE,
|
|
2451
2444
|
CONSTRAINT source_registry_table_fkey
|
|
2452
2445
|
FOREIGN KEY(source_registry_table_id)
|
|
2453
|
-
REFERENCES metaschema_public.
|
|
2446
|
+
REFERENCES metaschema_public.table (id)
|
|
2454
2447
|
ON DELETE CASCADE
|
|
2455
2448
|
);
|
|
2456
2449
|
|
|
@@ -2502,15 +2495,15 @@ CREATE TABLE metaschema_modules_public.rate_limit_meters_module (
|
|
|
2502
2495
|
ON DELETE CASCADE,
|
|
2503
2496
|
CONSTRAINT rate_limit_state_table_fkey
|
|
2504
2497
|
FOREIGN KEY(rate_limit_state_table_id)
|
|
2505
|
-
REFERENCES metaschema_public.
|
|
2498
|
+
REFERENCES metaschema_public.table (id)
|
|
2506
2499
|
ON DELETE CASCADE,
|
|
2507
2500
|
CONSTRAINT rate_limit_overrides_table_fkey
|
|
2508
2501
|
FOREIGN KEY(rate_limit_overrides_table_id)
|
|
2509
|
-
REFERENCES metaschema_public.
|
|
2502
|
+
REFERENCES metaschema_public.table (id)
|
|
2510
2503
|
ON DELETE CASCADE,
|
|
2511
2504
|
CONSTRAINT rate_window_limits_table_fkey
|
|
2512
2505
|
FOREIGN KEY(rate_window_limits_table_id)
|
|
2513
|
-
REFERENCES metaschema_public.
|
|
2506
|
+
REFERENCES metaschema_public.table (id)
|
|
2514
2507
|
ON DELETE CASCADE,
|
|
2515
2508
|
CONSTRAINT rate_limit_meters_module_database_id_unique
|
|
2516
2509
|
UNIQUE (database_id)
|
|
@@ -2524,36 +2517,6 @@ COMMENT ON CONSTRAINT rate_limit_overrides_table_fkey ON metaschema_modules_publ
|
|
|
2524
2517
|
|
|
2525
2518
|
COMMENT ON CONSTRAINT rate_window_limits_table_fkey ON metaschema_modules_public.rate_limit_meters_module IS '@fieldName rateWindowLimitsTableByRateWindowLimitsTableId';
|
|
2526
2519
|
|
|
2527
|
-
CREATE TABLE metaschema_modules_public.config_secrets_org_module (
|
|
2528
|
-
id uuid PRIMARY KEY DEFAULT uuidv7(),
|
|
2529
|
-
database_id uuid NOT NULL,
|
|
2530
|
-
schema_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
2531
|
-
table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
2532
|
-
table_name text NOT NULL DEFAULT 'org_secrets',
|
|
2533
|
-
api_name text DEFAULT 'config',
|
|
2534
|
-
private_api_name text DEFAULT NULL,
|
|
2535
|
-
CONSTRAINT db_fkey
|
|
2536
|
-
FOREIGN KEY(database_id)
|
|
2537
|
-
REFERENCES metaschema_public.database (id)
|
|
2538
|
-
ON DELETE CASCADE,
|
|
2539
|
-
CONSTRAINT schema_fkey
|
|
2540
|
-
FOREIGN KEY(schema_id)
|
|
2541
|
-
REFERENCES metaschema_public.schema (id)
|
|
2542
|
-
ON DELETE CASCADE,
|
|
2543
|
-
CONSTRAINT table_fkey
|
|
2544
|
-
FOREIGN KEY(table_id)
|
|
2545
|
-
REFERENCES metaschema_public."table" (id)
|
|
2546
|
-
ON DELETE CASCADE
|
|
2547
|
-
);
|
|
2548
|
-
|
|
2549
|
-
CREATE INDEX config_secrets_org_module_database_id_idx ON metaschema_modules_public.config_secrets_org_module (database_id);
|
|
2550
|
-
|
|
2551
|
-
CREATE INDEX config_secrets_org_module_schema_id_idx ON metaschema_modules_public.config_secrets_org_module (schema_id);
|
|
2552
|
-
|
|
2553
|
-
CREATE INDEX config_secrets_org_module_table_id_idx ON metaschema_modules_public.config_secrets_org_module (table_id);
|
|
2554
|
-
|
|
2555
|
-
COMMENT ON TABLE metaschema_modules_public.config_secrets_org_module IS 'Config row for the config_secrets_org_module, which provisions an organization-scoped encrypted key-value secrets store with manage_secrets permission and entity-membership RLS.';
|
|
2556
|
-
|
|
2557
2520
|
CREATE TABLE metaschema_modules_public.inference_log_module (
|
|
2558
2521
|
id uuid PRIMARY KEY DEFAULT uuidv7(),
|
|
2559
2522
|
database_id uuid NOT NULL,
|
|
@@ -2565,7 +2528,7 @@ CREATE TABLE metaschema_modules_public.inference_log_module (
|
|
|
2565
2528
|
inference_log_table_name text NOT NULL DEFAULT '',
|
|
2566
2529
|
usage_daily_table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
2567
2530
|
usage_daily_table_name text NOT NULL DEFAULT '',
|
|
2568
|
-
interval text NOT NULL DEFAULT '1 month',
|
|
2531
|
+
"interval" text NOT NULL DEFAULT '1 month',
|
|
2569
2532
|
retention text NOT NULL DEFAULT '12 months',
|
|
2570
2533
|
premake int NOT NULL DEFAULT 2,
|
|
2571
2534
|
scope text NOT NULL DEFAULT 'app',
|
|
@@ -2588,11 +2551,11 @@ CREATE TABLE metaschema_modules_public.inference_log_module (
|
|
|
2588
2551
|
ON DELETE CASCADE,
|
|
2589
2552
|
CONSTRAINT inference_log_table_fkey
|
|
2590
2553
|
FOREIGN KEY(inference_log_table_id)
|
|
2591
|
-
REFERENCES metaschema_public.
|
|
2554
|
+
REFERENCES metaschema_public.table (id)
|
|
2592
2555
|
ON DELETE CASCADE,
|
|
2593
2556
|
CONSTRAINT usage_daily_table_fkey
|
|
2594
2557
|
FOREIGN KEY(usage_daily_table_id)
|
|
2595
|
-
REFERENCES metaschema_public.
|
|
2558
|
+
REFERENCES metaschema_public.table (id)
|
|
2596
2559
|
ON DELETE CASCADE,
|
|
2597
2560
|
CONSTRAINT inference_log_module_database_id_prefix_unique
|
|
2598
2561
|
UNIQUE NULLS NOT DISTINCT (database_id, prefix)
|
|
@@ -2611,7 +2574,7 @@ CREATE TABLE metaschema_modules_public.compute_log_module (
|
|
|
2611
2574
|
compute_log_table_name text NOT NULL DEFAULT '',
|
|
2612
2575
|
usage_daily_table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
2613
2576
|
usage_daily_table_name text NOT NULL DEFAULT '',
|
|
2614
|
-
interval text NOT NULL DEFAULT '1 month',
|
|
2577
|
+
"interval" text NOT NULL DEFAULT '1 month',
|
|
2615
2578
|
retention text NOT NULL DEFAULT '12 months',
|
|
2616
2579
|
premake int NOT NULL DEFAULT 2,
|
|
2617
2580
|
scope text NOT NULL DEFAULT 'app',
|
|
@@ -2634,11 +2597,11 @@ CREATE TABLE metaschema_modules_public.compute_log_module (
|
|
|
2634
2597
|
ON DELETE CASCADE,
|
|
2635
2598
|
CONSTRAINT compute_log_table_fkey
|
|
2636
2599
|
FOREIGN KEY(compute_log_table_id)
|
|
2637
|
-
REFERENCES metaschema_public.
|
|
2600
|
+
REFERENCES metaschema_public.table (id)
|
|
2638
2601
|
ON DELETE CASCADE,
|
|
2639
2602
|
CONSTRAINT usage_daily_table_fkey
|
|
2640
2603
|
FOREIGN KEY(usage_daily_table_id)
|
|
2641
|
-
REFERENCES metaschema_public.
|
|
2604
|
+
REFERENCES metaschema_public.table (id)
|
|
2642
2605
|
ON DELETE CASCADE,
|
|
2643
2606
|
CONSTRAINT compute_log_module_database_id_prefix_unique
|
|
2644
2607
|
UNIQUE NULLS NOT DISTINCT (database_id, prefix)
|
|
@@ -2657,7 +2620,7 @@ CREATE TABLE metaschema_modules_public.transfer_log_module (
|
|
|
2657
2620
|
transfer_log_table_name text NOT NULL DEFAULT '',
|
|
2658
2621
|
usage_daily_table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
2659
2622
|
usage_daily_table_name text NOT NULL DEFAULT '',
|
|
2660
|
-
interval text NOT NULL DEFAULT '1 month',
|
|
2623
|
+
"interval" text NOT NULL DEFAULT '1 month',
|
|
2661
2624
|
retention text NOT NULL DEFAULT '12 months',
|
|
2662
2625
|
premake int NOT NULL DEFAULT 2,
|
|
2663
2626
|
scope text NOT NULL DEFAULT 'app',
|
|
@@ -2680,11 +2643,11 @@ CREATE TABLE metaschema_modules_public.transfer_log_module (
|
|
|
2680
2643
|
ON DELETE CASCADE,
|
|
2681
2644
|
CONSTRAINT transfer_log_table_fkey
|
|
2682
2645
|
FOREIGN KEY(transfer_log_table_id)
|
|
2683
|
-
REFERENCES metaschema_public.
|
|
2646
|
+
REFERENCES metaschema_public.table (id)
|
|
2684
2647
|
ON DELETE CASCADE,
|
|
2685
2648
|
CONSTRAINT usage_daily_table_fkey
|
|
2686
2649
|
FOREIGN KEY(usage_daily_table_id)
|
|
2687
|
-
REFERENCES metaschema_public.
|
|
2650
|
+
REFERENCES metaschema_public.table (id)
|
|
2688
2651
|
ON DELETE CASCADE,
|
|
2689
2652
|
CONSTRAINT transfer_log_module_database_id_prefix_unique
|
|
2690
2653
|
UNIQUE NULLS NOT DISTINCT (database_id, prefix)
|
|
@@ -2703,7 +2666,7 @@ CREATE TABLE metaschema_modules_public.storage_log_module (
|
|
|
2703
2666
|
storage_log_table_name text NOT NULL DEFAULT '',
|
|
2704
2667
|
usage_daily_table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
2705
2668
|
usage_daily_table_name text NOT NULL DEFAULT '',
|
|
2706
|
-
interval text NOT NULL DEFAULT '1 month',
|
|
2669
|
+
"interval" text NOT NULL DEFAULT '1 month',
|
|
2707
2670
|
retention text NOT NULL DEFAULT '12 months',
|
|
2708
2671
|
premake int NOT NULL DEFAULT 2,
|
|
2709
2672
|
scope text NOT NULL DEFAULT 'app',
|
|
@@ -2726,11 +2689,11 @@ CREATE TABLE metaschema_modules_public.storage_log_module (
|
|
|
2726
2689
|
ON DELETE CASCADE,
|
|
2727
2690
|
CONSTRAINT storage_log_table_fkey
|
|
2728
2691
|
FOREIGN KEY(storage_log_table_id)
|
|
2729
|
-
REFERENCES metaschema_public.
|
|
2692
|
+
REFERENCES metaschema_public.table (id)
|
|
2730
2693
|
ON DELETE CASCADE,
|
|
2731
2694
|
CONSTRAINT usage_daily_table_fkey
|
|
2732
2695
|
FOREIGN KEY(usage_daily_table_id)
|
|
2733
|
-
REFERENCES metaschema_public.
|
|
2696
|
+
REFERENCES metaschema_public.table (id)
|
|
2734
2697
|
ON DELETE CASCADE,
|
|
2735
2698
|
CONSTRAINT storage_log_module_database_id_prefix_unique
|
|
2736
2699
|
UNIQUE NULLS NOT DISTINCT (database_id, prefix)
|
|
@@ -2753,7 +2716,7 @@ CREATE TABLE metaschema_modules_public.db_usage_module (
|
|
|
2753
2716
|
query_stats_log_table_name text NOT NULL DEFAULT '',
|
|
2754
2717
|
query_stats_daily_table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
2755
2718
|
query_stats_daily_table_name text NOT NULL DEFAULT '',
|
|
2756
|
-
interval text NOT NULL DEFAULT '1 month',
|
|
2719
|
+
"interval" text NOT NULL DEFAULT '1 month',
|
|
2757
2720
|
retention text NOT NULL DEFAULT '12 months',
|
|
2758
2721
|
premake int NOT NULL DEFAULT 2,
|
|
2759
2722
|
scope text NOT NULL DEFAULT 'app',
|
|
@@ -2775,19 +2738,19 @@ CREATE TABLE metaschema_modules_public.db_usage_module (
|
|
|
2775
2738
|
ON DELETE CASCADE,
|
|
2776
2739
|
CONSTRAINT table_stats_log_table_fkey
|
|
2777
2740
|
FOREIGN KEY(table_stats_log_table_id)
|
|
2778
|
-
REFERENCES metaschema_public.
|
|
2741
|
+
REFERENCES metaschema_public.table (id)
|
|
2779
2742
|
ON DELETE CASCADE,
|
|
2780
2743
|
CONSTRAINT table_stats_daily_table_fkey
|
|
2781
2744
|
FOREIGN KEY(table_stats_daily_table_id)
|
|
2782
|
-
REFERENCES metaschema_public.
|
|
2745
|
+
REFERENCES metaschema_public.table (id)
|
|
2783
2746
|
ON DELETE CASCADE,
|
|
2784
2747
|
CONSTRAINT query_stats_log_table_fkey
|
|
2785
2748
|
FOREIGN KEY(query_stats_log_table_id)
|
|
2786
|
-
REFERENCES metaschema_public.
|
|
2749
|
+
REFERENCES metaschema_public.table (id)
|
|
2787
2750
|
ON DELETE CASCADE,
|
|
2788
2751
|
CONSTRAINT query_stats_daily_table_fkey
|
|
2789
2752
|
FOREIGN KEY(query_stats_daily_table_id)
|
|
2790
|
-
REFERENCES metaschema_public.
|
|
2753
|
+
REFERENCES metaschema_public.table (id)
|
|
2791
2754
|
ON DELETE CASCADE,
|
|
2792
2755
|
CONSTRAINT db_usage_module_database_id_prefix_unique
|
|
2793
2756
|
UNIQUE NULLS NOT DISTINCT (database_id, prefix)
|
|
@@ -2845,39 +2808,39 @@ CREATE TABLE metaschema_modules_public.agent_module (
|
|
|
2845
2808
|
ON DELETE CASCADE,
|
|
2846
2809
|
CONSTRAINT agent_module_thread_table_fkey
|
|
2847
2810
|
FOREIGN KEY(thread_table_id)
|
|
2848
|
-
REFERENCES metaschema_public.
|
|
2811
|
+
REFERENCES metaschema_public.table (id)
|
|
2849
2812
|
ON DELETE CASCADE,
|
|
2850
2813
|
CONSTRAINT agent_module_message_table_fkey
|
|
2851
2814
|
FOREIGN KEY(message_table_id)
|
|
2852
|
-
REFERENCES metaschema_public.
|
|
2815
|
+
REFERENCES metaschema_public.table (id)
|
|
2853
2816
|
ON DELETE CASCADE,
|
|
2854
2817
|
CONSTRAINT agent_module_task_table_fkey
|
|
2855
2818
|
FOREIGN KEY(task_table_id)
|
|
2856
|
-
REFERENCES metaschema_public.
|
|
2819
|
+
REFERENCES metaschema_public.table (id)
|
|
2857
2820
|
ON DELETE CASCADE,
|
|
2858
2821
|
CONSTRAINT agent_module_prompts_table_fkey
|
|
2859
2822
|
FOREIGN KEY(prompts_table_id)
|
|
2860
|
-
REFERENCES metaschema_public.
|
|
2823
|
+
REFERENCES metaschema_public.table (id)
|
|
2861
2824
|
ON DELETE CASCADE,
|
|
2862
2825
|
CONSTRAINT agent_module_plan_table_fkey
|
|
2863
2826
|
FOREIGN KEY(plan_table_id)
|
|
2864
|
-
REFERENCES metaschema_public.
|
|
2827
|
+
REFERENCES metaschema_public.table (id)
|
|
2865
2828
|
ON DELETE CASCADE,
|
|
2866
2829
|
CONSTRAINT agent_module_agent_table_fkey
|
|
2867
2830
|
FOREIGN KEY(agent_table_id)
|
|
2868
|
-
REFERENCES metaschema_public.
|
|
2831
|
+
REFERENCES metaschema_public.table (id)
|
|
2869
2832
|
ON DELETE CASCADE,
|
|
2870
2833
|
CONSTRAINT agent_module_persona_table_fkey
|
|
2871
2834
|
FOREIGN KEY(persona_table_id)
|
|
2872
|
-
REFERENCES metaschema_public.
|
|
2835
|
+
REFERENCES metaschema_public.table (id)
|
|
2873
2836
|
ON DELETE CASCADE,
|
|
2874
2837
|
CONSTRAINT agent_module_resource_table_fkey
|
|
2875
2838
|
FOREIGN KEY(resource_table_id)
|
|
2876
|
-
REFERENCES metaschema_public.
|
|
2839
|
+
REFERENCES metaschema_public.table (id)
|
|
2877
2840
|
ON DELETE CASCADE,
|
|
2878
2841
|
CONSTRAINT agent_module_entity_table_fkey
|
|
2879
2842
|
FOREIGN KEY(entity_table_id)
|
|
2880
|
-
REFERENCES metaschema_public.
|
|
2843
|
+
REFERENCES metaschema_public.table (id)
|
|
2881
2844
|
ON DELETE CASCADE
|
|
2882
2845
|
);
|
|
2883
2846
|
|
|
@@ -2917,19 +2880,19 @@ CREATE TABLE metaschema_modules_public.merkle_store_module (
|
|
|
2917
2880
|
ON DELETE CASCADE,
|
|
2918
2881
|
CONSTRAINT object_table_fkey
|
|
2919
2882
|
FOREIGN KEY(object_table_id)
|
|
2920
|
-
REFERENCES metaschema_public.
|
|
2883
|
+
REFERENCES metaschema_public.table (id)
|
|
2921
2884
|
ON DELETE CASCADE,
|
|
2922
2885
|
CONSTRAINT store_table_fkey
|
|
2923
2886
|
FOREIGN KEY(store_table_id)
|
|
2924
|
-
REFERENCES metaschema_public.
|
|
2887
|
+
REFERENCES metaschema_public.table (id)
|
|
2925
2888
|
ON DELETE CASCADE,
|
|
2926
2889
|
CONSTRAINT commit_table_fkey
|
|
2927
2890
|
FOREIGN KEY(commit_table_id)
|
|
2928
|
-
REFERENCES metaschema_public.
|
|
2891
|
+
REFERENCES metaschema_public.table (id)
|
|
2929
2892
|
ON DELETE CASCADE,
|
|
2930
2893
|
CONSTRAINT ref_table_fkey
|
|
2931
2894
|
FOREIGN KEY(ref_table_id)
|
|
2932
|
-
REFERENCES metaschema_public.
|
|
2895
|
+
REFERENCES metaschema_public.table (id)
|
|
2933
2896
|
ON DELETE CASCADE,
|
|
2934
2897
|
CONSTRAINT merkle_store_module_database_prefix_unique
|
|
2935
2898
|
UNIQUE (database_id, prefix)
|
|
@@ -2975,11 +2938,11 @@ CREATE TABLE metaschema_modules_public.graph_module (
|
|
|
2975
2938
|
ON DELETE CASCADE,
|
|
2976
2939
|
CONSTRAINT graphs_table_fkey
|
|
2977
2940
|
FOREIGN KEY(graphs_table_id)
|
|
2978
|
-
REFERENCES metaschema_public.
|
|
2941
|
+
REFERENCES metaschema_public.table (id)
|
|
2979
2942
|
ON DELETE CASCADE,
|
|
2980
2943
|
CONSTRAINT graph_module_entity_table_fkey
|
|
2981
2944
|
FOREIGN KEY(entity_table_id)
|
|
2982
|
-
REFERENCES metaschema_public.
|
|
2945
|
+
REFERENCES metaschema_public.table (id)
|
|
2983
2946
|
ON DELETE CASCADE,
|
|
2984
2947
|
CONSTRAINT graph_module_database_merkle_unique
|
|
2985
2948
|
UNIQUE (database_id, merkle_store_module_id)
|
|
@@ -3028,25 +2991,25 @@ CREATE TABLE metaschema_modules_public.graph_execution_module (
|
|
|
3028
2991
|
ON DELETE CASCADE,
|
|
3029
2992
|
CONSTRAINT graph_execution_module_executions_table_fkey
|
|
3030
2993
|
FOREIGN KEY(executions_table_id)
|
|
3031
|
-
REFERENCES metaschema_public.
|
|
2994
|
+
REFERENCES metaschema_public.table (id)
|
|
3032
2995
|
ON DELETE CASCADE,
|
|
3033
2996
|
CONSTRAINT graph_execution_module_outputs_table_fkey
|
|
3034
2997
|
FOREIGN KEY(outputs_table_id)
|
|
3035
|
-
REFERENCES metaschema_public.
|
|
2998
|
+
REFERENCES metaschema_public.table (id)
|
|
3036
2999
|
ON DELETE CASCADE,
|
|
3037
3000
|
CONSTRAINT graph_execution_module_node_states_table_fkey
|
|
3038
3001
|
FOREIGN KEY(node_states_table_id)
|
|
3039
|
-
REFERENCES metaschema_public.
|
|
3002
|
+
REFERENCES metaschema_public.table (id)
|
|
3040
3003
|
ON DELETE CASCADE,
|
|
3041
3004
|
CONSTRAINT graph_execution_module_entity_table_fkey
|
|
3042
3005
|
FOREIGN KEY(entity_table_id)
|
|
3043
|
-
REFERENCES metaschema_public.
|
|
3006
|
+
REFERENCES metaschema_public.table (id)
|
|
3044
3007
|
ON DELETE CASCADE
|
|
3045
3008
|
);
|
|
3046
3009
|
|
|
3047
3010
|
CREATE INDEX graph_execution_module_database_id_idx ON metaschema_modules_public.graph_execution_module (database_id);
|
|
3048
3011
|
|
|
3049
|
-
CREATE UNIQUE INDEX graph_execution_module_unique_scope ON metaschema_modules_public.graph_execution_module (database_id, scope
|
|
3012
|
+
CREATE UNIQUE INDEX graph_execution_module_unique_scope ON metaschema_modules_public.graph_execution_module (database_id, scope);
|
|
3050
3013
|
|
|
3051
3014
|
CREATE TABLE metaschema_modules_public.namespace_module (
|
|
3052
3015
|
id uuid PRIMARY KEY DEFAULT uuidv7(),
|
|
@@ -3064,7 +3027,6 @@ CREATE TABLE metaschema_modules_public.namespace_module (
|
|
|
3064
3027
|
scope text NOT NULL DEFAULT 'app',
|
|
3065
3028
|
prefix text NOT NULL DEFAULT '',
|
|
3066
3029
|
entity_table_id uuid NULL,
|
|
3067
|
-
platform_namespaces_table_id uuid NULL,
|
|
3068
3030
|
policies jsonb NULL,
|
|
3069
3031
|
provisions jsonb NULL,
|
|
3070
3032
|
default_permissions text[] DEFAULT NULL,
|
|
@@ -3082,21 +3044,21 @@ CREATE TABLE metaschema_modules_public.namespace_module (
|
|
|
3082
3044
|
ON DELETE CASCADE,
|
|
3083
3045
|
CONSTRAINT namespace_module_namespaces_table_fkey
|
|
3084
3046
|
FOREIGN KEY(namespaces_table_id)
|
|
3085
|
-
REFERENCES metaschema_public.
|
|
3047
|
+
REFERENCES metaschema_public.table (id)
|
|
3086
3048
|
ON DELETE CASCADE,
|
|
3087
3049
|
CONSTRAINT namespace_module_events_table_fkey
|
|
3088
3050
|
FOREIGN KEY(namespace_events_table_id)
|
|
3089
|
-
REFERENCES metaschema_public.
|
|
3051
|
+
REFERENCES metaschema_public.table (id)
|
|
3090
3052
|
ON DELETE CASCADE,
|
|
3091
3053
|
CONSTRAINT namespace_module_entity_table_fkey
|
|
3092
3054
|
FOREIGN KEY(entity_table_id)
|
|
3093
|
-
REFERENCES metaschema_public.
|
|
3055
|
+
REFERENCES metaschema_public.table (id)
|
|
3094
3056
|
ON DELETE CASCADE
|
|
3095
3057
|
);
|
|
3096
3058
|
|
|
3097
3059
|
CREATE INDEX namespace_module_database_id_idx ON metaschema_modules_public.namespace_module (database_id);
|
|
3098
3060
|
|
|
3099
|
-
CREATE UNIQUE INDEX namespace_module_unique_scope ON metaschema_modules_public.namespace_module (database_id, scope
|
|
3061
|
+
CREATE UNIQUE INDEX namespace_module_unique_scope ON metaschema_modules_public.namespace_module (database_id, scope);
|
|
3100
3062
|
|
|
3101
3063
|
CREATE TABLE metaschema_modules_public.function_module (
|
|
3102
3064
|
id uuid PRIMARY KEY DEFAULT uuidv7(),
|
|
@@ -3106,9 +3068,7 @@ CREATE TABLE metaschema_modules_public.function_module (
|
|
|
3106
3068
|
public_schema_name text,
|
|
3107
3069
|
private_schema_name text,
|
|
3108
3070
|
definitions_table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
3109
|
-
secret_definitions_table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
3110
3071
|
definitions_table_name text NOT NULL DEFAULT 'function_definitions',
|
|
3111
|
-
secret_definitions_table_name text NOT NULL DEFAULT 'secret_definitions',
|
|
3112
3072
|
api_name text,
|
|
3113
3073
|
private_api_name text,
|
|
3114
3074
|
scope text NOT NULL DEFAULT 'app',
|
|
@@ -3131,21 +3091,17 @@ CREATE TABLE metaschema_modules_public.function_module (
|
|
|
3131
3091
|
ON DELETE CASCADE,
|
|
3132
3092
|
CONSTRAINT function_module_definitions_table_fkey
|
|
3133
3093
|
FOREIGN KEY(definitions_table_id)
|
|
3134
|
-
REFERENCES metaschema_public.
|
|
3135
|
-
ON DELETE CASCADE,
|
|
3136
|
-
CONSTRAINT function_module_secret_defs_table_fkey
|
|
3137
|
-
FOREIGN KEY(secret_definitions_table_id)
|
|
3138
|
-
REFERENCES metaschema_public."table" (id)
|
|
3094
|
+
REFERENCES metaschema_public.table (id)
|
|
3139
3095
|
ON DELETE CASCADE,
|
|
3140
3096
|
CONSTRAINT function_module_entity_table_fkey
|
|
3141
3097
|
FOREIGN KEY(entity_table_id)
|
|
3142
|
-
REFERENCES metaschema_public.
|
|
3098
|
+
REFERENCES metaschema_public.table (id)
|
|
3143
3099
|
ON DELETE CASCADE
|
|
3144
3100
|
);
|
|
3145
3101
|
|
|
3146
3102
|
CREATE INDEX function_module_database_id_idx ON metaschema_modules_public.function_module (database_id);
|
|
3147
3103
|
|
|
3148
|
-
CREATE UNIQUE INDEX function_module_unique_scope ON metaschema_modules_public.function_module (database_id, scope
|
|
3104
|
+
CREATE UNIQUE INDEX function_module_unique_scope ON metaschema_modules_public.function_module (database_id, scope);
|
|
3149
3105
|
|
|
3150
3106
|
CREATE TABLE metaschema_modules_public.function_invocation_module (
|
|
3151
3107
|
id uuid PRIMARY KEY DEFAULT uuidv7(),
|
|
@@ -3180,21 +3136,21 @@ CREATE TABLE metaschema_modules_public.function_invocation_module (
|
|
|
3180
3136
|
ON DELETE CASCADE,
|
|
3181
3137
|
CONSTRAINT function_invocation_module_invocations_table_fkey
|
|
3182
3138
|
FOREIGN KEY(invocations_table_id)
|
|
3183
|
-
REFERENCES metaschema_public.
|
|
3139
|
+
REFERENCES metaschema_public.table (id)
|
|
3184
3140
|
ON DELETE CASCADE,
|
|
3185
3141
|
CONSTRAINT function_invocation_module_logs_table_fkey
|
|
3186
3142
|
FOREIGN KEY(execution_logs_table_id)
|
|
3187
|
-
REFERENCES metaschema_public.
|
|
3143
|
+
REFERENCES metaschema_public.table (id)
|
|
3188
3144
|
ON DELETE CASCADE,
|
|
3189
3145
|
CONSTRAINT function_invocation_module_entity_table_fkey
|
|
3190
3146
|
FOREIGN KEY(entity_table_id)
|
|
3191
|
-
REFERENCES metaschema_public.
|
|
3147
|
+
REFERENCES metaschema_public.table (id)
|
|
3192
3148
|
ON DELETE CASCADE
|
|
3193
3149
|
);
|
|
3194
3150
|
|
|
3195
3151
|
CREATE INDEX function_invocation_module_database_id_idx ON metaschema_modules_public.function_invocation_module (database_id);
|
|
3196
3152
|
|
|
3197
|
-
CREATE UNIQUE INDEX function_invocation_module_unique_scope ON metaschema_modules_public.function_invocation_module (database_id, scope
|
|
3153
|
+
CREATE UNIQUE INDEX function_invocation_module_unique_scope ON metaschema_modules_public.function_invocation_module (database_id, scope);
|
|
3198
3154
|
|
|
3199
3155
|
CREATE TABLE metaschema_modules_public.config_secrets_module (
|
|
3200
3156
|
id uuid PRIMARY KEY DEFAULT uuidv7(),
|
|
@@ -3204,7 +3160,6 @@ CREATE TABLE metaschema_modules_public.config_secrets_module (
|
|
|
3204
3160
|
public_schema_name text,
|
|
3205
3161
|
private_schema_name text,
|
|
3206
3162
|
table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
3207
|
-
config_definitions_table_id uuid NULL DEFAULT NULL,
|
|
3208
3163
|
table_name text NOT NULL DEFAULT 'secrets',
|
|
3209
3164
|
api_name text DEFAULT 'config',
|
|
3210
3165
|
private_api_name text DEFAULT NULL,
|
|
@@ -3228,15 +3183,11 @@ CREATE TABLE metaschema_modules_public.config_secrets_module (
|
|
|
3228
3183
|
ON DELETE CASCADE,
|
|
3229
3184
|
CONSTRAINT config_secrets_module_table_fkey
|
|
3230
3185
|
FOREIGN KEY(table_id)
|
|
3231
|
-
REFERENCES metaschema_public.
|
|
3232
|
-
ON DELETE CASCADE,
|
|
3233
|
-
CONSTRAINT config_secrets_module_config_defs_table_fkey
|
|
3234
|
-
FOREIGN KEY(config_definitions_table_id)
|
|
3235
|
-
REFERENCES metaschema_public."table" (id)
|
|
3186
|
+
REFERENCES metaschema_public.table (id)
|
|
3236
3187
|
ON DELETE CASCADE,
|
|
3237
3188
|
CONSTRAINT config_secrets_module_entity_table_fkey
|
|
3238
3189
|
FOREIGN KEY(entity_table_id)
|
|
3239
|
-
REFERENCES metaschema_public.
|
|
3190
|
+
REFERENCES metaschema_public.table (id)
|
|
3240
3191
|
ON DELETE CASCADE
|
|
3241
3192
|
);
|
|
3242
3193
|
|
|
@@ -3246,10 +3197,10 @@ CREATE INDEX config_secrets_module_schema_id_idx ON metaschema_modules_public.co
|
|
|
3246
3197
|
|
|
3247
3198
|
CREATE INDEX config_secrets_module_table_id_idx ON metaschema_modules_public.config_secrets_module (table_id);
|
|
3248
3199
|
|
|
3249
|
-
CREATE UNIQUE INDEX config_secrets_module_unique_scope ON metaschema_modules_public.config_secrets_module (database_id, scope
|
|
3200
|
+
CREATE UNIQUE INDEX config_secrets_module_unique_scope ON metaschema_modules_public.config_secrets_module (database_id, scope);
|
|
3250
3201
|
|
|
3251
3202
|
COMMENT ON TABLE metaschema_modules_public.config_secrets_module IS 'Entity-aware PGP-encrypted key-value config/secrets module. Supports app-level (admin-only)
|
|
3252
|
-
and
|
|
3203
|
+
and platform/database-scoped infra secrets via the scope column.
|
|
3253
3204
|
User-scoped bcrypt credentials are handled by user_credentials_module.';
|
|
3254
3205
|
|
|
3255
3206
|
CREATE TABLE metaschema_modules_public.user_credentials_module (
|
|
@@ -3270,7 +3221,7 @@ CREATE TABLE metaschema_modules_public.user_credentials_module (
|
|
|
3270
3221
|
ON DELETE CASCADE,
|
|
3271
3222
|
CONSTRAINT user_credentials_module_table_fkey
|
|
3272
3223
|
FOREIGN KEY(table_id)
|
|
3273
|
-
REFERENCES metaschema_public.
|
|
3224
|
+
REFERENCES metaschema_public.table (id)
|
|
3274
3225
|
ON DELETE CASCADE
|
|
3275
3226
|
);
|
|
3276
3227
|
|
|
@@ -3304,11 +3255,11 @@ CREATE TABLE metaschema_modules_public.user_settings_module (
|
|
|
3304
3255
|
ON DELETE CASCADE,
|
|
3305
3256
|
CONSTRAINT table_fkey
|
|
3306
3257
|
FOREIGN KEY(table_id)
|
|
3307
|
-
REFERENCES metaschema_public.
|
|
3258
|
+
REFERENCES metaschema_public.table (id)
|
|
3308
3259
|
ON DELETE CASCADE,
|
|
3309
3260
|
CONSTRAINT owner_table_fkey
|
|
3310
3261
|
FOREIGN KEY(owner_table_id)
|
|
3311
|
-
REFERENCES metaschema_public.
|
|
3262
|
+
REFERENCES metaschema_public.table (id)
|
|
3312
3263
|
ON DELETE CASCADE
|
|
3313
3264
|
);
|
|
3314
3265
|
|
|
@@ -3338,7 +3289,7 @@ CREATE TABLE metaschema_modules_public.i18n_module (
|
|
|
3338
3289
|
ON DELETE CASCADE,
|
|
3339
3290
|
CONSTRAINT settings_table_fkey
|
|
3340
3291
|
FOREIGN KEY(settings_table_id)
|
|
3341
|
-
REFERENCES metaschema_public.
|
|
3292
|
+
REFERENCES metaschema_public.table (id)
|
|
3342
3293
|
ON DELETE CASCADE
|
|
3343
3294
|
);
|
|
3344
3295
|
|
|
@@ -3381,15 +3332,15 @@ CREATE TABLE metaschema_modules_public.function_deployment_module (
|
|
|
3381
3332
|
ON DELETE CASCADE,
|
|
3382
3333
|
CONSTRAINT function_deployment_module_deployments_table_fkey
|
|
3383
3334
|
FOREIGN KEY(deployments_table_id)
|
|
3384
|
-
REFERENCES metaschema_public.
|
|
3335
|
+
REFERENCES metaschema_public.table (id)
|
|
3385
3336
|
ON DELETE CASCADE,
|
|
3386
3337
|
CONSTRAINT function_deployment_module_events_table_fkey
|
|
3387
3338
|
FOREIGN KEY(deployment_events_table_id)
|
|
3388
|
-
REFERENCES metaschema_public.
|
|
3339
|
+
REFERENCES metaschema_public.table (id)
|
|
3389
3340
|
ON DELETE CASCADE,
|
|
3390
3341
|
CONSTRAINT function_deployment_module_entity_table_fkey
|
|
3391
3342
|
FOREIGN KEY(entity_table_id)
|
|
3392
|
-
REFERENCES metaschema_public.
|
|
3343
|
+
REFERENCES metaschema_public.table (id)
|
|
3393
3344
|
ON DELETE CASCADE,
|
|
3394
3345
|
CONSTRAINT function_deployment_module_function_module_fkey
|
|
3395
3346
|
FOREIGN KEY(function_module_id)
|
|
@@ -3403,7 +3354,7 @@ CREATE TABLE metaschema_modules_public.function_deployment_module (
|
|
|
3403
3354
|
|
|
3404
3355
|
CREATE INDEX function_deployment_module_database_id_idx ON metaschema_modules_public.function_deployment_module (database_id);
|
|
3405
3356
|
|
|
3406
|
-
CREATE UNIQUE INDEX function_deployment_module_unique_scope ON metaschema_modules_public.function_deployment_module (database_id, scope
|
|
3357
|
+
CREATE UNIQUE INDEX function_deployment_module_unique_scope ON metaschema_modules_public.function_deployment_module (database_id, scope);
|
|
3407
3358
|
|
|
3408
3359
|
CREATE TABLE metaschema_modules_public.principal_auth_module (
|
|
3409
3360
|
id uuid PRIMARY KEY DEFAULT uuidv7(),
|
|
@@ -3434,23 +3385,23 @@ CREATE TABLE metaschema_modules_public.principal_auth_module (
|
|
|
3434
3385
|
ON DELETE CASCADE,
|
|
3435
3386
|
CONSTRAINT principals_table_fkey
|
|
3436
3387
|
FOREIGN KEY(principals_table_id)
|
|
3437
|
-
REFERENCES metaschema_public.
|
|
3388
|
+
REFERENCES metaschema_public.table (id)
|
|
3438
3389
|
ON DELETE CASCADE,
|
|
3439
3390
|
CONSTRAINT principal_entities_table_fkey
|
|
3440
3391
|
FOREIGN KEY(principal_entities_table_id)
|
|
3441
|
-
REFERENCES metaschema_public.
|
|
3392
|
+
REFERENCES metaschema_public.table (id)
|
|
3442
3393
|
ON DELETE CASCADE,
|
|
3443
3394
|
CONSTRAINT users_table_fkey
|
|
3444
3395
|
FOREIGN KEY(users_table_id)
|
|
3445
|
-
REFERENCES metaschema_public.
|
|
3396
|
+
REFERENCES metaschema_public.table (id)
|
|
3446
3397
|
ON DELETE CASCADE,
|
|
3447
3398
|
CONSTRAINT sessions_table_fkey
|
|
3448
3399
|
FOREIGN KEY(sessions_table_id)
|
|
3449
|
-
REFERENCES metaschema_public.
|
|
3400
|
+
REFERENCES metaschema_public.table (id)
|
|
3450
3401
|
ON DELETE CASCADE,
|
|
3451
3402
|
CONSTRAINT session_credentials_table_fkey
|
|
3452
3403
|
FOREIGN KEY(session_credentials_table_id)
|
|
3453
|
-
REFERENCES metaschema_public.
|
|
3404
|
+
REFERENCES metaschema_public.table (id)
|
|
3454
3405
|
ON DELETE CASCADE
|
|
3455
3406
|
);
|
|
3456
3407
|
|
|
@@ -3468,208 +3419,68 @@ COMMENT ON CONSTRAINT principal_entities_table_fkey ON metaschema_modules_public
|
|
|
3468
3419
|
|
|
3469
3420
|
COMMENT ON TABLE metaschema_modules_public.principal_auth_module IS 'Provisions the principals subsystem: a principals table, a principal_entities junction table, create/delete mutations, and org API key management. Supports both human-owned principals (AuthzDirectOwner, AuthzHumanOnly) and org-owned principals (AuthzEntityMembership with is_admin). Org principal and org API key functions are only generated when an org-scoped memberships_module exists for the database.';
|
|
3470
3421
|
|
|
3471
|
-
CREATE TABLE metaschema_modules_public.
|
|
3422
|
+
CREATE TABLE metaschema_modules_public.resource_module (
|
|
3472
3423
|
id uuid PRIMARY KEY DEFAULT uuidv7(),
|
|
3473
3424
|
database_id uuid NOT NULL,
|
|
3474
3425
|
schema_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
3475
3426
|
private_schema_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
3476
3427
|
public_schema_name text,
|
|
3477
3428
|
private_schema_name text,
|
|
3478
|
-
|
|
3479
|
-
|
|
3480
|
-
|
|
3481
|
-
|
|
3482
|
-
|
|
3483
|
-
|
|
3484
|
-
|
|
3485
|
-
|
|
3486
|
-
provisions jsonb NULL,
|
|
3487
|
-
default_permissions text[] DEFAULT NULL,
|
|
3488
|
-
CONSTRAINT server_definition_module_db_fkey
|
|
3489
|
-
FOREIGN KEY(database_id)
|
|
3490
|
-
REFERENCES metaschema_public.database (id)
|
|
3491
|
-
ON DELETE CASCADE,
|
|
3492
|
-
CONSTRAINT server_definition_module_schema_fkey
|
|
3493
|
-
FOREIGN KEY(schema_id)
|
|
3494
|
-
REFERENCES metaschema_public.schema (id)
|
|
3495
|
-
ON DELETE CASCADE,
|
|
3496
|
-
CONSTRAINT server_definition_module_private_schema_fkey
|
|
3497
|
-
FOREIGN KEY(private_schema_id)
|
|
3498
|
-
REFERENCES metaschema_public.schema (id)
|
|
3499
|
-
ON DELETE CASCADE,
|
|
3500
|
-
CONSTRAINT server_definition_module_definitions_table_fkey
|
|
3501
|
-
FOREIGN KEY(definitions_table_id)
|
|
3502
|
-
REFERENCES metaschema_public."table" (id)
|
|
3503
|
-
ON DELETE CASCADE,
|
|
3504
|
-
CONSTRAINT server_definition_module_entity_table_fkey
|
|
3505
|
-
FOREIGN KEY(entity_table_id)
|
|
3506
|
-
REFERENCES metaschema_public."table" (id)
|
|
3507
|
-
ON DELETE CASCADE
|
|
3508
|
-
);
|
|
3509
|
-
|
|
3510
|
-
CREATE INDEX server_definition_module_database_id_idx ON metaschema_modules_public.server_definition_module (database_id);
|
|
3511
|
-
|
|
3512
|
-
CREATE UNIQUE INDEX server_definition_module_unique_scope ON metaschema_modules_public.server_definition_module (database_id, scope, prefix);
|
|
3513
|
-
|
|
3514
|
-
CREATE TABLE metaschema_modules_public.server_deployment_module (
|
|
3515
|
-
id uuid PRIMARY KEY DEFAULT uuidv7(),
|
|
3516
|
-
database_id uuid NOT NULL,
|
|
3517
|
-
schema_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
3518
|
-
private_schema_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
3519
|
-
public_schema_name text,
|
|
3520
|
-
private_schema_name text,
|
|
3521
|
-
deployments_table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
3522
|
-
deployment_events_table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
3523
|
-
deployments_table_name text NOT NULL DEFAULT 'server_deployments',
|
|
3524
|
-
deployment_events_table_name text NOT NULL DEFAULT 'server_deployment_events',
|
|
3429
|
+
resources_table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
3430
|
+
resource_events_table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
3431
|
+
resource_status_checks_table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
3432
|
+
resource_definitions_table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
3433
|
+
resources_table_name text NOT NULL DEFAULT 'resources',
|
|
3434
|
+
resource_events_table_name text NOT NULL DEFAULT 'resource_events',
|
|
3435
|
+
resource_status_checks_table_name text NOT NULL DEFAULT 'resource_status_checks',
|
|
3436
|
+
resource_definitions_table_name text NOT NULL DEFAULT 'resource_definitions',
|
|
3525
3437
|
api_name text,
|
|
3526
3438
|
private_api_name text,
|
|
3527
3439
|
scope text NOT NULL DEFAULT 'app',
|
|
3528
3440
|
prefix text NOT NULL DEFAULT '',
|
|
3529
3441
|
entity_table_id uuid NULL,
|
|
3530
|
-
server_definition_module_id uuid NULL,
|
|
3531
3442
|
namespace_module_id uuid NULL,
|
|
3532
3443
|
policies jsonb NULL,
|
|
3533
3444
|
provisions jsonb NULL,
|
|
3534
3445
|
default_permissions text[] DEFAULT NULL,
|
|
3535
|
-
CONSTRAINT
|
|
3446
|
+
CONSTRAINT resource_module_db_fkey
|
|
3536
3447
|
FOREIGN KEY(database_id)
|
|
3537
3448
|
REFERENCES metaschema_public.database (id)
|
|
3538
3449
|
ON DELETE CASCADE,
|
|
3539
|
-
CONSTRAINT
|
|
3450
|
+
CONSTRAINT resource_module_schema_fkey
|
|
3540
3451
|
FOREIGN KEY(schema_id)
|
|
3541
3452
|
REFERENCES metaschema_public.schema (id)
|
|
3542
3453
|
ON DELETE CASCADE,
|
|
3543
|
-
CONSTRAINT
|
|
3454
|
+
CONSTRAINT resource_module_private_schema_fkey
|
|
3544
3455
|
FOREIGN KEY(private_schema_id)
|
|
3545
3456
|
REFERENCES metaschema_public.schema (id)
|
|
3546
3457
|
ON DELETE CASCADE,
|
|
3547
|
-
CONSTRAINT
|
|
3548
|
-
FOREIGN KEY(
|
|
3549
|
-
REFERENCES metaschema_public.
|
|
3458
|
+
CONSTRAINT resource_module_resources_table_fkey
|
|
3459
|
+
FOREIGN KEY(resources_table_id)
|
|
3460
|
+
REFERENCES metaschema_public.table (id)
|
|
3550
3461
|
ON DELETE CASCADE,
|
|
3551
|
-
CONSTRAINT
|
|
3552
|
-
FOREIGN KEY(
|
|
3553
|
-
REFERENCES metaschema_public.
|
|
3462
|
+
CONSTRAINT resource_module_events_table_fkey
|
|
3463
|
+
FOREIGN KEY(resource_events_table_id)
|
|
3464
|
+
REFERENCES metaschema_public.table (id)
|
|
3465
|
+
ON DELETE CASCADE,
|
|
3466
|
+
CONSTRAINT resource_module_status_checks_table_fkey
|
|
3467
|
+
FOREIGN KEY(resource_status_checks_table_id)
|
|
3468
|
+
REFERENCES metaschema_public.table (id)
|
|
3469
|
+
ON DELETE CASCADE,
|
|
3470
|
+
CONSTRAINT resource_module_definitions_table_fkey
|
|
3471
|
+
FOREIGN KEY(resource_definitions_table_id)
|
|
3472
|
+
REFERENCES metaschema_public.table (id)
|
|
3554
3473
|
ON DELETE CASCADE,
|
|
3555
|
-
CONSTRAINT
|
|
3474
|
+
CONSTRAINT resource_module_entity_table_fkey
|
|
3556
3475
|
FOREIGN KEY(entity_table_id)
|
|
3557
|
-
REFERENCES metaschema_public.
|
|
3476
|
+
REFERENCES metaschema_public.table (id)
|
|
3558
3477
|
ON DELETE CASCADE,
|
|
3559
|
-
CONSTRAINT
|
|
3560
|
-
FOREIGN KEY(server_definition_module_id)
|
|
3561
|
-
REFERENCES metaschema_modules_public.server_definition_module (id)
|
|
3562
|
-
ON DELETE SET NULL,
|
|
3563
|
-
CONSTRAINT server_deployment_module_namespace_module_fkey
|
|
3478
|
+
CONSTRAINT resource_module_namespace_module_fkey
|
|
3564
3479
|
FOREIGN KEY(namespace_module_id)
|
|
3565
3480
|
REFERENCES metaschema_modules_public.namespace_module (id)
|
|
3566
3481
|
ON DELETE SET NULL
|
|
3567
3482
|
);
|
|
3568
3483
|
|
|
3569
|
-
CREATE INDEX
|
|
3570
|
-
|
|
3571
|
-
CREATE UNIQUE INDEX server_deployment_module_unique_scope ON metaschema_modules_public.server_deployment_module (database_id, scope, prefix);
|
|
3572
|
-
|
|
3573
|
-
CREATE TABLE metaschema_modules_public.route_module (
|
|
3574
|
-
id uuid PRIMARY KEY DEFAULT uuidv7(),
|
|
3575
|
-
database_id uuid NOT NULL,
|
|
3576
|
-
schema_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
3577
|
-
private_schema_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
3578
|
-
public_schema_name text,
|
|
3579
|
-
private_schema_name text,
|
|
3580
|
-
routes_table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
3581
|
-
route_events_table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
3582
|
-
routes_table_name text NOT NULL DEFAULT 'routes',
|
|
3583
|
-
route_events_table_name text NOT NULL DEFAULT 'route_events',
|
|
3584
|
-
api_name text,
|
|
3585
|
-
private_api_name text,
|
|
3586
|
-
scope text NOT NULL DEFAULT 'platform',
|
|
3587
|
-
prefix text NOT NULL DEFAULT '',
|
|
3588
|
-
entity_table_id uuid NULL,
|
|
3589
|
-
policies jsonb NULL,
|
|
3590
|
-
provisions jsonb NULL,
|
|
3591
|
-
default_permissions text[] DEFAULT NULL,
|
|
3592
|
-
CONSTRAINT route_module_db_fkey
|
|
3593
|
-
FOREIGN KEY(database_id)
|
|
3594
|
-
REFERENCES metaschema_public.database (id)
|
|
3595
|
-
ON DELETE CASCADE,
|
|
3596
|
-
CONSTRAINT route_module_schema_fkey
|
|
3597
|
-
FOREIGN KEY(schema_id)
|
|
3598
|
-
REFERENCES metaschema_public.schema (id)
|
|
3599
|
-
ON DELETE CASCADE,
|
|
3600
|
-
CONSTRAINT route_module_private_schema_fkey
|
|
3601
|
-
FOREIGN KEY(private_schema_id)
|
|
3602
|
-
REFERENCES metaschema_public.schema (id)
|
|
3603
|
-
ON DELETE CASCADE,
|
|
3604
|
-
CONSTRAINT route_module_routes_table_fkey
|
|
3605
|
-
FOREIGN KEY(routes_table_id)
|
|
3606
|
-
REFERENCES metaschema_public."table" (id)
|
|
3607
|
-
ON DELETE CASCADE,
|
|
3608
|
-
CONSTRAINT route_module_events_table_fkey
|
|
3609
|
-
FOREIGN KEY(route_events_table_id)
|
|
3610
|
-
REFERENCES metaschema_public."table" (id)
|
|
3611
|
-
ON DELETE CASCADE,
|
|
3612
|
-
CONSTRAINT route_module_entity_table_fkey
|
|
3613
|
-
FOREIGN KEY(entity_table_id)
|
|
3614
|
-
REFERENCES metaschema_public."table" (id)
|
|
3615
|
-
ON DELETE CASCADE
|
|
3616
|
-
);
|
|
3617
|
-
|
|
3618
|
-
CREATE INDEX route_module_database_id_idx ON metaschema_modules_public.route_module (database_id);
|
|
3619
|
-
|
|
3620
|
-
CREATE UNIQUE INDEX route_module_unique_scope ON metaschema_modules_public.route_module (database_id, scope, prefix);
|
|
3621
|
-
|
|
3622
|
-
CREATE TABLE metaschema_modules_public.certificate_module (
|
|
3623
|
-
id uuid PRIMARY KEY DEFAULT uuidv7(),
|
|
3624
|
-
database_id uuid NOT NULL,
|
|
3625
|
-
schema_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
3626
|
-
private_schema_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
3627
|
-
public_schema_name text,
|
|
3628
|
-
private_schema_name text,
|
|
3629
|
-
certificates_table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
3630
|
-
certificate_domains_table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
3631
|
-
certificate_events_table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
3632
|
-
certificates_table_name text NOT NULL DEFAULT 'certificates',
|
|
3633
|
-
certificate_domains_table_name text NOT NULL DEFAULT 'certificate_domains',
|
|
3634
|
-
certificate_events_table_name text NOT NULL DEFAULT 'certificate_events',
|
|
3635
|
-
api_name text,
|
|
3636
|
-
private_api_name text,
|
|
3637
|
-
scope text NOT NULL DEFAULT 'platform',
|
|
3638
|
-
prefix text NOT NULL DEFAULT '',
|
|
3639
|
-
entity_table_id uuid NULL,
|
|
3640
|
-
policies jsonb NULL,
|
|
3641
|
-
provisions jsonb NULL,
|
|
3642
|
-
default_permissions text[] DEFAULT NULL,
|
|
3643
|
-
CONSTRAINT certificate_module_db_fkey
|
|
3644
|
-
FOREIGN KEY(database_id)
|
|
3645
|
-
REFERENCES metaschema_public.database (id)
|
|
3646
|
-
ON DELETE CASCADE,
|
|
3647
|
-
CONSTRAINT certificate_module_schema_fkey
|
|
3648
|
-
FOREIGN KEY(schema_id)
|
|
3649
|
-
REFERENCES metaschema_public.schema (id)
|
|
3650
|
-
ON DELETE CASCADE,
|
|
3651
|
-
CONSTRAINT certificate_module_private_schema_fkey
|
|
3652
|
-
FOREIGN KEY(private_schema_id)
|
|
3653
|
-
REFERENCES metaschema_public.schema (id)
|
|
3654
|
-
ON DELETE CASCADE,
|
|
3655
|
-
CONSTRAINT certificate_module_certs_table_fkey
|
|
3656
|
-
FOREIGN KEY(certificates_table_id)
|
|
3657
|
-
REFERENCES metaschema_public."table" (id)
|
|
3658
|
-
ON DELETE CASCADE,
|
|
3659
|
-
CONSTRAINT certificate_module_cert_domains_table_fkey
|
|
3660
|
-
FOREIGN KEY(certificate_domains_table_id)
|
|
3661
|
-
REFERENCES metaschema_public."table" (id)
|
|
3662
|
-
ON DELETE CASCADE,
|
|
3663
|
-
CONSTRAINT certificate_module_events_table_fkey
|
|
3664
|
-
FOREIGN KEY(certificate_events_table_id)
|
|
3665
|
-
REFERENCES metaschema_public."table" (id)
|
|
3666
|
-
ON DELETE CASCADE,
|
|
3667
|
-
CONSTRAINT certificate_module_entity_table_fkey
|
|
3668
|
-
FOREIGN KEY(entity_table_id)
|
|
3669
|
-
REFERENCES metaschema_public."table" (id)
|
|
3670
|
-
ON DELETE CASCADE
|
|
3671
|
-
);
|
|
3672
|
-
|
|
3673
|
-
CREATE INDEX certificate_module_database_id_idx ON metaschema_modules_public.certificate_module (database_id);
|
|
3484
|
+
CREATE INDEX resource_module_database_id_idx ON metaschema_modules_public.resource_module (database_id);
|
|
3674
3485
|
|
|
3675
|
-
CREATE UNIQUE INDEX
|
|
3486
|
+
CREATE UNIQUE INDEX resource_module_unique_scope ON metaschema_modules_public.resource_module (database_id, scope);
|