@pgpm/metaschema-modules 0.28.3 → 0.28.5
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/Makefile +1 -1
- package/README.md +1 -16
- package/deploy/schemas/metaschema_modules_public/tables/agent_module/table.sql +4 -0
- package/deploy/schemas/metaschema_modules_public/tables/billing_module/table.sql +4 -0
- package/deploy/schemas/metaschema_modules_public/tables/certificate_module/table.sql +66 -0
- package/deploy/schemas/metaschema_modules_public/tables/compute_log_module/table.sql +4 -0
- package/deploy/schemas/metaschema_modules_public/tables/config_secrets_module/table.sql +4 -0
- package/deploy/schemas/metaschema_modules_public/tables/db_usage_module/table.sql +4 -0
- package/deploy/schemas/metaschema_modules_public/tables/events_module/table.sql +4 -0
- package/deploy/schemas/metaschema_modules_public/tables/function_deployment_module/table.sql +81 -0
- package/deploy/schemas/metaschema_modules_public/tables/function_module/constraints/one_platform_database.sql +18 -0
- package/deploy/schemas/metaschema_modules_public/tables/graph_module/table.sql +2 -5
- package/deploy/schemas/metaschema_modules_public/tables/hierarchy_module/table.sql +1 -1
- package/deploy/schemas/metaschema_modules_public/tables/identity_providers_module/table.sql +4 -0
- package/deploy/schemas/metaschema_modules_public/tables/inference_log_module/table.sql +4 -0
- package/deploy/schemas/metaschema_modules_public/tables/invites_module/table.sql +4 -0
- package/deploy/schemas/metaschema_modules_public/tables/limits_module/table.sql +4 -0
- package/deploy/schemas/metaschema_modules_public/tables/memberships_module/table.sql +4 -0
- package/deploy/schemas/metaschema_modules_public/tables/merkle_store_module/table.sql +5 -0
- package/deploy/schemas/metaschema_modules_public/tables/namespace_module/table.sql +6 -0
- package/deploy/schemas/metaschema_modules_public/tables/notifications_module/table.sql +4 -0
- package/deploy/schemas/metaschema_modules_public/tables/permissions_module/table.sql +4 -0
- package/deploy/schemas/metaschema_modules_public/tables/plans_module/table.sql +4 -0
- package/deploy/schemas/metaschema_modules_public/tables/principal_auth_module/table.sql +58 -0
- package/deploy/schemas/metaschema_modules_public/tables/profiles_module/table.sql +4 -0
- package/deploy/schemas/metaschema_modules_public/tables/rate_limit_meters_module/table.sql +4 -0
- package/deploy/schemas/metaschema_modules_public/tables/route_module/table.sql +63 -0
- package/deploy/schemas/metaschema_modules_public/tables/server_definition_module/table.sql +70 -0
- package/deploy/schemas/metaschema_modules_public/tables/server_deployment_module/table.sql +83 -0
- package/deploy/schemas/metaschema_modules_public/tables/storage_log_module/table.sql +4 -0
- package/deploy/schemas/metaschema_modules_public/tables/storage_module/table.sql +7 -1
- package/deploy/schemas/metaschema_modules_public/tables/transfer_log_module/table.sql +4 -0
- package/metaschema-modules.control +1 -1
- package/package.json +6 -5
- package/pgpm.plan +8 -1
- package/revert/schemas/metaschema_modules_public/tables/certificate_module/table.sql +7 -0
- package/revert/schemas/metaschema_modules_public/tables/config_secrets_module/table.sql +1 -1
- package/revert/schemas/metaschema_modules_public/tables/function_deployment_module/table.sql +7 -0
- package/revert/schemas/metaschema_modules_public/tables/function_module/constraints/one_platform_database.sql +7 -0
- package/revert/schemas/metaschema_modules_public/tables/principal_auth_module/table.sql +7 -0
- package/revert/schemas/metaschema_modules_public/tables/route_module/table.sql +7 -0
- package/revert/schemas/metaschema_modules_public/tables/server_definition_module/table.sql +7 -0
- package/revert/schemas/metaschema_modules_public/tables/server_deployment_module/table.sql +7 -0
- package/revert/schemas/metaschema_modules_public/tables/user_credentials_module/table.sql +1 -1
- package/revert/schemas/metaschema_modules_public/tables/user_settings_module/table.sql +1 -1
- package/sql/{metaschema-modules--0.26.5.sql → metaschema-modules--0.15.5.sql} +634 -215
- package/verify/schemas/metaschema_modules_public/tables/agent_chat_module/table.sql +20 -0
- package/verify/schemas/metaschema_modules_public/tables/agent_module/table.sql +3 -5
- package/verify/schemas/metaschema_modules_public/tables/certificate_module/table.sql +7 -0
- package/verify/schemas/metaschema_modules_public/tables/compute_log_module/table.sql +2 -1
- package/verify/schemas/metaschema_modules_public/tables/config_secrets_org_module/table.sql +3 -5
- package/verify/schemas/metaschema_modules_public/tables/db_usage_module/table.sql +2 -5
- package/verify/schemas/metaschema_modules_public/tables/entity_type_provision/table.sql +3 -5
- package/verify/schemas/metaschema_modules_public/tables/function_deployment_module/table.sql +14 -0
- package/verify/schemas/metaschema_modules_public/tables/function_invocation_module/table.sql +9 -1
- package/verify/schemas/metaschema_modules_public/tables/function_module/constraints/one_platform_database.sql +11 -0
- package/verify/schemas/metaschema_modules_public/tables/graph_module/table.sql +3 -5
- package/verify/schemas/metaschema_modules_public/tables/inference_log_module/table.sql +2 -1
- package/verify/schemas/metaschema_modules_public/tables/merkle_store_module/table.sql +3 -5
- package/verify/schemas/metaschema_modules_public/tables/namespace_module/table.sql +1 -3
- package/verify/schemas/metaschema_modules_public/tables/principal_auth_module/table.sql +14 -0
- package/verify/schemas/metaschema_modules_public/tables/profiles_module/table.sql +0 -1
- package/verify/schemas/metaschema_modules_public/tables/relation_provision/table.sql +0 -3
- package/verify/schemas/metaschema_modules_public/tables/route_module/table.sql +7 -0
- package/verify/schemas/metaschema_modules_public/tables/secure_table_provision/table.sql +0 -1
- package/verify/schemas/metaschema_modules_public/tables/server_definition_module/table.sql +7 -0
- package/verify/schemas/metaschema_modules_public/tables/server_deployment_module/table.sql +7 -0
- package/verify/schemas/metaschema_modules_public/tables/session_secrets_module/table.sql +3 -5
- package/verify/schemas/metaschema_modules_public/tables/storage_log_module/table.sql +1 -1
- package/verify/schemas/metaschema_modules_public/tables/transfer_log_module/table.sql +1 -1
- package/verify/schemas/metaschema_modules_public/tables/user_settings_module/table.sql +1 -1
|
@@ -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.table (id)
|
|
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.table (id)
|
|
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.table (id)
|
|
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.table (id)
|
|
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.table (id)
|
|
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.table (id)
|
|
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.table (id)
|
|
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.table (id)
|
|
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.table (id)
|
|
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.table (id)
|
|
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.table (id)
|
|
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.table (id)
|
|
206
|
+
REFERENCES metaschema_public."table" (id)
|
|
207
207
|
ON DELETE CASCADE,
|
|
208
208
|
CONSTRAINT schema_fkey
|
|
209
209
|
FOREIGN KEY(schema_id)
|
|
@@ -236,11 +236,11 @@ CREATE TABLE metaschema_modules_public.config_secrets_user_module (
|
|
|
236
236
|
ON DELETE CASCADE,
|
|
237
237
|
CONSTRAINT table_fkey
|
|
238
238
|
FOREIGN KEY(table_id)
|
|
239
|
-
REFERENCES metaschema_public.table (id)
|
|
239
|
+
REFERENCES metaschema_public."table" (id)
|
|
240
240
|
ON DELETE CASCADE,
|
|
241
241
|
CONSTRAINT config_defs_table_fkey
|
|
242
242
|
FOREIGN KEY(config_definitions_table_id)
|
|
243
|
-
REFERENCES metaschema_public.table (id)
|
|
243
|
+
REFERENCES metaschema_public."table" (id)
|
|
244
244
|
ON DELETE CASCADE
|
|
245
245
|
);
|
|
246
246
|
|
|
@@ -251,6 +251,8 @@ CREATE TABLE metaschema_modules_public.invites_module (
|
|
|
251
251
|
database_id uuid NOT NULL,
|
|
252
252
|
schema_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
253
253
|
private_schema_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
254
|
+
public_schema_name text,
|
|
255
|
+
private_schema_name text,
|
|
254
256
|
emails_table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
255
257
|
users_table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
256
258
|
invites_table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
@@ -269,23 +271,23 @@ CREATE TABLE metaschema_modules_public.invites_module (
|
|
|
269
271
|
ON DELETE CASCADE,
|
|
270
272
|
CONSTRAINT invites_table_fkey
|
|
271
273
|
FOREIGN KEY(invites_table_id)
|
|
272
|
-
REFERENCES metaschema_public.table (id)
|
|
274
|
+
REFERENCES metaschema_public."table" (id)
|
|
273
275
|
ON DELETE CASCADE,
|
|
274
276
|
CONSTRAINT emails_table_fkey
|
|
275
277
|
FOREIGN KEY(emails_table_id)
|
|
276
|
-
REFERENCES metaschema_public.table (id)
|
|
278
|
+
REFERENCES metaschema_public."table" (id)
|
|
277
279
|
ON DELETE CASCADE,
|
|
278
280
|
CONSTRAINT users_table_fkey
|
|
279
281
|
FOREIGN KEY(users_table_id)
|
|
280
|
-
REFERENCES metaschema_public.table (id)
|
|
282
|
+
REFERENCES metaschema_public."table" (id)
|
|
281
283
|
ON DELETE CASCADE,
|
|
282
284
|
CONSTRAINT entity_table_fkey
|
|
283
285
|
FOREIGN KEY(entity_table_id)
|
|
284
|
-
REFERENCES metaschema_public.table (id)
|
|
286
|
+
REFERENCES metaschema_public."table" (id)
|
|
285
287
|
ON DELETE CASCADE,
|
|
286
288
|
CONSTRAINT claimed_invites_table_fkey
|
|
287
289
|
FOREIGN KEY(claimed_invites_table_id)
|
|
288
|
-
REFERENCES metaschema_public.table (id)
|
|
290
|
+
REFERENCES metaschema_public."table" (id)
|
|
289
291
|
ON DELETE CASCADE,
|
|
290
292
|
CONSTRAINT schema_fkey
|
|
291
293
|
FOREIGN KEY(schema_id)
|
|
@@ -306,6 +308,8 @@ CREATE TABLE metaschema_modules_public.events_module (
|
|
|
306
308
|
database_id uuid NOT NULL,
|
|
307
309
|
schema_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
308
310
|
private_schema_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
311
|
+
public_schema_name text,
|
|
312
|
+
private_schema_name text,
|
|
309
313
|
events_table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
310
314
|
events_table_name text NOT NULL DEFAULT '',
|
|
311
315
|
event_aggregates_table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
@@ -334,7 +338,7 @@ CREATE TABLE metaschema_modules_public.events_module (
|
|
|
334
338
|
tg_check_achievements text NOT NULL DEFAULT '',
|
|
335
339
|
grant_achievement text NOT NULL DEFAULT '',
|
|
336
340
|
tg_achievement_reward text NOT NULL DEFAULT '',
|
|
337
|
-
|
|
341
|
+
interval text NOT NULL DEFAULT '1 month',
|
|
338
342
|
retention text DEFAULT '12 months',
|
|
339
343
|
premake int NOT NULL DEFAULT 2,
|
|
340
344
|
scope text NOT NULL DEFAULT 'app',
|
|
@@ -358,39 +362,39 @@ CREATE TABLE metaschema_modules_public.events_module (
|
|
|
358
362
|
ON DELETE CASCADE,
|
|
359
363
|
CONSTRAINT events_table_fkey
|
|
360
364
|
FOREIGN KEY(events_table_id)
|
|
361
|
-
REFERENCES metaschema_public.table (id)
|
|
365
|
+
REFERENCES metaschema_public."table" (id)
|
|
362
366
|
ON DELETE CASCADE,
|
|
363
367
|
CONSTRAINT event_aggregates_table_fkey
|
|
364
368
|
FOREIGN KEY(event_aggregates_table_id)
|
|
365
|
-
REFERENCES metaschema_public.table (id)
|
|
369
|
+
REFERENCES metaschema_public."table" (id)
|
|
366
370
|
ON DELETE CASCADE,
|
|
367
371
|
CONSTRAINT event_types_table_fkey
|
|
368
372
|
FOREIGN KEY(event_types_table_id)
|
|
369
|
-
REFERENCES metaschema_public.table (id)
|
|
373
|
+
REFERENCES metaschema_public."table" (id)
|
|
370
374
|
ON DELETE CASCADE,
|
|
371
375
|
CONSTRAINT levels_table_fkey
|
|
372
376
|
FOREIGN KEY(levels_table_id)
|
|
373
|
-
REFERENCES metaschema_public.table (id)
|
|
377
|
+
REFERENCES metaschema_public."table" (id)
|
|
374
378
|
ON DELETE CASCADE,
|
|
375
379
|
CONSTRAINT level_requirements_table_fkey
|
|
376
380
|
FOREIGN KEY(level_requirements_table_id)
|
|
377
|
-
REFERENCES metaschema_public.table (id)
|
|
381
|
+
REFERENCES metaschema_public."table" (id)
|
|
378
382
|
ON DELETE CASCADE,
|
|
379
383
|
CONSTRAINT level_grants_table_fkey
|
|
380
384
|
FOREIGN KEY(level_grants_table_id)
|
|
381
|
-
REFERENCES metaschema_public.table (id)
|
|
385
|
+
REFERENCES metaschema_public."table" (id)
|
|
382
386
|
ON DELETE CASCADE,
|
|
383
387
|
CONSTRAINT achievement_rewards_table_fkey
|
|
384
388
|
FOREIGN KEY(achievement_rewards_table_id)
|
|
385
|
-
REFERENCES metaschema_public.table (id)
|
|
389
|
+
REFERENCES metaschema_public."table" (id)
|
|
386
390
|
ON DELETE CASCADE,
|
|
387
391
|
CONSTRAINT entity_table_fkey
|
|
388
392
|
FOREIGN KEY(entity_table_id)
|
|
389
|
-
REFERENCES metaschema_public.table (id)
|
|
393
|
+
REFERENCES metaschema_public."table" (id)
|
|
390
394
|
ON DELETE CASCADE,
|
|
391
395
|
CONSTRAINT actor_table_fkey
|
|
392
396
|
FOREIGN KEY(actor_table_id)
|
|
393
|
-
REFERENCES metaschema_public.table (id)
|
|
397
|
+
REFERENCES metaschema_public."table" (id)
|
|
394
398
|
ON DELETE CASCADE
|
|
395
399
|
);
|
|
396
400
|
|
|
@@ -401,6 +405,8 @@ CREATE TABLE metaschema_modules_public.limits_module (
|
|
|
401
405
|
database_id uuid NOT NULL,
|
|
402
406
|
schema_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
403
407
|
private_schema_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
408
|
+
public_schema_name text,
|
|
409
|
+
private_schema_name text,
|
|
404
410
|
table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
405
411
|
table_name text NOT NULL DEFAULT '',
|
|
406
412
|
default_table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
@@ -445,59 +451,59 @@ CREATE TABLE metaschema_modules_public.limits_module (
|
|
|
445
451
|
ON DELETE CASCADE,
|
|
446
452
|
CONSTRAINT table_fkey
|
|
447
453
|
FOREIGN KEY(table_id)
|
|
448
|
-
REFERENCES metaschema_public.table (id)
|
|
454
|
+
REFERENCES metaschema_public."table" (id)
|
|
449
455
|
ON DELETE CASCADE,
|
|
450
456
|
CONSTRAINT default_table_fkey
|
|
451
457
|
FOREIGN KEY(default_table_id)
|
|
452
|
-
REFERENCES metaschema_public.table (id)
|
|
458
|
+
REFERENCES metaschema_public."table" (id)
|
|
453
459
|
ON DELETE CASCADE,
|
|
454
460
|
CONSTRAINT entity_table_fkey
|
|
455
461
|
FOREIGN KEY(entity_table_id)
|
|
456
|
-
REFERENCES metaschema_public.table (id)
|
|
462
|
+
REFERENCES metaschema_public."table" (id)
|
|
457
463
|
ON DELETE CASCADE,
|
|
458
464
|
CONSTRAINT actor_table_fkey
|
|
459
465
|
FOREIGN KEY(actor_table_id)
|
|
460
|
-
REFERENCES metaschema_public.table (id)
|
|
466
|
+
REFERENCES metaschema_public."table" (id)
|
|
461
467
|
ON DELETE CASCADE,
|
|
462
468
|
CONSTRAINT aggregate_table_fkey
|
|
463
469
|
FOREIGN KEY(aggregate_table_id)
|
|
464
|
-
REFERENCES metaschema_public.table (id)
|
|
470
|
+
REFERENCES metaschema_public."table" (id)
|
|
465
471
|
ON DELETE CASCADE,
|
|
466
472
|
CONSTRAINT limit_credits_table_fkey
|
|
467
473
|
FOREIGN KEY(limit_credits_table_id)
|
|
468
|
-
REFERENCES metaschema_public.table (id)
|
|
474
|
+
REFERENCES metaschema_public."table" (id)
|
|
469
475
|
ON DELETE CASCADE,
|
|
470
476
|
CONSTRAINT events_table_fkey
|
|
471
477
|
FOREIGN KEY(events_table_id)
|
|
472
|
-
REFERENCES metaschema_public.table (id)
|
|
478
|
+
REFERENCES metaschema_public."table" (id)
|
|
473
479
|
ON DELETE CASCADE,
|
|
474
480
|
CONSTRAINT credit_codes_table_fkey
|
|
475
481
|
FOREIGN KEY(credit_codes_table_id)
|
|
476
|
-
REFERENCES metaschema_public.table (id)
|
|
482
|
+
REFERENCES metaschema_public."table" (id)
|
|
477
483
|
ON DELETE CASCADE,
|
|
478
484
|
CONSTRAINT credit_code_items_table_fkey
|
|
479
485
|
FOREIGN KEY(credit_code_items_table_id)
|
|
480
|
-
REFERENCES metaschema_public.table (id)
|
|
486
|
+
REFERENCES metaschema_public."table" (id)
|
|
481
487
|
ON DELETE CASCADE,
|
|
482
488
|
CONSTRAINT credit_redemptions_table_fkey
|
|
483
489
|
FOREIGN KEY(credit_redemptions_table_id)
|
|
484
|
-
REFERENCES metaschema_public.table (id)
|
|
490
|
+
REFERENCES metaschema_public."table" (id)
|
|
485
491
|
ON DELETE CASCADE,
|
|
486
492
|
CONSTRAINT limit_caps_table_fkey
|
|
487
493
|
FOREIGN KEY(limit_caps_table_id)
|
|
488
|
-
REFERENCES metaschema_public.table (id)
|
|
494
|
+
REFERENCES metaschema_public."table" (id)
|
|
489
495
|
ON DELETE CASCADE,
|
|
490
496
|
CONSTRAINT limit_caps_defaults_table_fkey
|
|
491
497
|
FOREIGN KEY(limit_caps_defaults_table_id)
|
|
492
|
-
REFERENCES metaschema_public.table (id)
|
|
498
|
+
REFERENCES metaschema_public."table" (id)
|
|
493
499
|
ON DELETE CASCADE,
|
|
494
500
|
CONSTRAINT limit_warnings_table_fkey
|
|
495
501
|
FOREIGN KEY(limit_warnings_table_id)
|
|
496
|
-
REFERENCES metaschema_public.table (id)
|
|
502
|
+
REFERENCES metaschema_public."table" (id)
|
|
497
503
|
ON DELETE CASCADE,
|
|
498
504
|
CONSTRAINT limit_warning_state_table_fkey
|
|
499
505
|
FOREIGN KEY(limit_warning_state_table_id)
|
|
500
|
-
REFERENCES metaschema_public.table (id)
|
|
506
|
+
REFERENCES metaschema_public."table" (id)
|
|
501
507
|
ON DELETE CASCADE
|
|
502
508
|
);
|
|
503
509
|
|
|
@@ -519,7 +525,7 @@ CREATE TABLE metaschema_modules_public.membership_types_module (
|
|
|
519
525
|
ON DELETE CASCADE,
|
|
520
526
|
CONSTRAINT table_fkey
|
|
521
527
|
FOREIGN KEY(table_id)
|
|
522
|
-
REFERENCES metaschema_public.table (id)
|
|
528
|
+
REFERENCES metaschema_public."table" (id)
|
|
523
529
|
ON DELETE CASCADE
|
|
524
530
|
);
|
|
525
531
|
|
|
@@ -530,6 +536,8 @@ CREATE TABLE metaschema_modules_public.memberships_module (
|
|
|
530
536
|
database_id uuid NOT NULL,
|
|
531
537
|
schema_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
532
538
|
private_schema_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
539
|
+
public_schema_name text,
|
|
540
|
+
private_schema_name text,
|
|
533
541
|
memberships_table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
534
542
|
memberships_table_name text NOT NULL DEFAULT '',
|
|
535
543
|
members_table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
@@ -579,31 +587,31 @@ CREATE TABLE metaschema_modules_public.memberships_module (
|
|
|
579
587
|
ON DELETE CASCADE,
|
|
580
588
|
CONSTRAINT memberships_table_fkey
|
|
581
589
|
FOREIGN KEY(memberships_table_id)
|
|
582
|
-
REFERENCES metaschema_public.table (id)
|
|
590
|
+
REFERENCES metaschema_public."table" (id)
|
|
583
591
|
ON DELETE CASCADE,
|
|
584
592
|
CONSTRAINT membership_defaults_table_fkey
|
|
585
593
|
FOREIGN KEY(membership_defaults_table_id)
|
|
586
|
-
REFERENCES metaschema_public.table (id)
|
|
594
|
+
REFERENCES metaschema_public."table" (id)
|
|
587
595
|
ON DELETE CASCADE,
|
|
588
596
|
CONSTRAINT membership_settings_table_fkey
|
|
589
597
|
FOREIGN KEY(membership_settings_table_id)
|
|
590
|
-
REFERENCES metaschema_public.table (id)
|
|
598
|
+
REFERENCES metaschema_public."table" (id)
|
|
591
599
|
ON DELETE CASCADE,
|
|
592
600
|
CONSTRAINT members_table_fkey
|
|
593
601
|
FOREIGN KEY(members_table_id)
|
|
594
|
-
REFERENCES metaschema_public.table (id)
|
|
602
|
+
REFERENCES metaschema_public."table" (id)
|
|
595
603
|
ON DELETE CASCADE,
|
|
596
604
|
CONSTRAINT grants_table_fkey
|
|
597
605
|
FOREIGN KEY(grants_table_id)
|
|
598
|
-
REFERENCES metaschema_public.table (id)
|
|
606
|
+
REFERENCES metaschema_public."table" (id)
|
|
599
607
|
ON DELETE CASCADE,
|
|
600
608
|
CONSTRAINT sprt_table_fkey
|
|
601
609
|
FOREIGN KEY(sprt_table_id)
|
|
602
|
-
REFERENCES metaschema_public.table (id)
|
|
610
|
+
REFERENCES metaschema_public."table" (id)
|
|
603
611
|
ON DELETE CASCADE,
|
|
604
612
|
CONSTRAINT entity_table_fkey
|
|
605
613
|
FOREIGN KEY(entity_table_id)
|
|
606
|
-
REFERENCES metaschema_public.table (id)
|
|
614
|
+
REFERENCES metaschema_public."table" (id)
|
|
607
615
|
ON DELETE CASCADE,
|
|
608
616
|
CONSTRAINT entity_table_owner_fkey
|
|
609
617
|
FOREIGN KEY(entity_table_owner_id)
|
|
@@ -611,23 +619,23 @@ CREATE TABLE metaschema_modules_public.memberships_module (
|
|
|
611
619
|
ON DELETE CASCADE,
|
|
612
620
|
CONSTRAINT actor_table_fkey
|
|
613
621
|
FOREIGN KEY(actor_table_id)
|
|
614
|
-
REFERENCES metaschema_public.table (id)
|
|
622
|
+
REFERENCES metaschema_public."table" (id)
|
|
615
623
|
ON DELETE CASCADE,
|
|
616
624
|
CONSTRAINT limits_table_fkey
|
|
617
625
|
FOREIGN KEY(limits_table_id)
|
|
618
|
-
REFERENCES metaschema_public.table (id)
|
|
626
|
+
REFERENCES metaschema_public."table" (id)
|
|
619
627
|
ON DELETE CASCADE,
|
|
620
628
|
CONSTRAINT default_limits_table_fkey
|
|
621
629
|
FOREIGN KEY(default_limits_table_id)
|
|
622
|
-
REFERENCES metaschema_public.table (id)
|
|
630
|
+
REFERENCES metaschema_public."table" (id)
|
|
623
631
|
ON DELETE CASCADE,
|
|
624
632
|
CONSTRAINT permissions_table_fkey
|
|
625
633
|
FOREIGN KEY(permissions_table_id)
|
|
626
|
-
REFERENCES metaschema_public.table (id)
|
|
634
|
+
REFERENCES metaschema_public."table" (id)
|
|
627
635
|
ON DELETE CASCADE,
|
|
628
636
|
CONSTRAINT default_permissions_table_fkey
|
|
629
637
|
FOREIGN KEY(default_permissions_table_id)
|
|
630
|
-
REFERENCES metaschema_public.table (id)
|
|
638
|
+
REFERENCES metaschema_public."table" (id)
|
|
631
639
|
ON DELETE CASCADE,
|
|
632
640
|
CONSTRAINT memberships_module_unique
|
|
633
641
|
UNIQUE (database_id, scope, prefix)
|
|
@@ -640,6 +648,8 @@ CREATE TABLE metaschema_modules_public.permissions_module (
|
|
|
640
648
|
database_id uuid NOT NULL,
|
|
641
649
|
schema_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
642
650
|
private_schema_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
651
|
+
public_schema_name text,
|
|
652
|
+
private_schema_name text,
|
|
643
653
|
table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
644
654
|
table_name text NOT NULL DEFAULT '',
|
|
645
655
|
default_table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
@@ -669,19 +679,19 @@ CREATE TABLE metaschema_modules_public.permissions_module (
|
|
|
669
679
|
ON DELETE CASCADE,
|
|
670
680
|
CONSTRAINT table_fkey
|
|
671
681
|
FOREIGN KEY(table_id)
|
|
672
|
-
REFERENCES metaschema_public.table (id)
|
|
682
|
+
REFERENCES metaschema_public."table" (id)
|
|
673
683
|
ON DELETE CASCADE,
|
|
674
684
|
CONSTRAINT default_table_fkey
|
|
675
685
|
FOREIGN KEY(default_table_id)
|
|
676
|
-
REFERENCES metaschema_public.table (id)
|
|
686
|
+
REFERENCES metaschema_public."table" (id)
|
|
677
687
|
ON DELETE CASCADE,
|
|
678
688
|
CONSTRAINT entity_table_fkey
|
|
679
689
|
FOREIGN KEY(entity_table_id)
|
|
680
|
-
REFERENCES metaschema_public.table (id)
|
|
690
|
+
REFERENCES metaschema_public."table" (id)
|
|
681
691
|
ON DELETE CASCADE,
|
|
682
692
|
CONSTRAINT actor_table_fkey
|
|
683
693
|
FOREIGN KEY(actor_table_id)
|
|
684
|
-
REFERENCES metaschema_public.table (id)
|
|
694
|
+
REFERENCES metaschema_public."table" (id)
|
|
685
695
|
ON DELETE CASCADE
|
|
686
696
|
);
|
|
687
697
|
|
|
@@ -703,11 +713,11 @@ CREATE TABLE metaschema_modules_public.phone_numbers_module (
|
|
|
703
713
|
ON DELETE CASCADE,
|
|
704
714
|
CONSTRAINT table_fkey
|
|
705
715
|
FOREIGN KEY(table_id)
|
|
706
|
-
REFERENCES metaschema_public.table (id)
|
|
716
|
+
REFERENCES metaschema_public."table" (id)
|
|
707
717
|
ON DELETE CASCADE,
|
|
708
718
|
CONSTRAINT owner_table_fkey
|
|
709
719
|
FOREIGN KEY(owner_table_id)
|
|
710
|
-
REFERENCES metaschema_public.table (id)
|
|
720
|
+
REFERENCES metaschema_public."table" (id)
|
|
711
721
|
ON DELETE CASCADE,
|
|
712
722
|
CONSTRAINT schema_fkey
|
|
713
723
|
FOREIGN KEY(schema_id)
|
|
@@ -726,6 +736,8 @@ CREATE TABLE metaschema_modules_public.profiles_module (
|
|
|
726
736
|
database_id uuid NOT NULL,
|
|
727
737
|
schema_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
728
738
|
private_schema_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
739
|
+
public_schema_name text,
|
|
740
|
+
private_schema_name text,
|
|
729
741
|
table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
730
742
|
table_name text NOT NULL DEFAULT '',
|
|
731
743
|
profile_permissions_table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
@@ -758,39 +770,39 @@ CREATE TABLE metaschema_modules_public.profiles_module (
|
|
|
758
770
|
ON DELETE CASCADE,
|
|
759
771
|
CONSTRAINT table_fkey
|
|
760
772
|
FOREIGN KEY(table_id)
|
|
761
|
-
REFERENCES metaschema_public.table (id)
|
|
773
|
+
REFERENCES metaschema_public."table" (id)
|
|
762
774
|
ON DELETE CASCADE,
|
|
763
775
|
CONSTRAINT profile_permissions_table_fkey
|
|
764
776
|
FOREIGN KEY(profile_permissions_table_id)
|
|
765
|
-
REFERENCES metaschema_public.table (id)
|
|
777
|
+
REFERENCES metaschema_public."table" (id)
|
|
766
778
|
ON DELETE CASCADE,
|
|
767
779
|
CONSTRAINT profile_grants_table_fkey
|
|
768
780
|
FOREIGN KEY(profile_grants_table_id)
|
|
769
|
-
REFERENCES metaschema_public.table (id)
|
|
781
|
+
REFERENCES metaschema_public."table" (id)
|
|
770
782
|
ON DELETE CASCADE,
|
|
771
783
|
CONSTRAINT profile_definition_grants_table_fkey
|
|
772
784
|
FOREIGN KEY(profile_definition_grants_table_id)
|
|
773
|
-
REFERENCES metaschema_public.table (id)
|
|
785
|
+
REFERENCES metaschema_public."table" (id)
|
|
774
786
|
ON DELETE CASCADE,
|
|
775
787
|
CONSTRAINT profile_templates_table_fkey
|
|
776
788
|
FOREIGN KEY(profile_templates_table_id)
|
|
777
|
-
REFERENCES metaschema_public.table (id)
|
|
789
|
+
REFERENCES metaschema_public."table" (id)
|
|
778
790
|
ON DELETE CASCADE,
|
|
779
791
|
CONSTRAINT entity_table_fkey
|
|
780
792
|
FOREIGN KEY(entity_table_id)
|
|
781
|
-
REFERENCES metaschema_public.table (id)
|
|
793
|
+
REFERENCES metaschema_public."table" (id)
|
|
782
794
|
ON DELETE CASCADE,
|
|
783
795
|
CONSTRAINT actor_table_fkey
|
|
784
796
|
FOREIGN KEY(actor_table_id)
|
|
785
|
-
REFERENCES metaschema_public.table (id)
|
|
797
|
+
REFERENCES metaschema_public."table" (id)
|
|
786
798
|
ON DELETE CASCADE,
|
|
787
799
|
CONSTRAINT permissions_table_fkey
|
|
788
800
|
FOREIGN KEY(permissions_table_id)
|
|
789
|
-
REFERENCES metaschema_public.table (id)
|
|
801
|
+
REFERENCES metaschema_public."table" (id)
|
|
790
802
|
ON DELETE CASCADE,
|
|
791
803
|
CONSTRAINT memberships_table_fkey
|
|
792
804
|
FOREIGN KEY(memberships_table_id)
|
|
793
|
-
REFERENCES metaschema_public.table (id)
|
|
805
|
+
REFERENCES metaschema_public."table" (id)
|
|
794
806
|
ON DELETE CASCADE,
|
|
795
807
|
CONSTRAINT profiles_module_unique
|
|
796
808
|
UNIQUE (database_id, scope, prefix)
|
|
@@ -818,15 +830,15 @@ CREATE TABLE metaschema_modules_public.rls_module (
|
|
|
818
830
|
ON DELETE CASCADE,
|
|
819
831
|
CONSTRAINT session_credentials_table_fkey
|
|
820
832
|
FOREIGN KEY(session_credentials_table_id)
|
|
821
|
-
REFERENCES metaschema_public.table (id)
|
|
833
|
+
REFERENCES metaschema_public."table" (id)
|
|
822
834
|
ON DELETE CASCADE,
|
|
823
835
|
CONSTRAINT sessions_table_fkey
|
|
824
836
|
FOREIGN KEY(sessions_table_id)
|
|
825
|
-
REFERENCES metaschema_public.table (id)
|
|
837
|
+
REFERENCES metaschema_public."table" (id)
|
|
826
838
|
ON DELETE CASCADE,
|
|
827
839
|
CONSTRAINT users_table_fkey
|
|
828
840
|
FOREIGN KEY(users_table_id)
|
|
829
|
-
REFERENCES metaschema_public.table (id)
|
|
841
|
+
REFERENCES metaschema_public."table" (id)
|
|
830
842
|
ON DELETE CASCADE,
|
|
831
843
|
CONSTRAINT schema_fkey
|
|
832
844
|
FOREIGN KEY(schema_id)
|
|
@@ -866,7 +878,7 @@ CREATE TABLE metaschema_modules_public.user_state_module (
|
|
|
866
878
|
ON DELETE CASCADE,
|
|
867
879
|
CONSTRAINT table_fkey
|
|
868
880
|
FOREIGN KEY(table_id)
|
|
869
|
-
REFERENCES metaschema_public.table (id)
|
|
881
|
+
REFERENCES metaschema_public."table" (id)
|
|
870
882
|
ON DELETE CASCADE
|
|
871
883
|
);
|
|
872
884
|
|
|
@@ -894,19 +906,19 @@ CREATE TABLE metaschema_modules_public.sessions_module (
|
|
|
894
906
|
ON DELETE CASCADE,
|
|
895
907
|
CONSTRAINT sessions_table_fkey
|
|
896
908
|
FOREIGN KEY(sessions_table_id)
|
|
897
|
-
REFERENCES metaschema_public.table (id)
|
|
909
|
+
REFERENCES metaschema_public."table" (id)
|
|
898
910
|
ON DELETE CASCADE,
|
|
899
911
|
CONSTRAINT session_credentials_table_fkey
|
|
900
912
|
FOREIGN KEY(session_credentials_table_id)
|
|
901
|
-
REFERENCES metaschema_public.table (id)
|
|
913
|
+
REFERENCES metaschema_public."table" (id)
|
|
902
914
|
ON DELETE CASCADE,
|
|
903
915
|
CONSTRAINT auth_settings_table_fkey
|
|
904
916
|
FOREIGN KEY(auth_settings_table_id)
|
|
905
|
-
REFERENCES metaschema_public.table (id)
|
|
917
|
+
REFERENCES metaschema_public."table" (id)
|
|
906
918
|
ON DELETE CASCADE,
|
|
907
919
|
CONSTRAINT users_table_fkey
|
|
908
920
|
FOREIGN KEY(users_table_id)
|
|
909
|
-
REFERENCES metaschema_public.table (id)
|
|
921
|
+
REFERENCES metaschema_public."table" (id)
|
|
910
922
|
ON DELETE CASCADE
|
|
911
923
|
);
|
|
912
924
|
|
|
@@ -957,27 +969,27 @@ CREATE TABLE metaschema_modules_public.user_auth_module (
|
|
|
957
969
|
ON DELETE CASCADE,
|
|
958
970
|
CONSTRAINT email_table_fkey
|
|
959
971
|
FOREIGN KEY(emails_table_id)
|
|
960
|
-
REFERENCES metaschema_public.table (id)
|
|
972
|
+
REFERENCES metaschema_public."table" (id)
|
|
961
973
|
ON DELETE CASCADE,
|
|
962
974
|
CONSTRAINT users_table_fkey
|
|
963
975
|
FOREIGN KEY(users_table_id)
|
|
964
|
-
REFERENCES metaschema_public.table (id)
|
|
976
|
+
REFERENCES metaschema_public."table" (id)
|
|
965
977
|
ON DELETE CASCADE,
|
|
966
978
|
CONSTRAINT secrets_table_fkey
|
|
967
979
|
FOREIGN KEY(secrets_table_id)
|
|
968
|
-
REFERENCES metaschema_public.table (id)
|
|
980
|
+
REFERENCES metaschema_public."table" (id)
|
|
969
981
|
ON DELETE CASCADE,
|
|
970
982
|
CONSTRAINT encrypted_table_fkey
|
|
971
983
|
FOREIGN KEY(encrypted_table_id)
|
|
972
|
-
REFERENCES metaschema_public.table (id)
|
|
984
|
+
REFERENCES metaschema_public."table" (id)
|
|
973
985
|
ON DELETE CASCADE,
|
|
974
986
|
CONSTRAINT sessions_table_fkey
|
|
975
987
|
FOREIGN KEY(sessions_table_id)
|
|
976
|
-
REFERENCES metaschema_public.table (id)
|
|
988
|
+
REFERENCES metaschema_public."table" (id)
|
|
977
989
|
ON DELETE CASCADE,
|
|
978
990
|
CONSTRAINT session_credentials_table_fkey
|
|
979
991
|
FOREIGN KEY(session_credentials_table_id)
|
|
980
|
-
REFERENCES metaschema_public.table (id)
|
|
992
|
+
REFERENCES metaschema_public."table" (id)
|
|
981
993
|
ON DELETE CASCADE
|
|
982
994
|
);
|
|
983
995
|
|
|
@@ -1015,11 +1027,11 @@ CREATE TABLE metaschema_modules_public.users_module (
|
|
|
1015
1027
|
ON DELETE CASCADE,
|
|
1016
1028
|
CONSTRAINT table_fkey
|
|
1017
1029
|
FOREIGN KEY(table_id)
|
|
1018
|
-
REFERENCES metaschema_public.table (id)
|
|
1030
|
+
REFERENCES metaschema_public."table" (id)
|
|
1019
1031
|
ON DELETE CASCADE,
|
|
1020
1032
|
CONSTRAINT type_table_fkey
|
|
1021
1033
|
FOREIGN KEY(type_table_id)
|
|
1022
|
-
REFERENCES metaschema_public.table (id)
|
|
1034
|
+
REFERENCES metaschema_public."table" (id)
|
|
1023
1035
|
ON DELETE CASCADE
|
|
1024
1036
|
);
|
|
1025
1037
|
|
|
@@ -1062,23 +1074,23 @@ CREATE TABLE metaschema_modules_public.hierarchy_module (
|
|
|
1062
1074
|
ON DELETE CASCADE,
|
|
1063
1075
|
CONSTRAINT chart_edges_table_fkey
|
|
1064
1076
|
FOREIGN KEY(chart_edges_table_id)
|
|
1065
|
-
REFERENCES metaschema_public.table (id)
|
|
1077
|
+
REFERENCES metaschema_public."table" (id)
|
|
1066
1078
|
ON DELETE CASCADE,
|
|
1067
1079
|
CONSTRAINT hierarchy_sprt_table_fkey
|
|
1068
1080
|
FOREIGN KEY(hierarchy_sprt_table_id)
|
|
1069
|
-
REFERENCES metaschema_public.table (id)
|
|
1081
|
+
REFERENCES metaschema_public."table" (id)
|
|
1070
1082
|
ON DELETE CASCADE,
|
|
1071
1083
|
CONSTRAINT chart_edge_grants_table_fkey
|
|
1072
1084
|
FOREIGN KEY(chart_edge_grants_table_id)
|
|
1073
|
-
REFERENCES metaschema_public.table (id)
|
|
1085
|
+
REFERENCES metaschema_public."table" (id)
|
|
1074
1086
|
ON DELETE CASCADE,
|
|
1075
1087
|
CONSTRAINT entity_table_fkey
|
|
1076
1088
|
FOREIGN KEY(entity_table_id)
|
|
1077
|
-
REFERENCES metaschema_public.table (id)
|
|
1089
|
+
REFERENCES metaschema_public."table" (id)
|
|
1078
1090
|
ON DELETE CASCADE,
|
|
1079
1091
|
CONSTRAINT users_table_fkey
|
|
1080
1092
|
FOREIGN KEY(users_table_id)
|
|
1081
|
-
REFERENCES metaschema_public.table (id)
|
|
1093
|
+
REFERENCES metaschema_public."table" (id)
|
|
1082
1094
|
ON DELETE CASCADE,
|
|
1083
1095
|
CONSTRAINT hierarchy_module_database_unique
|
|
1084
1096
|
UNIQUE (database_id)
|
|
@@ -1104,7 +1116,7 @@ CREATE TABLE metaschema_modules_public.secure_table_provision (
|
|
|
1104
1116
|
ON DELETE CASCADE,
|
|
1105
1117
|
CONSTRAINT table_fkey
|
|
1106
1118
|
FOREIGN KEY(table_id)
|
|
1107
|
-
REFERENCES metaschema_public.table (id)
|
|
1119
|
+
REFERENCES metaschema_public."table" (id)
|
|
1108
1120
|
ON DELETE CASCADE,
|
|
1109
1121
|
CONSTRAINT schema_fkey
|
|
1110
1122
|
FOREIGN KEY(schema_id)
|
|
@@ -1171,11 +1183,11 @@ CREATE TABLE metaschema_modules_public.relation_provision (
|
|
|
1171
1183
|
ON DELETE CASCADE,
|
|
1172
1184
|
CONSTRAINT source_table_fkey
|
|
1173
1185
|
FOREIGN KEY(source_table_id)
|
|
1174
|
-
REFERENCES metaschema_public.table (id)
|
|
1186
|
+
REFERENCES metaschema_public."table" (id)
|
|
1175
1187
|
ON DELETE CASCADE,
|
|
1176
1188
|
CONSTRAINT target_table_fkey
|
|
1177
1189
|
FOREIGN KEY(target_table_id)
|
|
1178
|
-
REFERENCES metaschema_public.table (id)
|
|
1190
|
+
REFERENCES metaschema_public."table" (id)
|
|
1179
1191
|
ON DELETE CASCADE
|
|
1180
1192
|
);
|
|
1181
1193
|
|
|
@@ -1493,6 +1505,8 @@ CREATE TABLE metaschema_modules_public.storage_module (
|
|
|
1493
1505
|
database_id uuid NOT NULL,
|
|
1494
1506
|
schema_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
1495
1507
|
private_schema_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
1508
|
+
public_schema_name text,
|
|
1509
|
+
private_schema_name text,
|
|
1496
1510
|
buckets_table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
1497
1511
|
files_table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
1498
1512
|
buckets_table_name text NOT NULL DEFAULT 'buckets',
|
|
@@ -1524,7 +1538,7 @@ CREATE TABLE metaschema_modules_public.storage_module (
|
|
|
1524
1538
|
confirm_upload_delay interval NOT NULL DEFAULT '30 seconds',
|
|
1525
1539
|
file_events_table_id uuid NULL DEFAULT NULL,
|
|
1526
1540
|
default_permissions text[] DEFAULT NULL,
|
|
1527
|
-
api_name text DEFAULT
|
|
1541
|
+
api_name text DEFAULT NULL,
|
|
1528
1542
|
private_api_name text DEFAULT NULL,
|
|
1529
1543
|
CONSTRAINT db_fkey
|
|
1530
1544
|
FOREIGN KEY(database_id)
|
|
@@ -1540,23 +1554,23 @@ CREATE TABLE metaschema_modules_public.storage_module (
|
|
|
1540
1554
|
ON DELETE CASCADE,
|
|
1541
1555
|
CONSTRAINT buckets_table_fkey
|
|
1542
1556
|
FOREIGN KEY(buckets_table_id)
|
|
1543
|
-
REFERENCES metaschema_public.table (id)
|
|
1557
|
+
REFERENCES metaschema_public."table" (id)
|
|
1544
1558
|
ON DELETE CASCADE,
|
|
1545
1559
|
CONSTRAINT files_table_fkey
|
|
1546
1560
|
FOREIGN KEY(files_table_id)
|
|
1547
|
-
REFERENCES metaschema_public.table (id)
|
|
1561
|
+
REFERENCES metaschema_public."table" (id)
|
|
1548
1562
|
ON DELETE CASCADE,
|
|
1549
1563
|
CONSTRAINT entity_table_fkey
|
|
1550
1564
|
FOREIGN KEY(entity_table_id)
|
|
1551
|
-
REFERENCES metaschema_public.table (id)
|
|
1565
|
+
REFERENCES metaschema_public."table" (id)
|
|
1552
1566
|
ON DELETE CASCADE,
|
|
1553
1567
|
CONSTRAINT path_shares_table_fkey
|
|
1554
1568
|
FOREIGN KEY(path_shares_table_id)
|
|
1555
|
-
REFERENCES metaschema_public.table (id)
|
|
1569
|
+
REFERENCES metaschema_public."table" (id)
|
|
1556
1570
|
ON DELETE CASCADE,
|
|
1557
1571
|
CONSTRAINT file_events_table_fkey
|
|
1558
1572
|
FOREIGN KEY(file_events_table_id)
|
|
1559
|
-
REFERENCES metaschema_public.table (id)
|
|
1573
|
+
REFERENCES metaschema_public."table" (id)
|
|
1560
1574
|
ON DELETE CASCADE
|
|
1561
1575
|
);
|
|
1562
1576
|
|
|
@@ -1836,15 +1850,15 @@ CREATE TABLE metaschema_modules_public.rate_limits_module (
|
|
|
1836
1850
|
ON DELETE CASCADE,
|
|
1837
1851
|
CONSTRAINT rate_limit_settings_table_fkey
|
|
1838
1852
|
FOREIGN KEY(rate_limit_settings_table_id)
|
|
1839
|
-
REFERENCES metaschema_public.table (id)
|
|
1853
|
+
REFERENCES metaschema_public."table" (id)
|
|
1840
1854
|
ON DELETE CASCADE,
|
|
1841
1855
|
CONSTRAINT ip_rate_limits_table_fkey
|
|
1842
1856
|
FOREIGN KEY(ip_rate_limits_table_id)
|
|
1843
|
-
REFERENCES metaschema_public.table (id)
|
|
1857
|
+
REFERENCES metaschema_public."table" (id)
|
|
1844
1858
|
ON DELETE CASCADE,
|
|
1845
1859
|
CONSTRAINT rate_limits_table_fkey
|
|
1846
1860
|
FOREIGN KEY(rate_limits_table_id)
|
|
1847
|
-
REFERENCES metaschema_public.table (id)
|
|
1861
|
+
REFERENCES metaschema_public."table" (id)
|
|
1848
1862
|
ON DELETE CASCADE,
|
|
1849
1863
|
CONSTRAINT rate_limits_module_database_id_uniq
|
|
1850
1864
|
UNIQUE (database_id)
|
|
@@ -1876,11 +1890,11 @@ CREATE TABLE metaschema_modules_public.devices_module (
|
|
|
1876
1890
|
ON DELETE CASCADE,
|
|
1877
1891
|
CONSTRAINT user_devices_table_fkey
|
|
1878
1892
|
FOREIGN KEY(user_devices_table_id)
|
|
1879
|
-
REFERENCES metaschema_public.table (id)
|
|
1893
|
+
REFERENCES metaschema_public."table" (id)
|
|
1880
1894
|
ON DELETE CASCADE,
|
|
1881
1895
|
CONSTRAINT device_settings_table_fkey
|
|
1882
1896
|
FOREIGN KEY(device_settings_table_id)
|
|
1883
|
-
REFERENCES metaschema_public.table (id)
|
|
1897
|
+
REFERENCES metaschema_public."table" (id)
|
|
1884
1898
|
ON DELETE CASCADE,
|
|
1885
1899
|
CONSTRAINT devices_module_database_id_uniq
|
|
1886
1900
|
UNIQUE (database_id)
|
|
@@ -1909,11 +1923,11 @@ CREATE TABLE metaschema_modules_public.session_secrets_module (
|
|
|
1909
1923
|
ON DELETE CASCADE,
|
|
1910
1924
|
CONSTRAINT table_fkey
|
|
1911
1925
|
FOREIGN KEY(table_id)
|
|
1912
|
-
REFERENCES metaschema_public.table (id)
|
|
1926
|
+
REFERENCES metaschema_public."table" (id)
|
|
1913
1927
|
ON DELETE CASCADE,
|
|
1914
1928
|
CONSTRAINT sessions_table_fkey
|
|
1915
1929
|
FOREIGN KEY(sessions_table_id)
|
|
1916
|
-
REFERENCES metaschema_public.table (id)
|
|
1930
|
+
REFERENCES metaschema_public."table" (id)
|
|
1917
1931
|
ON DELETE CASCADE
|
|
1918
1932
|
);
|
|
1919
1933
|
|
|
@@ -1945,11 +1959,11 @@ CREATE TABLE metaschema_modules_public.webauthn_credentials_module (
|
|
|
1945
1959
|
ON DELETE CASCADE,
|
|
1946
1960
|
CONSTRAINT table_fkey
|
|
1947
1961
|
FOREIGN KEY(table_id)
|
|
1948
|
-
REFERENCES metaschema_public.table (id)
|
|
1962
|
+
REFERENCES metaschema_public."table" (id)
|
|
1949
1963
|
ON DELETE CASCADE,
|
|
1950
1964
|
CONSTRAINT owner_table_fkey
|
|
1951
1965
|
FOREIGN KEY(owner_table_id)
|
|
1952
|
-
REFERENCES metaschema_public.table (id)
|
|
1966
|
+
REFERENCES metaschema_public."table" (id)
|
|
1953
1967
|
ON DELETE CASCADE,
|
|
1954
1968
|
CONSTRAINT schema_fkey
|
|
1955
1969
|
FOREIGN KEY(schema_id)
|
|
@@ -1994,27 +2008,27 @@ CREATE TABLE metaschema_modules_public.webauthn_auth_module (
|
|
|
1994
2008
|
ON DELETE CASCADE,
|
|
1995
2009
|
CONSTRAINT users_table_fkey
|
|
1996
2010
|
FOREIGN KEY(users_table_id)
|
|
1997
|
-
REFERENCES metaschema_public.table (id)
|
|
2011
|
+
REFERENCES metaschema_public."table" (id)
|
|
1998
2012
|
ON DELETE CASCADE,
|
|
1999
2013
|
CONSTRAINT credentials_table_fkey
|
|
2000
2014
|
FOREIGN KEY(credentials_table_id)
|
|
2001
|
-
REFERENCES metaschema_public.table (id)
|
|
2015
|
+
REFERENCES metaschema_public."table" (id)
|
|
2002
2016
|
ON DELETE CASCADE,
|
|
2003
2017
|
CONSTRAINT sessions_table_fkey
|
|
2004
2018
|
FOREIGN KEY(sessions_table_id)
|
|
2005
|
-
REFERENCES metaschema_public.table (id)
|
|
2019
|
+
REFERENCES metaschema_public."table" (id)
|
|
2006
2020
|
ON DELETE CASCADE,
|
|
2007
2021
|
CONSTRAINT session_credentials_table_fkey
|
|
2008
2022
|
FOREIGN KEY(session_credentials_table_id)
|
|
2009
|
-
REFERENCES metaschema_public.table (id)
|
|
2023
|
+
REFERENCES metaschema_public."table" (id)
|
|
2010
2024
|
ON DELETE CASCADE,
|
|
2011
2025
|
CONSTRAINT session_secrets_table_fkey
|
|
2012
2026
|
FOREIGN KEY(session_secrets_table_id)
|
|
2013
|
-
REFERENCES metaschema_public.table (id)
|
|
2027
|
+
REFERENCES metaschema_public."table" (id)
|
|
2014
2028
|
ON DELETE CASCADE,
|
|
2015
2029
|
CONSTRAINT auth_settings_table_fkey
|
|
2016
2030
|
FOREIGN KEY(auth_settings_table_id)
|
|
2017
|
-
REFERENCES metaschema_public.table (id)
|
|
2031
|
+
REFERENCES metaschema_public."table" (id)
|
|
2018
2032
|
ON DELETE CASCADE
|
|
2019
2033
|
);
|
|
2020
2034
|
|
|
@@ -2025,6 +2039,8 @@ CREATE TABLE metaschema_modules_public.identity_providers_module (
|
|
|
2025
2039
|
database_id uuid NOT NULL,
|
|
2026
2040
|
schema_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
2027
2041
|
private_schema_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
2042
|
+
public_schema_name text,
|
|
2043
|
+
private_schema_name text,
|
|
2028
2044
|
table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
2029
2045
|
table_name text NOT NULL DEFAULT 'identity_providers',
|
|
2030
2046
|
api_name text DEFAULT 'auth',
|
|
@@ -2038,7 +2054,7 @@ CREATE TABLE metaschema_modules_public.identity_providers_module (
|
|
|
2038
2054
|
ON DELETE CASCADE,
|
|
2039
2055
|
CONSTRAINT table_fkey
|
|
2040
2056
|
FOREIGN KEY(table_id)
|
|
2041
|
-
REFERENCES metaschema_public.table (id)
|
|
2057
|
+
REFERENCES metaschema_public."table" (id)
|
|
2042
2058
|
ON DELETE CASCADE,
|
|
2043
2059
|
CONSTRAINT schema_fkey
|
|
2044
2060
|
FOREIGN KEY(schema_id)
|
|
@@ -2050,7 +2066,7 @@ CREATE TABLE metaschema_modules_public.identity_providers_module (
|
|
|
2050
2066
|
ON DELETE CASCADE,
|
|
2051
2067
|
CONSTRAINT entity_table_fkey
|
|
2052
2068
|
FOREIGN KEY(entity_table_id)
|
|
2053
|
-
REFERENCES metaschema_public.table (id)
|
|
2069
|
+
REFERENCES metaschema_public."table" (id)
|
|
2054
2070
|
ON DELETE CASCADE
|
|
2055
2071
|
);
|
|
2056
2072
|
|
|
@@ -2082,6 +2098,8 @@ CREATE TABLE metaschema_modules_public.notifications_module (
|
|
|
2082
2098
|
database_id uuid NOT NULL,
|
|
2083
2099
|
schema_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
2084
2100
|
private_schema_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
2101
|
+
public_schema_name text,
|
|
2102
|
+
private_schema_name text,
|
|
2085
2103
|
notifications_table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
2086
2104
|
read_state_table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
2087
2105
|
preferences_table_id uuid,
|
|
@@ -2105,39 +2123,39 @@ CREATE TABLE metaschema_modules_public.notifications_module (
|
|
|
2105
2123
|
ON DELETE CASCADE,
|
|
2106
2124
|
CONSTRAINT notifications_table_fkey
|
|
2107
2125
|
FOREIGN KEY(notifications_table_id)
|
|
2108
|
-
REFERENCES metaschema_public.table (id)
|
|
2126
|
+
REFERENCES metaschema_public."table" (id)
|
|
2109
2127
|
ON DELETE CASCADE,
|
|
2110
2128
|
CONSTRAINT read_state_table_fkey
|
|
2111
2129
|
FOREIGN KEY(read_state_table_id)
|
|
2112
|
-
REFERENCES metaschema_public.table (id)
|
|
2130
|
+
REFERENCES metaschema_public."table" (id)
|
|
2113
2131
|
ON DELETE CASCADE,
|
|
2114
2132
|
CONSTRAINT preferences_table_fkey
|
|
2115
2133
|
FOREIGN KEY(preferences_table_id)
|
|
2116
|
-
REFERENCES metaschema_public.table (id)
|
|
2134
|
+
REFERENCES metaschema_public."table" (id)
|
|
2117
2135
|
ON DELETE SET NULL,
|
|
2118
2136
|
CONSTRAINT channels_table_fkey
|
|
2119
2137
|
FOREIGN KEY(channels_table_id)
|
|
2120
|
-
REFERENCES metaschema_public.table (id)
|
|
2138
|
+
REFERENCES metaschema_public."table" (id)
|
|
2121
2139
|
ON DELETE SET NULL,
|
|
2122
2140
|
CONSTRAINT delivery_log_table_fkey
|
|
2123
2141
|
FOREIGN KEY(delivery_log_table_id)
|
|
2124
|
-
REFERENCES metaschema_public.table (id)
|
|
2142
|
+
REFERENCES metaschema_public."table" (id)
|
|
2125
2143
|
ON DELETE SET NULL,
|
|
2126
2144
|
CONSTRAINT suppressions_table_fkey
|
|
2127
2145
|
FOREIGN KEY(suppressions_table_id)
|
|
2128
|
-
REFERENCES metaschema_public.table (id)
|
|
2146
|
+
REFERENCES metaschema_public."table" (id)
|
|
2129
2147
|
ON DELETE SET NULL,
|
|
2130
2148
|
CONSTRAINT owner_table_fkey
|
|
2131
2149
|
FOREIGN KEY(owner_table_id)
|
|
2132
|
-
REFERENCES metaschema_public.table (id)
|
|
2150
|
+
REFERENCES metaschema_public."table" (id)
|
|
2133
2151
|
ON DELETE CASCADE,
|
|
2134
2152
|
CONSTRAINT user_settings_table_fkey
|
|
2135
2153
|
FOREIGN KEY(user_settings_table_id)
|
|
2136
|
-
REFERENCES metaschema_public.table (id)
|
|
2154
|
+
REFERENCES metaschema_public."table" (id)
|
|
2137
2155
|
ON DELETE SET NULL,
|
|
2138
2156
|
CONSTRAINT organization_settings_table_fkey
|
|
2139
2157
|
FOREIGN KEY(organization_settings_table_id)
|
|
2140
|
-
REFERENCES metaschema_public.table (id)
|
|
2158
|
+
REFERENCES metaschema_public."table" (id)
|
|
2141
2159
|
ON DELETE SET NULL,
|
|
2142
2160
|
CONSTRAINT schema_fkey
|
|
2143
2161
|
FOREIGN KEY(schema_id)
|
|
@@ -2187,6 +2205,8 @@ CREATE TABLE metaschema_modules_public.plans_module (
|
|
|
2187
2205
|
database_id uuid NOT NULL,
|
|
2188
2206
|
schema_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
2189
2207
|
private_schema_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
2208
|
+
public_schema_name text,
|
|
2209
|
+
private_schema_name text,
|
|
2190
2210
|
plans_table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
2191
2211
|
plans_table_name text NOT NULL DEFAULT '',
|
|
2192
2212
|
plan_limits_table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
@@ -2216,27 +2236,27 @@ CREATE TABLE metaschema_modules_public.plans_module (
|
|
|
2216
2236
|
ON DELETE CASCADE,
|
|
2217
2237
|
CONSTRAINT plans_table_fkey
|
|
2218
2238
|
FOREIGN KEY(plans_table_id)
|
|
2219
|
-
REFERENCES metaschema_public.table (id)
|
|
2239
|
+
REFERENCES metaschema_public."table" (id)
|
|
2220
2240
|
ON DELETE CASCADE,
|
|
2221
2241
|
CONSTRAINT plan_limits_table_fkey
|
|
2222
2242
|
FOREIGN KEY(plan_limits_table_id)
|
|
2223
|
-
REFERENCES metaschema_public.table (id)
|
|
2243
|
+
REFERENCES metaschema_public."table" (id)
|
|
2224
2244
|
ON DELETE CASCADE,
|
|
2225
2245
|
CONSTRAINT plan_pricing_table_fkey
|
|
2226
2246
|
FOREIGN KEY(plan_pricing_table_id)
|
|
2227
|
-
REFERENCES metaschema_public.table (id)
|
|
2247
|
+
REFERENCES metaschema_public."table" (id)
|
|
2228
2248
|
ON DELETE CASCADE,
|
|
2229
2249
|
CONSTRAINT plan_overrides_table_fkey
|
|
2230
2250
|
FOREIGN KEY(plan_overrides_table_id)
|
|
2231
|
-
REFERENCES metaschema_public.table (id)
|
|
2251
|
+
REFERENCES metaschema_public."table" (id)
|
|
2232
2252
|
ON DELETE CASCADE,
|
|
2233
2253
|
CONSTRAINT plan_meter_limits_table_fkey
|
|
2234
2254
|
FOREIGN KEY(plan_meter_limits_table_id)
|
|
2235
|
-
REFERENCES metaschema_public.table (id)
|
|
2255
|
+
REFERENCES metaschema_public."table" (id)
|
|
2236
2256
|
ON DELETE CASCADE,
|
|
2237
2257
|
CONSTRAINT plan_caps_table_fkey
|
|
2238
2258
|
FOREIGN KEY(plan_caps_table_id)
|
|
2239
|
-
REFERENCES metaschema_public.table (id)
|
|
2259
|
+
REFERENCES metaschema_public."table" (id)
|
|
2240
2260
|
ON DELETE CASCADE,
|
|
2241
2261
|
CONSTRAINT plans_module_database_id_unique
|
|
2242
2262
|
UNIQUE (database_id)
|
|
@@ -2249,6 +2269,8 @@ CREATE TABLE metaschema_modules_public.billing_module (
|
|
|
2249
2269
|
database_id uuid NOT NULL,
|
|
2250
2270
|
schema_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
2251
2271
|
private_schema_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
2272
|
+
public_schema_name text,
|
|
2273
|
+
private_schema_name text,
|
|
2252
2274
|
meters_table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
2253
2275
|
meters_table_name text NOT NULL DEFAULT '',
|
|
2254
2276
|
plan_subscriptions_table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
@@ -2282,31 +2304,31 @@ CREATE TABLE metaschema_modules_public.billing_module (
|
|
|
2282
2304
|
ON DELETE CASCADE,
|
|
2283
2305
|
CONSTRAINT meters_table_fkey
|
|
2284
2306
|
FOREIGN KEY(meters_table_id)
|
|
2285
|
-
REFERENCES metaschema_public.table (id)
|
|
2307
|
+
REFERENCES metaschema_public."table" (id)
|
|
2286
2308
|
ON DELETE CASCADE,
|
|
2287
2309
|
CONSTRAINT plan_subscriptions_table_fkey
|
|
2288
2310
|
FOREIGN KEY(plan_subscriptions_table_id)
|
|
2289
|
-
REFERENCES metaschema_public.table (id)
|
|
2311
|
+
REFERENCES metaschema_public."table" (id)
|
|
2290
2312
|
ON DELETE CASCADE,
|
|
2291
2313
|
CONSTRAINT ledger_table_fkey
|
|
2292
2314
|
FOREIGN KEY(ledger_table_id)
|
|
2293
|
-
REFERENCES metaschema_public.table (id)
|
|
2315
|
+
REFERENCES metaschema_public."table" (id)
|
|
2294
2316
|
ON DELETE CASCADE,
|
|
2295
2317
|
CONSTRAINT balances_table_fkey
|
|
2296
2318
|
FOREIGN KEY(balances_table_id)
|
|
2297
|
-
REFERENCES metaschema_public.table (id)
|
|
2319
|
+
REFERENCES metaschema_public."table" (id)
|
|
2298
2320
|
ON DELETE CASCADE,
|
|
2299
2321
|
CONSTRAINT meter_credits_table_fkey
|
|
2300
2322
|
FOREIGN KEY(meter_credits_table_id)
|
|
2301
|
-
REFERENCES metaschema_public.table (id)
|
|
2323
|
+
REFERENCES metaschema_public."table" (id)
|
|
2302
2324
|
ON DELETE CASCADE,
|
|
2303
2325
|
CONSTRAINT meter_sources_table_fkey
|
|
2304
2326
|
FOREIGN KEY(meter_sources_table_id)
|
|
2305
|
-
REFERENCES metaschema_public.table (id)
|
|
2327
|
+
REFERENCES metaschema_public."table" (id)
|
|
2306
2328
|
ON DELETE CASCADE,
|
|
2307
2329
|
CONSTRAINT meter_defaults_table_fkey
|
|
2308
2330
|
FOREIGN KEY(meter_defaults_table_id)
|
|
2309
|
-
REFERENCES metaschema_public.table (id)
|
|
2331
|
+
REFERENCES metaschema_public."table" (id)
|
|
2310
2332
|
ON DELETE CASCADE,
|
|
2311
2333
|
CONSTRAINT billing_module_database_id_unique
|
|
2312
2334
|
UNIQUE (database_id)
|
|
@@ -2351,35 +2373,35 @@ CREATE TABLE metaschema_modules_public.billing_provider_module (
|
|
|
2351
2373
|
ON DELETE CASCADE,
|
|
2352
2374
|
CONSTRAINT billing_customers_table_fkey
|
|
2353
2375
|
FOREIGN KEY(billing_customers_table_id)
|
|
2354
|
-
REFERENCES metaschema_public.table (id)
|
|
2376
|
+
REFERENCES metaschema_public."table" (id)
|
|
2355
2377
|
ON DELETE CASCADE,
|
|
2356
2378
|
CONSTRAINT billing_products_table_fkey
|
|
2357
2379
|
FOREIGN KEY(billing_products_table_id)
|
|
2358
|
-
REFERENCES metaschema_public.table (id)
|
|
2380
|
+
REFERENCES metaschema_public."table" (id)
|
|
2359
2381
|
ON DELETE CASCADE,
|
|
2360
2382
|
CONSTRAINT billing_prices_table_fkey
|
|
2361
2383
|
FOREIGN KEY(billing_prices_table_id)
|
|
2362
|
-
REFERENCES metaschema_public.table (id)
|
|
2384
|
+
REFERENCES metaschema_public."table" (id)
|
|
2363
2385
|
ON DELETE CASCADE,
|
|
2364
2386
|
CONSTRAINT billing_subscriptions_table_fkey
|
|
2365
2387
|
FOREIGN KEY(billing_subscriptions_table_id)
|
|
2366
|
-
REFERENCES metaschema_public.table (id)
|
|
2388
|
+
REFERENCES metaschema_public."table" (id)
|
|
2367
2389
|
ON DELETE CASCADE,
|
|
2368
2390
|
CONSTRAINT billing_webhook_events_table_fkey
|
|
2369
2391
|
FOREIGN KEY(billing_webhook_events_table_id)
|
|
2370
|
-
REFERENCES metaschema_public.table (id)
|
|
2392
|
+
REFERENCES metaschema_public."table" (id)
|
|
2371
2393
|
ON DELETE CASCADE,
|
|
2372
2394
|
CONSTRAINT products_table_fkey
|
|
2373
2395
|
FOREIGN KEY(products_table_id)
|
|
2374
|
-
REFERENCES metaschema_public.table (id)
|
|
2396
|
+
REFERENCES metaschema_public."table" (id)
|
|
2375
2397
|
ON DELETE SET NULL,
|
|
2376
2398
|
CONSTRAINT prices_table_fkey
|
|
2377
2399
|
FOREIGN KEY(prices_table_id)
|
|
2378
|
-
REFERENCES metaschema_public.table (id)
|
|
2400
|
+
REFERENCES metaschema_public."table" (id)
|
|
2379
2401
|
ON DELETE SET NULL,
|
|
2380
2402
|
CONSTRAINT subscriptions_table_fkey
|
|
2381
2403
|
FOREIGN KEY(subscriptions_table_id)
|
|
2382
|
-
REFERENCES metaschema_public.table (id)
|
|
2404
|
+
REFERENCES metaschema_public."table" (id)
|
|
2383
2405
|
ON DELETE SET NULL,
|
|
2384
2406
|
CONSTRAINT billing_provider_module_database_id_unique
|
|
2385
2407
|
UNIQUE (database_id)
|
|
@@ -2398,7 +2420,7 @@ CREATE TABLE metaschema_modules_public.realtime_module (
|
|
|
2398
2420
|
source_registry_table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
2399
2421
|
retention_hours int NOT NULL DEFAULT 168,
|
|
2400
2422
|
premake int NOT NULL DEFAULT 7,
|
|
2401
|
-
|
|
2423
|
+
interval text NOT NULL DEFAULT '1 day',
|
|
2402
2424
|
notify_channel text NULL,
|
|
2403
2425
|
api_name text DEFAULT 'realtime',
|
|
2404
2426
|
private_api_name text DEFAULT NULL,
|
|
@@ -2420,15 +2442,15 @@ CREATE TABLE metaschema_modules_public.realtime_module (
|
|
|
2420
2442
|
ON DELETE CASCADE,
|
|
2421
2443
|
CONSTRAINT change_log_table_fkey
|
|
2422
2444
|
FOREIGN KEY(change_log_table_id)
|
|
2423
|
-
REFERENCES metaschema_public.table (id)
|
|
2445
|
+
REFERENCES metaschema_public."table" (id)
|
|
2424
2446
|
ON DELETE CASCADE,
|
|
2425
2447
|
CONSTRAINT listener_node_table_fkey
|
|
2426
2448
|
FOREIGN KEY(listener_node_table_id)
|
|
2427
|
-
REFERENCES metaschema_public.table (id)
|
|
2449
|
+
REFERENCES metaschema_public."table" (id)
|
|
2428
2450
|
ON DELETE CASCADE,
|
|
2429
2451
|
CONSTRAINT source_registry_table_fkey
|
|
2430
2452
|
FOREIGN KEY(source_registry_table_id)
|
|
2431
|
-
REFERENCES metaschema_public.table (id)
|
|
2453
|
+
REFERENCES metaschema_public."table" (id)
|
|
2432
2454
|
ON DELETE CASCADE
|
|
2433
2455
|
);
|
|
2434
2456
|
|
|
@@ -2453,6 +2475,8 @@ CREATE TABLE metaschema_modules_public.rate_limit_meters_module (
|
|
|
2453
2475
|
database_id uuid NOT NULL,
|
|
2454
2476
|
schema_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
2455
2477
|
private_schema_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
2478
|
+
public_schema_name text,
|
|
2479
|
+
private_schema_name text,
|
|
2456
2480
|
rate_limit_state_table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
2457
2481
|
rate_limit_state_table_name text NOT NULL DEFAULT '',
|
|
2458
2482
|
rate_limit_overrides_table_id uuid NULL,
|
|
@@ -2478,15 +2502,15 @@ CREATE TABLE metaschema_modules_public.rate_limit_meters_module (
|
|
|
2478
2502
|
ON DELETE CASCADE,
|
|
2479
2503
|
CONSTRAINT rate_limit_state_table_fkey
|
|
2480
2504
|
FOREIGN KEY(rate_limit_state_table_id)
|
|
2481
|
-
REFERENCES metaschema_public.table (id)
|
|
2505
|
+
REFERENCES metaschema_public."table" (id)
|
|
2482
2506
|
ON DELETE CASCADE,
|
|
2483
2507
|
CONSTRAINT rate_limit_overrides_table_fkey
|
|
2484
2508
|
FOREIGN KEY(rate_limit_overrides_table_id)
|
|
2485
|
-
REFERENCES metaschema_public.table (id)
|
|
2509
|
+
REFERENCES metaschema_public."table" (id)
|
|
2486
2510
|
ON DELETE CASCADE,
|
|
2487
2511
|
CONSTRAINT rate_window_limits_table_fkey
|
|
2488
2512
|
FOREIGN KEY(rate_window_limits_table_id)
|
|
2489
|
-
REFERENCES metaschema_public.table (id)
|
|
2513
|
+
REFERENCES metaschema_public."table" (id)
|
|
2490
2514
|
ON DELETE CASCADE,
|
|
2491
2515
|
CONSTRAINT rate_limit_meters_module_database_id_unique
|
|
2492
2516
|
UNIQUE (database_id)
|
|
@@ -2518,7 +2542,7 @@ CREATE TABLE metaschema_modules_public.config_secrets_org_module (
|
|
|
2518
2542
|
ON DELETE CASCADE,
|
|
2519
2543
|
CONSTRAINT table_fkey
|
|
2520
2544
|
FOREIGN KEY(table_id)
|
|
2521
|
-
REFERENCES metaschema_public.table (id)
|
|
2545
|
+
REFERENCES metaschema_public."table" (id)
|
|
2522
2546
|
ON DELETE CASCADE
|
|
2523
2547
|
);
|
|
2524
2548
|
|
|
@@ -2535,11 +2559,13 @@ CREATE TABLE metaschema_modules_public.inference_log_module (
|
|
|
2535
2559
|
database_id uuid NOT NULL,
|
|
2536
2560
|
schema_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
2537
2561
|
private_schema_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
2562
|
+
public_schema_name text,
|
|
2563
|
+
private_schema_name text,
|
|
2538
2564
|
inference_log_table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
2539
2565
|
inference_log_table_name text NOT NULL DEFAULT '',
|
|
2540
2566
|
usage_daily_table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
2541
2567
|
usage_daily_table_name text NOT NULL DEFAULT '',
|
|
2542
|
-
|
|
2568
|
+
interval text NOT NULL DEFAULT '1 month',
|
|
2543
2569
|
retention text NOT NULL DEFAULT '12 months',
|
|
2544
2570
|
premake int NOT NULL DEFAULT 2,
|
|
2545
2571
|
scope text NOT NULL DEFAULT 'app',
|
|
@@ -2562,11 +2588,11 @@ CREATE TABLE metaschema_modules_public.inference_log_module (
|
|
|
2562
2588
|
ON DELETE CASCADE,
|
|
2563
2589
|
CONSTRAINT inference_log_table_fkey
|
|
2564
2590
|
FOREIGN KEY(inference_log_table_id)
|
|
2565
|
-
REFERENCES metaschema_public.table (id)
|
|
2591
|
+
REFERENCES metaschema_public."table" (id)
|
|
2566
2592
|
ON DELETE CASCADE,
|
|
2567
2593
|
CONSTRAINT usage_daily_table_fkey
|
|
2568
2594
|
FOREIGN KEY(usage_daily_table_id)
|
|
2569
|
-
REFERENCES metaschema_public.table (id)
|
|
2595
|
+
REFERENCES metaschema_public."table" (id)
|
|
2570
2596
|
ON DELETE CASCADE,
|
|
2571
2597
|
CONSTRAINT inference_log_module_database_id_prefix_unique
|
|
2572
2598
|
UNIQUE NULLS NOT DISTINCT (database_id, prefix)
|
|
@@ -2579,11 +2605,13 @@ CREATE TABLE metaschema_modules_public.compute_log_module (
|
|
|
2579
2605
|
database_id uuid NOT NULL,
|
|
2580
2606
|
schema_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
2581
2607
|
private_schema_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
2608
|
+
public_schema_name text,
|
|
2609
|
+
private_schema_name text,
|
|
2582
2610
|
compute_log_table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
2583
2611
|
compute_log_table_name text NOT NULL DEFAULT '',
|
|
2584
2612
|
usage_daily_table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
2585
2613
|
usage_daily_table_name text NOT NULL DEFAULT '',
|
|
2586
|
-
|
|
2614
|
+
interval text NOT NULL DEFAULT '1 month',
|
|
2587
2615
|
retention text NOT NULL DEFAULT '12 months',
|
|
2588
2616
|
premake int NOT NULL DEFAULT 2,
|
|
2589
2617
|
scope text NOT NULL DEFAULT 'app',
|
|
@@ -2606,11 +2634,11 @@ CREATE TABLE metaschema_modules_public.compute_log_module (
|
|
|
2606
2634
|
ON DELETE CASCADE,
|
|
2607
2635
|
CONSTRAINT compute_log_table_fkey
|
|
2608
2636
|
FOREIGN KEY(compute_log_table_id)
|
|
2609
|
-
REFERENCES metaschema_public.table (id)
|
|
2637
|
+
REFERENCES metaschema_public."table" (id)
|
|
2610
2638
|
ON DELETE CASCADE,
|
|
2611
2639
|
CONSTRAINT usage_daily_table_fkey
|
|
2612
2640
|
FOREIGN KEY(usage_daily_table_id)
|
|
2613
|
-
REFERENCES metaschema_public.table (id)
|
|
2641
|
+
REFERENCES metaschema_public."table" (id)
|
|
2614
2642
|
ON DELETE CASCADE,
|
|
2615
2643
|
CONSTRAINT compute_log_module_database_id_prefix_unique
|
|
2616
2644
|
UNIQUE NULLS NOT DISTINCT (database_id, prefix)
|
|
@@ -2623,11 +2651,13 @@ CREATE TABLE metaschema_modules_public.transfer_log_module (
|
|
|
2623
2651
|
database_id uuid NOT NULL,
|
|
2624
2652
|
schema_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
2625
2653
|
private_schema_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
2654
|
+
public_schema_name text,
|
|
2655
|
+
private_schema_name text,
|
|
2626
2656
|
transfer_log_table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
2627
2657
|
transfer_log_table_name text NOT NULL DEFAULT '',
|
|
2628
2658
|
usage_daily_table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
2629
2659
|
usage_daily_table_name text NOT NULL DEFAULT '',
|
|
2630
|
-
|
|
2660
|
+
interval text NOT NULL DEFAULT '1 month',
|
|
2631
2661
|
retention text NOT NULL DEFAULT '12 months',
|
|
2632
2662
|
premake int NOT NULL DEFAULT 2,
|
|
2633
2663
|
scope text NOT NULL DEFAULT 'app',
|
|
@@ -2650,11 +2680,11 @@ CREATE TABLE metaschema_modules_public.transfer_log_module (
|
|
|
2650
2680
|
ON DELETE CASCADE,
|
|
2651
2681
|
CONSTRAINT transfer_log_table_fkey
|
|
2652
2682
|
FOREIGN KEY(transfer_log_table_id)
|
|
2653
|
-
REFERENCES metaschema_public.table (id)
|
|
2683
|
+
REFERENCES metaschema_public."table" (id)
|
|
2654
2684
|
ON DELETE CASCADE,
|
|
2655
2685
|
CONSTRAINT usage_daily_table_fkey
|
|
2656
2686
|
FOREIGN KEY(usage_daily_table_id)
|
|
2657
|
-
REFERENCES metaschema_public.table (id)
|
|
2687
|
+
REFERENCES metaschema_public."table" (id)
|
|
2658
2688
|
ON DELETE CASCADE,
|
|
2659
2689
|
CONSTRAINT transfer_log_module_database_id_prefix_unique
|
|
2660
2690
|
UNIQUE NULLS NOT DISTINCT (database_id, prefix)
|
|
@@ -2667,11 +2697,13 @@ CREATE TABLE metaschema_modules_public.storage_log_module (
|
|
|
2667
2697
|
database_id uuid NOT NULL,
|
|
2668
2698
|
schema_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
2669
2699
|
private_schema_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
2700
|
+
public_schema_name text,
|
|
2701
|
+
private_schema_name text,
|
|
2670
2702
|
storage_log_table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
2671
2703
|
storage_log_table_name text NOT NULL DEFAULT '',
|
|
2672
2704
|
usage_daily_table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
2673
2705
|
usage_daily_table_name text NOT NULL DEFAULT '',
|
|
2674
|
-
|
|
2706
|
+
interval text NOT NULL DEFAULT '1 month',
|
|
2675
2707
|
retention text NOT NULL DEFAULT '12 months',
|
|
2676
2708
|
premake int NOT NULL DEFAULT 2,
|
|
2677
2709
|
scope text NOT NULL DEFAULT 'app',
|
|
@@ -2694,11 +2726,11 @@ CREATE TABLE metaschema_modules_public.storage_log_module (
|
|
|
2694
2726
|
ON DELETE CASCADE,
|
|
2695
2727
|
CONSTRAINT storage_log_table_fkey
|
|
2696
2728
|
FOREIGN KEY(storage_log_table_id)
|
|
2697
|
-
REFERENCES metaschema_public.table (id)
|
|
2729
|
+
REFERENCES metaschema_public."table" (id)
|
|
2698
2730
|
ON DELETE CASCADE,
|
|
2699
2731
|
CONSTRAINT usage_daily_table_fkey
|
|
2700
2732
|
FOREIGN KEY(usage_daily_table_id)
|
|
2701
|
-
REFERENCES metaschema_public.table (id)
|
|
2733
|
+
REFERENCES metaschema_public."table" (id)
|
|
2702
2734
|
ON DELETE CASCADE,
|
|
2703
2735
|
CONSTRAINT storage_log_module_database_id_prefix_unique
|
|
2704
2736
|
UNIQUE NULLS NOT DISTINCT (database_id, prefix)
|
|
@@ -2711,6 +2743,8 @@ CREATE TABLE metaschema_modules_public.db_usage_module (
|
|
|
2711
2743
|
database_id uuid NOT NULL,
|
|
2712
2744
|
schema_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
2713
2745
|
private_schema_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
2746
|
+
public_schema_name text,
|
|
2747
|
+
private_schema_name text,
|
|
2714
2748
|
table_stats_log_table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
2715
2749
|
table_stats_log_table_name text NOT NULL DEFAULT '',
|
|
2716
2750
|
table_stats_daily_table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
@@ -2719,7 +2753,7 @@ CREATE TABLE metaschema_modules_public.db_usage_module (
|
|
|
2719
2753
|
query_stats_log_table_name text NOT NULL DEFAULT '',
|
|
2720
2754
|
query_stats_daily_table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
2721
2755
|
query_stats_daily_table_name text NOT NULL DEFAULT '',
|
|
2722
|
-
|
|
2756
|
+
interval text NOT NULL DEFAULT '1 month',
|
|
2723
2757
|
retention text NOT NULL DEFAULT '12 months',
|
|
2724
2758
|
premake int NOT NULL DEFAULT 2,
|
|
2725
2759
|
scope text NOT NULL DEFAULT 'app',
|
|
@@ -2741,19 +2775,19 @@ CREATE TABLE metaschema_modules_public.db_usage_module (
|
|
|
2741
2775
|
ON DELETE CASCADE,
|
|
2742
2776
|
CONSTRAINT table_stats_log_table_fkey
|
|
2743
2777
|
FOREIGN KEY(table_stats_log_table_id)
|
|
2744
|
-
REFERENCES metaschema_public.table (id)
|
|
2778
|
+
REFERENCES metaschema_public."table" (id)
|
|
2745
2779
|
ON DELETE CASCADE,
|
|
2746
2780
|
CONSTRAINT table_stats_daily_table_fkey
|
|
2747
2781
|
FOREIGN KEY(table_stats_daily_table_id)
|
|
2748
|
-
REFERENCES metaschema_public.table (id)
|
|
2782
|
+
REFERENCES metaschema_public."table" (id)
|
|
2749
2783
|
ON DELETE CASCADE,
|
|
2750
2784
|
CONSTRAINT query_stats_log_table_fkey
|
|
2751
2785
|
FOREIGN KEY(query_stats_log_table_id)
|
|
2752
|
-
REFERENCES metaschema_public.table (id)
|
|
2786
|
+
REFERENCES metaschema_public."table" (id)
|
|
2753
2787
|
ON DELETE CASCADE,
|
|
2754
2788
|
CONSTRAINT query_stats_daily_table_fkey
|
|
2755
2789
|
FOREIGN KEY(query_stats_daily_table_id)
|
|
2756
|
-
REFERENCES metaschema_public.table (id)
|
|
2790
|
+
REFERENCES metaschema_public."table" (id)
|
|
2757
2791
|
ON DELETE CASCADE,
|
|
2758
2792
|
CONSTRAINT db_usage_module_database_id_prefix_unique
|
|
2759
2793
|
UNIQUE NULLS NOT DISTINCT (database_id, prefix)
|
|
@@ -2766,6 +2800,8 @@ CREATE TABLE metaschema_modules_public.agent_module (
|
|
|
2766
2800
|
database_id uuid NOT NULL,
|
|
2767
2801
|
schema_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
2768
2802
|
private_schema_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
2803
|
+
public_schema_name text,
|
|
2804
|
+
private_schema_name text,
|
|
2769
2805
|
thread_table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
2770
2806
|
message_table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
2771
2807
|
task_table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
@@ -2809,39 +2845,39 @@ CREATE TABLE metaschema_modules_public.agent_module (
|
|
|
2809
2845
|
ON DELETE CASCADE,
|
|
2810
2846
|
CONSTRAINT agent_module_thread_table_fkey
|
|
2811
2847
|
FOREIGN KEY(thread_table_id)
|
|
2812
|
-
REFERENCES metaschema_public.table (id)
|
|
2848
|
+
REFERENCES metaschema_public."table" (id)
|
|
2813
2849
|
ON DELETE CASCADE,
|
|
2814
2850
|
CONSTRAINT agent_module_message_table_fkey
|
|
2815
2851
|
FOREIGN KEY(message_table_id)
|
|
2816
|
-
REFERENCES metaschema_public.table (id)
|
|
2852
|
+
REFERENCES metaschema_public."table" (id)
|
|
2817
2853
|
ON DELETE CASCADE,
|
|
2818
2854
|
CONSTRAINT agent_module_task_table_fkey
|
|
2819
2855
|
FOREIGN KEY(task_table_id)
|
|
2820
|
-
REFERENCES metaschema_public.table (id)
|
|
2856
|
+
REFERENCES metaschema_public."table" (id)
|
|
2821
2857
|
ON DELETE CASCADE,
|
|
2822
2858
|
CONSTRAINT agent_module_prompts_table_fkey
|
|
2823
2859
|
FOREIGN KEY(prompts_table_id)
|
|
2824
|
-
REFERENCES metaschema_public.table (id)
|
|
2860
|
+
REFERENCES metaschema_public."table" (id)
|
|
2825
2861
|
ON DELETE CASCADE,
|
|
2826
2862
|
CONSTRAINT agent_module_plan_table_fkey
|
|
2827
2863
|
FOREIGN KEY(plan_table_id)
|
|
2828
|
-
REFERENCES metaschema_public.table (id)
|
|
2864
|
+
REFERENCES metaschema_public."table" (id)
|
|
2829
2865
|
ON DELETE CASCADE,
|
|
2830
2866
|
CONSTRAINT agent_module_agent_table_fkey
|
|
2831
2867
|
FOREIGN KEY(agent_table_id)
|
|
2832
|
-
REFERENCES metaschema_public.table (id)
|
|
2868
|
+
REFERENCES metaschema_public."table" (id)
|
|
2833
2869
|
ON DELETE CASCADE,
|
|
2834
2870
|
CONSTRAINT agent_module_persona_table_fkey
|
|
2835
2871
|
FOREIGN KEY(persona_table_id)
|
|
2836
|
-
REFERENCES metaschema_public.table (id)
|
|
2872
|
+
REFERENCES metaschema_public."table" (id)
|
|
2837
2873
|
ON DELETE CASCADE,
|
|
2838
2874
|
CONSTRAINT agent_module_resource_table_fkey
|
|
2839
2875
|
FOREIGN KEY(resource_table_id)
|
|
2840
|
-
REFERENCES metaschema_public.table (id)
|
|
2876
|
+
REFERENCES metaschema_public."table" (id)
|
|
2841
2877
|
ON DELETE CASCADE,
|
|
2842
2878
|
CONSTRAINT agent_module_entity_table_fkey
|
|
2843
2879
|
FOREIGN KEY(entity_table_id)
|
|
2844
|
-
REFERENCES metaschema_public.table (id)
|
|
2880
|
+
REFERENCES metaschema_public."table" (id)
|
|
2845
2881
|
ON DELETE CASCADE
|
|
2846
2882
|
);
|
|
2847
2883
|
|
|
@@ -2865,6 +2901,7 @@ CREATE TABLE metaschema_modules_public.merkle_store_module (
|
|
|
2865
2901
|
private_api_name text,
|
|
2866
2902
|
scope text NOT NULL DEFAULT 'app',
|
|
2867
2903
|
function_prefix text DEFAULT NULL,
|
|
2904
|
+
permission_key text DEFAULT NULL,
|
|
2868
2905
|
created_at timestamptz NOT NULL DEFAULT now(),
|
|
2869
2906
|
CONSTRAINT db_fkey
|
|
2870
2907
|
FOREIGN KEY(database_id)
|
|
@@ -2880,19 +2917,19 @@ CREATE TABLE metaschema_modules_public.merkle_store_module (
|
|
|
2880
2917
|
ON DELETE CASCADE,
|
|
2881
2918
|
CONSTRAINT object_table_fkey
|
|
2882
2919
|
FOREIGN KEY(object_table_id)
|
|
2883
|
-
REFERENCES metaschema_public.table (id)
|
|
2920
|
+
REFERENCES metaschema_public."table" (id)
|
|
2884
2921
|
ON DELETE CASCADE,
|
|
2885
2922
|
CONSTRAINT store_table_fkey
|
|
2886
2923
|
FOREIGN KEY(store_table_id)
|
|
2887
|
-
REFERENCES metaschema_public.table (id)
|
|
2924
|
+
REFERENCES metaschema_public."table" (id)
|
|
2888
2925
|
ON DELETE CASCADE,
|
|
2889
2926
|
CONSTRAINT commit_table_fkey
|
|
2890
2927
|
FOREIGN KEY(commit_table_id)
|
|
2891
|
-
REFERENCES metaschema_public.table (id)
|
|
2928
|
+
REFERENCES metaschema_public."table" (id)
|
|
2892
2929
|
ON DELETE CASCADE,
|
|
2893
2930
|
CONSTRAINT ref_table_fkey
|
|
2894
2931
|
FOREIGN KEY(ref_table_id)
|
|
2895
|
-
REFERENCES metaschema_public.table (id)
|
|
2932
|
+
REFERENCES metaschema_public."table" (id)
|
|
2896
2933
|
ON DELETE CASCADE,
|
|
2897
2934
|
CONSTRAINT merkle_store_module_database_prefix_unique
|
|
2898
2935
|
UNIQUE (database_id, prefix)
|
|
@@ -2913,8 +2950,6 @@ CREATE TABLE metaschema_modules_public.graph_module (
|
|
|
2913
2950
|
prefix text NOT NULL DEFAULT '',
|
|
2914
2951
|
merkle_store_module_id uuid NOT NULL,
|
|
2915
2952
|
graphs_table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
2916
|
-
executions_table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
2917
|
-
outputs_table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
2918
2953
|
api_name text,
|
|
2919
2954
|
private_api_name text,
|
|
2920
2955
|
entity_table_id uuid NULL,
|
|
@@ -2940,19 +2975,11 @@ CREATE TABLE metaschema_modules_public.graph_module (
|
|
|
2940
2975
|
ON DELETE CASCADE,
|
|
2941
2976
|
CONSTRAINT graphs_table_fkey
|
|
2942
2977
|
FOREIGN KEY(graphs_table_id)
|
|
2943
|
-
REFERENCES metaschema_public.table (id)
|
|
2944
|
-
ON DELETE CASCADE,
|
|
2945
|
-
CONSTRAINT executions_table_fkey
|
|
2946
|
-
FOREIGN KEY(executions_table_id)
|
|
2947
|
-
REFERENCES metaschema_public.table (id)
|
|
2948
|
-
ON DELETE CASCADE,
|
|
2949
|
-
CONSTRAINT outputs_table_fkey
|
|
2950
|
-
FOREIGN KEY(outputs_table_id)
|
|
2951
|
-
REFERENCES metaschema_public.table (id)
|
|
2978
|
+
REFERENCES metaschema_public."table" (id)
|
|
2952
2979
|
ON DELETE CASCADE,
|
|
2953
2980
|
CONSTRAINT graph_module_entity_table_fkey
|
|
2954
2981
|
FOREIGN KEY(entity_table_id)
|
|
2955
|
-
REFERENCES metaschema_public.table (id)
|
|
2982
|
+
REFERENCES metaschema_public."table" (id)
|
|
2956
2983
|
ON DELETE CASCADE,
|
|
2957
2984
|
CONSTRAINT graph_module_database_merkle_unique
|
|
2958
2985
|
UNIQUE (database_id, merkle_store_module_id)
|
|
@@ -2960,6 +2987,67 @@ CREATE TABLE metaschema_modules_public.graph_module (
|
|
|
2960
2987
|
|
|
2961
2988
|
CREATE INDEX graph_module_database_id_idx ON metaschema_modules_public.graph_module (database_id);
|
|
2962
2989
|
|
|
2990
|
+
CREATE TABLE metaschema_modules_public.graph_execution_module (
|
|
2991
|
+
id uuid PRIMARY KEY DEFAULT uuidv7(),
|
|
2992
|
+
database_id uuid NOT NULL,
|
|
2993
|
+
schema_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
2994
|
+
private_schema_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
2995
|
+
public_schema_name text,
|
|
2996
|
+
private_schema_name text,
|
|
2997
|
+
graph_module_id uuid NOT NULL,
|
|
2998
|
+
scope text NOT NULL DEFAULT 'app',
|
|
2999
|
+
prefix text NOT NULL DEFAULT '',
|
|
3000
|
+
executions_table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
3001
|
+
outputs_table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
3002
|
+
node_states_table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
3003
|
+
executions_table_name text NOT NULL DEFAULT 'function_graph_executions',
|
|
3004
|
+
outputs_table_name text NOT NULL DEFAULT 'function_graph_execution_outputs',
|
|
3005
|
+
node_states_table_name text NOT NULL DEFAULT 'function_graph_execution_node_states',
|
|
3006
|
+
api_name text,
|
|
3007
|
+
private_api_name text,
|
|
3008
|
+
entity_table_id uuid NULL,
|
|
3009
|
+
policies jsonb NULL,
|
|
3010
|
+
provisions jsonb NULL,
|
|
3011
|
+
default_permissions text[] DEFAULT NULL,
|
|
3012
|
+
created_at timestamptz NOT NULL DEFAULT now(),
|
|
3013
|
+
CONSTRAINT graph_execution_module_db_fkey
|
|
3014
|
+
FOREIGN KEY(database_id)
|
|
3015
|
+
REFERENCES metaschema_public.database (id)
|
|
3016
|
+
ON DELETE CASCADE,
|
|
3017
|
+
CONSTRAINT graph_execution_module_schema_fkey
|
|
3018
|
+
FOREIGN KEY(schema_id)
|
|
3019
|
+
REFERENCES metaschema_public.schema (id)
|
|
3020
|
+
ON DELETE CASCADE,
|
|
3021
|
+
CONSTRAINT graph_execution_module_private_schema_fkey
|
|
3022
|
+
FOREIGN KEY(private_schema_id)
|
|
3023
|
+
REFERENCES metaschema_public.schema (id)
|
|
3024
|
+
ON DELETE CASCADE,
|
|
3025
|
+
CONSTRAINT graph_execution_module_graph_module_fkey
|
|
3026
|
+
FOREIGN KEY(graph_module_id)
|
|
3027
|
+
REFERENCES metaschema_modules_public.graph_module (id)
|
|
3028
|
+
ON DELETE CASCADE,
|
|
3029
|
+
CONSTRAINT graph_execution_module_executions_table_fkey
|
|
3030
|
+
FOREIGN KEY(executions_table_id)
|
|
3031
|
+
REFERENCES metaschema_public."table" (id)
|
|
3032
|
+
ON DELETE CASCADE,
|
|
3033
|
+
CONSTRAINT graph_execution_module_outputs_table_fkey
|
|
3034
|
+
FOREIGN KEY(outputs_table_id)
|
|
3035
|
+
REFERENCES metaschema_public."table" (id)
|
|
3036
|
+
ON DELETE CASCADE,
|
|
3037
|
+
CONSTRAINT graph_execution_module_node_states_table_fkey
|
|
3038
|
+
FOREIGN KEY(node_states_table_id)
|
|
3039
|
+
REFERENCES metaschema_public."table" (id)
|
|
3040
|
+
ON DELETE CASCADE,
|
|
3041
|
+
CONSTRAINT graph_execution_module_entity_table_fkey
|
|
3042
|
+
FOREIGN KEY(entity_table_id)
|
|
3043
|
+
REFERENCES metaschema_public."table" (id)
|
|
3044
|
+
ON DELETE CASCADE
|
|
3045
|
+
);
|
|
3046
|
+
|
|
3047
|
+
CREATE INDEX graph_execution_module_database_id_idx ON metaschema_modules_public.graph_execution_module (database_id);
|
|
3048
|
+
|
|
3049
|
+
CREATE UNIQUE INDEX graph_execution_module_unique_scope ON metaschema_modules_public.graph_execution_module (database_id, scope, prefix);
|
|
3050
|
+
|
|
2963
3051
|
CREATE TABLE metaschema_modules_public.namespace_module (
|
|
2964
3052
|
id uuid PRIMARY KEY DEFAULT uuidv7(),
|
|
2965
3053
|
database_id uuid NOT NULL,
|
|
@@ -2976,6 +3064,7 @@ CREATE TABLE metaschema_modules_public.namespace_module (
|
|
|
2976
3064
|
scope text NOT NULL DEFAULT 'app',
|
|
2977
3065
|
prefix text NOT NULL DEFAULT '',
|
|
2978
3066
|
entity_table_id uuid NULL,
|
|
3067
|
+
platform_namespaces_table_id uuid NULL,
|
|
2979
3068
|
policies jsonb NULL,
|
|
2980
3069
|
provisions jsonb NULL,
|
|
2981
3070
|
default_permissions text[] DEFAULT NULL,
|
|
@@ -2993,15 +3082,15 @@ CREATE TABLE metaschema_modules_public.namespace_module (
|
|
|
2993
3082
|
ON DELETE CASCADE,
|
|
2994
3083
|
CONSTRAINT namespace_module_namespaces_table_fkey
|
|
2995
3084
|
FOREIGN KEY(namespaces_table_id)
|
|
2996
|
-
REFERENCES metaschema_public.table (id)
|
|
3085
|
+
REFERENCES metaschema_public."table" (id)
|
|
2997
3086
|
ON DELETE CASCADE,
|
|
2998
3087
|
CONSTRAINT namespace_module_events_table_fkey
|
|
2999
3088
|
FOREIGN KEY(namespace_events_table_id)
|
|
3000
|
-
REFERENCES metaschema_public.table (id)
|
|
3089
|
+
REFERENCES metaschema_public."table" (id)
|
|
3001
3090
|
ON DELETE CASCADE,
|
|
3002
3091
|
CONSTRAINT namespace_module_entity_table_fkey
|
|
3003
3092
|
FOREIGN KEY(entity_table_id)
|
|
3004
|
-
REFERENCES metaschema_public.table (id)
|
|
3093
|
+
REFERENCES metaschema_public."table" (id)
|
|
3005
3094
|
ON DELETE CASCADE
|
|
3006
3095
|
);
|
|
3007
3096
|
|
|
@@ -3042,15 +3131,15 @@ CREATE TABLE metaschema_modules_public.function_module (
|
|
|
3042
3131
|
ON DELETE CASCADE,
|
|
3043
3132
|
CONSTRAINT function_module_definitions_table_fkey
|
|
3044
3133
|
FOREIGN KEY(definitions_table_id)
|
|
3045
|
-
REFERENCES metaschema_public.table (id)
|
|
3134
|
+
REFERENCES metaschema_public."table" (id)
|
|
3046
3135
|
ON DELETE CASCADE,
|
|
3047
3136
|
CONSTRAINT function_module_secret_defs_table_fkey
|
|
3048
3137
|
FOREIGN KEY(secret_definitions_table_id)
|
|
3049
|
-
REFERENCES metaschema_public.table (id)
|
|
3138
|
+
REFERENCES metaschema_public."table" (id)
|
|
3050
3139
|
ON DELETE CASCADE,
|
|
3051
3140
|
CONSTRAINT function_module_entity_table_fkey
|
|
3052
3141
|
FOREIGN KEY(entity_table_id)
|
|
3053
|
-
REFERENCES metaschema_public.table (id)
|
|
3142
|
+
REFERENCES metaschema_public."table" (id)
|
|
3054
3143
|
ON DELETE CASCADE
|
|
3055
3144
|
);
|
|
3056
3145
|
|
|
@@ -3091,15 +3180,15 @@ CREATE TABLE metaschema_modules_public.function_invocation_module (
|
|
|
3091
3180
|
ON DELETE CASCADE,
|
|
3092
3181
|
CONSTRAINT function_invocation_module_invocations_table_fkey
|
|
3093
3182
|
FOREIGN KEY(invocations_table_id)
|
|
3094
|
-
REFERENCES metaschema_public.table (id)
|
|
3183
|
+
REFERENCES metaschema_public."table" (id)
|
|
3095
3184
|
ON DELETE CASCADE,
|
|
3096
3185
|
CONSTRAINT function_invocation_module_logs_table_fkey
|
|
3097
3186
|
FOREIGN KEY(execution_logs_table_id)
|
|
3098
|
-
REFERENCES metaschema_public.table (id)
|
|
3187
|
+
REFERENCES metaschema_public."table" (id)
|
|
3099
3188
|
ON DELETE CASCADE,
|
|
3100
3189
|
CONSTRAINT function_invocation_module_entity_table_fkey
|
|
3101
3190
|
FOREIGN KEY(entity_table_id)
|
|
3102
|
-
REFERENCES metaschema_public.table (id)
|
|
3191
|
+
REFERENCES metaschema_public."table" (id)
|
|
3103
3192
|
ON DELETE CASCADE
|
|
3104
3193
|
);
|
|
3105
3194
|
|
|
@@ -3112,6 +3201,8 @@ CREATE TABLE metaschema_modules_public.config_secrets_module (
|
|
|
3112
3201
|
database_id uuid NOT NULL,
|
|
3113
3202
|
schema_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
3114
3203
|
private_schema_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
3204
|
+
public_schema_name text,
|
|
3205
|
+
private_schema_name text,
|
|
3115
3206
|
table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
3116
3207
|
config_definitions_table_id uuid NULL DEFAULT NULL,
|
|
3117
3208
|
table_name text NOT NULL DEFAULT 'secrets',
|
|
@@ -3137,15 +3228,15 @@ CREATE TABLE metaschema_modules_public.config_secrets_module (
|
|
|
3137
3228
|
ON DELETE CASCADE,
|
|
3138
3229
|
CONSTRAINT config_secrets_module_table_fkey
|
|
3139
3230
|
FOREIGN KEY(table_id)
|
|
3140
|
-
REFERENCES metaschema_public.table (id)
|
|
3231
|
+
REFERENCES metaschema_public."table" (id)
|
|
3141
3232
|
ON DELETE CASCADE,
|
|
3142
3233
|
CONSTRAINT config_secrets_module_config_defs_table_fkey
|
|
3143
3234
|
FOREIGN KEY(config_definitions_table_id)
|
|
3144
|
-
REFERENCES metaschema_public.table (id)
|
|
3235
|
+
REFERENCES metaschema_public."table" (id)
|
|
3145
3236
|
ON DELETE CASCADE,
|
|
3146
3237
|
CONSTRAINT config_secrets_module_entity_table_fkey
|
|
3147
3238
|
FOREIGN KEY(entity_table_id)
|
|
3148
|
-
REFERENCES metaschema_public.table (id)
|
|
3239
|
+
REFERENCES metaschema_public."table" (id)
|
|
3149
3240
|
ON DELETE CASCADE
|
|
3150
3241
|
);
|
|
3151
3242
|
|
|
@@ -3179,7 +3270,7 @@ CREATE TABLE metaschema_modules_public.user_credentials_module (
|
|
|
3179
3270
|
ON DELETE CASCADE,
|
|
3180
3271
|
CONSTRAINT user_credentials_module_table_fkey
|
|
3181
3272
|
FOREIGN KEY(table_id)
|
|
3182
|
-
REFERENCES metaschema_public.table (id)
|
|
3273
|
+
REFERENCES metaschema_public."table" (id)
|
|
3183
3274
|
ON DELETE CASCADE
|
|
3184
3275
|
);
|
|
3185
3276
|
|
|
@@ -3213,11 +3304,11 @@ CREATE TABLE metaschema_modules_public.user_settings_module (
|
|
|
3213
3304
|
ON DELETE CASCADE,
|
|
3214
3305
|
CONSTRAINT table_fkey
|
|
3215
3306
|
FOREIGN KEY(table_id)
|
|
3216
|
-
REFERENCES metaschema_public.table (id)
|
|
3307
|
+
REFERENCES metaschema_public."table" (id)
|
|
3217
3308
|
ON DELETE CASCADE,
|
|
3218
3309
|
CONSTRAINT owner_table_fkey
|
|
3219
3310
|
FOREIGN KEY(owner_table_id)
|
|
3220
|
-
REFERENCES metaschema_public.table (id)
|
|
3311
|
+
REFERENCES metaschema_public."table" (id)
|
|
3221
3312
|
ON DELETE CASCADE
|
|
3222
3313
|
);
|
|
3223
3314
|
|
|
@@ -3247,10 +3338,338 @@ CREATE TABLE metaschema_modules_public.i18n_module (
|
|
|
3247
3338
|
ON DELETE CASCADE,
|
|
3248
3339
|
CONSTRAINT settings_table_fkey
|
|
3249
3340
|
FOREIGN KEY(settings_table_id)
|
|
3250
|
-
REFERENCES metaschema_public.table (id)
|
|
3341
|
+
REFERENCES metaschema_public."table" (id)
|
|
3251
3342
|
ON DELETE CASCADE
|
|
3252
3343
|
);
|
|
3253
3344
|
|
|
3254
3345
|
CREATE INDEX i18n_module_database_id_idx ON metaschema_modules_public.i18n_module (database_id);
|
|
3255
3346
|
|
|
3256
|
-
CREATE UNIQUE INDEX i18n_module_unique_per_db ON metaschema_modules_public.i18n_module (database_id);
|
|
3347
|
+
CREATE UNIQUE INDEX i18n_module_unique_per_db ON metaschema_modules_public.i18n_module (database_id);
|
|
3348
|
+
|
|
3349
|
+
CREATE TABLE metaschema_modules_public.function_deployment_module (
|
|
3350
|
+
id uuid PRIMARY KEY DEFAULT uuidv7(),
|
|
3351
|
+
database_id uuid NOT NULL,
|
|
3352
|
+
schema_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
3353
|
+
private_schema_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
3354
|
+
public_schema_name text,
|
|
3355
|
+
private_schema_name text,
|
|
3356
|
+
deployments_table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
3357
|
+
deployment_events_table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
3358
|
+
deployments_table_name text NOT NULL DEFAULT 'function_deployments',
|
|
3359
|
+
deployment_events_table_name text NOT NULL DEFAULT 'function_deployment_events',
|
|
3360
|
+
api_name text,
|
|
3361
|
+
private_api_name text,
|
|
3362
|
+
scope text NOT NULL DEFAULT 'app',
|
|
3363
|
+
prefix text NOT NULL DEFAULT '',
|
|
3364
|
+
entity_table_id uuid NULL,
|
|
3365
|
+
function_module_id uuid NULL,
|
|
3366
|
+
namespace_module_id uuid NULL,
|
|
3367
|
+
policies jsonb NULL,
|
|
3368
|
+
provisions jsonb NULL,
|
|
3369
|
+
default_permissions text[] DEFAULT NULL,
|
|
3370
|
+
CONSTRAINT function_deployment_module_db_fkey
|
|
3371
|
+
FOREIGN KEY(database_id)
|
|
3372
|
+
REFERENCES metaschema_public.database (id)
|
|
3373
|
+
ON DELETE CASCADE,
|
|
3374
|
+
CONSTRAINT function_deployment_module_schema_fkey
|
|
3375
|
+
FOREIGN KEY(schema_id)
|
|
3376
|
+
REFERENCES metaschema_public.schema (id)
|
|
3377
|
+
ON DELETE CASCADE,
|
|
3378
|
+
CONSTRAINT function_deployment_module_private_schema_fkey
|
|
3379
|
+
FOREIGN KEY(private_schema_id)
|
|
3380
|
+
REFERENCES metaschema_public.schema (id)
|
|
3381
|
+
ON DELETE CASCADE,
|
|
3382
|
+
CONSTRAINT function_deployment_module_deployments_table_fkey
|
|
3383
|
+
FOREIGN KEY(deployments_table_id)
|
|
3384
|
+
REFERENCES metaschema_public."table" (id)
|
|
3385
|
+
ON DELETE CASCADE,
|
|
3386
|
+
CONSTRAINT function_deployment_module_events_table_fkey
|
|
3387
|
+
FOREIGN KEY(deployment_events_table_id)
|
|
3388
|
+
REFERENCES metaschema_public."table" (id)
|
|
3389
|
+
ON DELETE CASCADE,
|
|
3390
|
+
CONSTRAINT function_deployment_module_entity_table_fkey
|
|
3391
|
+
FOREIGN KEY(entity_table_id)
|
|
3392
|
+
REFERENCES metaschema_public."table" (id)
|
|
3393
|
+
ON DELETE CASCADE,
|
|
3394
|
+
CONSTRAINT function_deployment_module_function_module_fkey
|
|
3395
|
+
FOREIGN KEY(function_module_id)
|
|
3396
|
+
REFERENCES metaschema_modules_public.function_module (id)
|
|
3397
|
+
ON DELETE SET NULL,
|
|
3398
|
+
CONSTRAINT function_deployment_module_namespace_module_fkey
|
|
3399
|
+
FOREIGN KEY(namespace_module_id)
|
|
3400
|
+
REFERENCES metaschema_modules_public.namespace_module (id)
|
|
3401
|
+
ON DELETE SET NULL
|
|
3402
|
+
);
|
|
3403
|
+
|
|
3404
|
+
CREATE INDEX function_deployment_module_database_id_idx ON metaschema_modules_public.function_deployment_module (database_id);
|
|
3405
|
+
|
|
3406
|
+
CREATE UNIQUE INDEX function_deployment_module_unique_scope ON metaschema_modules_public.function_deployment_module (database_id, scope, prefix);
|
|
3407
|
+
|
|
3408
|
+
CREATE TABLE metaschema_modules_public.principal_auth_module (
|
|
3409
|
+
id uuid PRIMARY KEY DEFAULT uuidv7(),
|
|
3410
|
+
database_id uuid NOT NULL,
|
|
3411
|
+
schema_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
3412
|
+
principals_table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
3413
|
+
principal_entities_table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
3414
|
+
principal_scope_overrides_table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
3415
|
+
users_table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
3416
|
+
sessions_table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
3417
|
+
session_credentials_table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
3418
|
+
audits_table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
3419
|
+
principals_table_name text NOT NULL DEFAULT 'principals',
|
|
3420
|
+
create_principal_function text NOT NULL DEFAULT 'create_principal',
|
|
3421
|
+
delete_principal_function text NOT NULL DEFAULT 'delete_principal',
|
|
3422
|
+
create_org_principal_function text NOT NULL DEFAULT 'create_org_principal',
|
|
3423
|
+
delete_org_principal_function text NOT NULL DEFAULT 'delete_org_principal',
|
|
3424
|
+
create_org_api_key_function text NOT NULL DEFAULT 'create_org_api_key',
|
|
3425
|
+
revoke_org_api_key_function text NOT NULL DEFAULT 'revoke_org_api_key',
|
|
3426
|
+
api_name text DEFAULT 'auth',
|
|
3427
|
+
CONSTRAINT db_fkey
|
|
3428
|
+
FOREIGN KEY(database_id)
|
|
3429
|
+
REFERENCES metaschema_public.database (id)
|
|
3430
|
+
ON DELETE CASCADE,
|
|
3431
|
+
CONSTRAINT schema_fkey
|
|
3432
|
+
FOREIGN KEY(schema_id)
|
|
3433
|
+
REFERENCES metaschema_public.schema (id)
|
|
3434
|
+
ON DELETE CASCADE,
|
|
3435
|
+
CONSTRAINT principals_table_fkey
|
|
3436
|
+
FOREIGN KEY(principals_table_id)
|
|
3437
|
+
REFERENCES metaschema_public."table" (id)
|
|
3438
|
+
ON DELETE CASCADE,
|
|
3439
|
+
CONSTRAINT principal_entities_table_fkey
|
|
3440
|
+
FOREIGN KEY(principal_entities_table_id)
|
|
3441
|
+
REFERENCES metaschema_public."table" (id)
|
|
3442
|
+
ON DELETE CASCADE,
|
|
3443
|
+
CONSTRAINT users_table_fkey
|
|
3444
|
+
FOREIGN KEY(users_table_id)
|
|
3445
|
+
REFERENCES metaschema_public."table" (id)
|
|
3446
|
+
ON DELETE CASCADE,
|
|
3447
|
+
CONSTRAINT sessions_table_fkey
|
|
3448
|
+
FOREIGN KEY(sessions_table_id)
|
|
3449
|
+
REFERENCES metaschema_public."table" (id)
|
|
3450
|
+
ON DELETE CASCADE,
|
|
3451
|
+
CONSTRAINT session_credentials_table_fkey
|
|
3452
|
+
FOREIGN KEY(session_credentials_table_id)
|
|
3453
|
+
REFERENCES metaschema_public."table" (id)
|
|
3454
|
+
ON DELETE CASCADE
|
|
3455
|
+
);
|
|
3456
|
+
|
|
3457
|
+
CREATE INDEX principal_auth_module_database_id_idx ON metaschema_modules_public.principal_auth_module (database_id);
|
|
3458
|
+
|
|
3459
|
+
COMMENT ON CONSTRAINT principals_table_fkey ON metaschema_modules_public.principal_auth_module IS '@omit';
|
|
3460
|
+
|
|
3461
|
+
COMMENT ON CONSTRAINT users_table_fkey ON metaschema_modules_public.principal_auth_module IS '@omit';
|
|
3462
|
+
|
|
3463
|
+
COMMENT ON CONSTRAINT sessions_table_fkey ON metaschema_modules_public.principal_auth_module IS '@omit';
|
|
3464
|
+
|
|
3465
|
+
COMMENT ON CONSTRAINT session_credentials_table_fkey ON metaschema_modules_public.principal_auth_module IS '@omit';
|
|
3466
|
+
|
|
3467
|
+
COMMENT ON CONSTRAINT principal_entities_table_fkey ON metaschema_modules_public.principal_auth_module IS '@omit';
|
|
3468
|
+
|
|
3469
|
+
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
|
+
|
|
3471
|
+
CREATE TABLE metaschema_modules_public.server_definition_module (
|
|
3472
|
+
id uuid PRIMARY KEY DEFAULT uuidv7(),
|
|
3473
|
+
database_id uuid NOT NULL,
|
|
3474
|
+
schema_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
3475
|
+
private_schema_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
3476
|
+
public_schema_name text,
|
|
3477
|
+
private_schema_name text,
|
|
3478
|
+
definitions_table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
3479
|
+
definitions_table_name text NOT NULL DEFAULT 'server_definitions',
|
|
3480
|
+
api_name text,
|
|
3481
|
+
private_api_name text,
|
|
3482
|
+
scope text NOT NULL DEFAULT 'platform',
|
|
3483
|
+
prefix text NOT NULL DEFAULT '',
|
|
3484
|
+
entity_table_id uuid NULL,
|
|
3485
|
+
policies jsonb NULL,
|
|
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',
|
|
3525
|
+
api_name text,
|
|
3526
|
+
private_api_name text,
|
|
3527
|
+
scope text NOT NULL DEFAULT 'app',
|
|
3528
|
+
prefix text NOT NULL DEFAULT '',
|
|
3529
|
+
entity_table_id uuid NULL,
|
|
3530
|
+
server_definition_module_id uuid NULL,
|
|
3531
|
+
namespace_module_id uuid NULL,
|
|
3532
|
+
policies jsonb NULL,
|
|
3533
|
+
provisions jsonb NULL,
|
|
3534
|
+
default_permissions text[] DEFAULT NULL,
|
|
3535
|
+
CONSTRAINT server_deployment_module_db_fkey
|
|
3536
|
+
FOREIGN KEY(database_id)
|
|
3537
|
+
REFERENCES metaschema_public.database (id)
|
|
3538
|
+
ON DELETE CASCADE,
|
|
3539
|
+
CONSTRAINT server_deployment_module_schema_fkey
|
|
3540
|
+
FOREIGN KEY(schema_id)
|
|
3541
|
+
REFERENCES metaschema_public.schema (id)
|
|
3542
|
+
ON DELETE CASCADE,
|
|
3543
|
+
CONSTRAINT server_deployment_module_private_schema_fkey
|
|
3544
|
+
FOREIGN KEY(private_schema_id)
|
|
3545
|
+
REFERENCES metaschema_public.schema (id)
|
|
3546
|
+
ON DELETE CASCADE,
|
|
3547
|
+
CONSTRAINT server_deployment_module_deployments_table_fkey
|
|
3548
|
+
FOREIGN KEY(deployments_table_id)
|
|
3549
|
+
REFERENCES metaschema_public."table" (id)
|
|
3550
|
+
ON DELETE CASCADE,
|
|
3551
|
+
CONSTRAINT server_deployment_module_events_table_fkey
|
|
3552
|
+
FOREIGN KEY(deployment_events_table_id)
|
|
3553
|
+
REFERENCES metaschema_public."table" (id)
|
|
3554
|
+
ON DELETE CASCADE,
|
|
3555
|
+
CONSTRAINT server_deployment_module_entity_table_fkey
|
|
3556
|
+
FOREIGN KEY(entity_table_id)
|
|
3557
|
+
REFERENCES metaschema_public."table" (id)
|
|
3558
|
+
ON DELETE CASCADE,
|
|
3559
|
+
CONSTRAINT server_deployment_module_server_def_module_fkey
|
|
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
|
|
3564
|
+
FOREIGN KEY(namespace_module_id)
|
|
3565
|
+
REFERENCES metaschema_modules_public.namespace_module (id)
|
|
3566
|
+
ON DELETE SET NULL
|
|
3567
|
+
);
|
|
3568
|
+
|
|
3569
|
+
CREATE INDEX server_deployment_module_database_id_idx ON metaschema_modules_public.server_deployment_module (database_id);
|
|
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);
|
|
3674
|
+
|
|
3675
|
+
CREATE UNIQUE INDEX certificate_module_unique_scope ON metaschema_modules_public.certificate_module (database_id, scope, prefix);
|