@pgpm/metaschema-modules 0.26.5 → 0.26.6

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.
@@ -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
 
@@ -269,23 +269,23 @@ CREATE TABLE metaschema_modules_public.invites_module (
269
269
  ON DELETE CASCADE,
270
270
  CONSTRAINT invites_table_fkey
271
271
  FOREIGN KEY(invites_table_id)
272
- REFERENCES metaschema_public."table" (id)
272
+ REFERENCES metaschema_public.table (id)
273
273
  ON DELETE CASCADE,
274
274
  CONSTRAINT emails_table_fkey
275
275
  FOREIGN KEY(emails_table_id)
276
- REFERENCES metaschema_public."table" (id)
276
+ REFERENCES metaschema_public.table (id)
277
277
  ON DELETE CASCADE,
278
278
  CONSTRAINT users_table_fkey
279
279
  FOREIGN KEY(users_table_id)
280
- REFERENCES metaschema_public."table" (id)
280
+ REFERENCES metaschema_public.table (id)
281
281
  ON DELETE CASCADE,
282
282
  CONSTRAINT entity_table_fkey
283
283
  FOREIGN KEY(entity_table_id)
284
- REFERENCES metaschema_public."table" (id)
284
+ REFERENCES metaschema_public.table (id)
285
285
  ON DELETE CASCADE,
286
286
  CONSTRAINT claimed_invites_table_fkey
287
287
  FOREIGN KEY(claimed_invites_table_id)
288
- REFERENCES metaschema_public."table" (id)
288
+ REFERENCES metaschema_public.table (id)
289
289
  ON DELETE CASCADE,
290
290
  CONSTRAINT schema_fkey
291
291
  FOREIGN KEY(schema_id)
@@ -334,7 +334,7 @@ CREATE TABLE metaschema_modules_public.events_module (
334
334
  tg_check_achievements text NOT NULL DEFAULT '',
335
335
  grant_achievement text NOT NULL DEFAULT '',
336
336
  tg_achievement_reward text NOT NULL DEFAULT '',
337
- interval text NOT NULL DEFAULT '1 month',
337
+ "interval" text NOT NULL DEFAULT '1 month',
338
338
  retention text DEFAULT '12 months',
339
339
  premake int NOT NULL DEFAULT 2,
340
340
  scope text NOT NULL DEFAULT 'app',
@@ -358,39 +358,39 @@ CREATE TABLE metaschema_modules_public.events_module (
358
358
  ON DELETE CASCADE,
359
359
  CONSTRAINT events_table_fkey
360
360
  FOREIGN KEY(events_table_id)
361
- REFERENCES metaschema_public."table" (id)
361
+ REFERENCES metaschema_public.table (id)
362
362
  ON DELETE CASCADE,
363
363
  CONSTRAINT event_aggregates_table_fkey
364
364
  FOREIGN KEY(event_aggregates_table_id)
365
- REFERENCES metaschema_public."table" (id)
365
+ REFERENCES metaschema_public.table (id)
366
366
  ON DELETE CASCADE,
367
367
  CONSTRAINT event_types_table_fkey
368
368
  FOREIGN KEY(event_types_table_id)
369
- REFERENCES metaschema_public."table" (id)
369
+ REFERENCES metaschema_public.table (id)
370
370
  ON DELETE CASCADE,
371
371
  CONSTRAINT levels_table_fkey
372
372
  FOREIGN KEY(levels_table_id)
373
- REFERENCES metaschema_public."table" (id)
373
+ REFERENCES metaschema_public.table (id)
374
374
  ON DELETE CASCADE,
375
375
  CONSTRAINT level_requirements_table_fkey
376
376
  FOREIGN KEY(level_requirements_table_id)
377
- REFERENCES metaschema_public."table" (id)
377
+ REFERENCES metaschema_public.table (id)
378
378
  ON DELETE CASCADE,
379
379
  CONSTRAINT level_grants_table_fkey
380
380
  FOREIGN KEY(level_grants_table_id)
381
- REFERENCES metaschema_public."table" (id)
381
+ REFERENCES metaschema_public.table (id)
382
382
  ON DELETE CASCADE,
383
383
  CONSTRAINT achievement_rewards_table_fkey
384
384
  FOREIGN KEY(achievement_rewards_table_id)
385
- REFERENCES metaschema_public."table" (id)
385
+ REFERENCES metaschema_public.table (id)
386
386
  ON DELETE CASCADE,
387
387
  CONSTRAINT entity_table_fkey
388
388
  FOREIGN KEY(entity_table_id)
389
- REFERENCES metaschema_public."table" (id)
389
+ REFERENCES metaschema_public.table (id)
390
390
  ON DELETE CASCADE,
391
391
  CONSTRAINT actor_table_fkey
392
392
  FOREIGN KEY(actor_table_id)
393
- REFERENCES metaschema_public."table" (id)
393
+ REFERENCES metaschema_public.table (id)
394
394
  ON DELETE CASCADE
395
395
  );
396
396
 
@@ -445,59 +445,59 @@ CREATE TABLE metaschema_modules_public.limits_module (
445
445
  ON DELETE CASCADE,
446
446
  CONSTRAINT table_fkey
447
447
  FOREIGN KEY(table_id)
448
- REFERENCES metaschema_public."table" (id)
448
+ REFERENCES metaschema_public.table (id)
449
449
  ON DELETE CASCADE,
450
450
  CONSTRAINT default_table_fkey
451
451
  FOREIGN KEY(default_table_id)
452
- REFERENCES metaschema_public."table" (id)
452
+ REFERENCES metaschema_public.table (id)
453
453
  ON DELETE CASCADE,
454
454
  CONSTRAINT entity_table_fkey
455
455
  FOREIGN KEY(entity_table_id)
456
- REFERENCES metaschema_public."table" (id)
456
+ REFERENCES metaschema_public.table (id)
457
457
  ON DELETE CASCADE,
458
458
  CONSTRAINT actor_table_fkey
459
459
  FOREIGN KEY(actor_table_id)
460
- REFERENCES metaschema_public."table" (id)
460
+ REFERENCES metaschema_public.table (id)
461
461
  ON DELETE CASCADE,
462
462
  CONSTRAINT aggregate_table_fkey
463
463
  FOREIGN KEY(aggregate_table_id)
464
- REFERENCES metaschema_public."table" (id)
464
+ REFERENCES metaschema_public.table (id)
465
465
  ON DELETE CASCADE,
466
466
  CONSTRAINT limit_credits_table_fkey
467
467
  FOREIGN KEY(limit_credits_table_id)
468
- REFERENCES metaschema_public."table" (id)
468
+ REFERENCES metaschema_public.table (id)
469
469
  ON DELETE CASCADE,
470
470
  CONSTRAINT events_table_fkey
471
471
  FOREIGN KEY(events_table_id)
472
- REFERENCES metaschema_public."table" (id)
472
+ REFERENCES metaschema_public.table (id)
473
473
  ON DELETE CASCADE,
474
474
  CONSTRAINT credit_codes_table_fkey
475
475
  FOREIGN KEY(credit_codes_table_id)
476
- REFERENCES metaschema_public."table" (id)
476
+ REFERENCES metaschema_public.table (id)
477
477
  ON DELETE CASCADE,
478
478
  CONSTRAINT credit_code_items_table_fkey
479
479
  FOREIGN KEY(credit_code_items_table_id)
480
- REFERENCES metaschema_public."table" (id)
480
+ REFERENCES metaschema_public.table (id)
481
481
  ON DELETE CASCADE,
482
482
  CONSTRAINT credit_redemptions_table_fkey
483
483
  FOREIGN KEY(credit_redemptions_table_id)
484
- REFERENCES metaschema_public."table" (id)
484
+ REFERENCES metaschema_public.table (id)
485
485
  ON DELETE CASCADE,
486
486
  CONSTRAINT limit_caps_table_fkey
487
487
  FOREIGN KEY(limit_caps_table_id)
488
- REFERENCES metaschema_public."table" (id)
488
+ REFERENCES metaschema_public.table (id)
489
489
  ON DELETE CASCADE,
490
490
  CONSTRAINT limit_caps_defaults_table_fkey
491
491
  FOREIGN KEY(limit_caps_defaults_table_id)
492
- REFERENCES metaschema_public."table" (id)
492
+ REFERENCES metaschema_public.table (id)
493
493
  ON DELETE CASCADE,
494
494
  CONSTRAINT limit_warnings_table_fkey
495
495
  FOREIGN KEY(limit_warnings_table_id)
496
- REFERENCES metaschema_public."table" (id)
496
+ REFERENCES metaschema_public.table (id)
497
497
  ON DELETE CASCADE,
498
498
  CONSTRAINT limit_warning_state_table_fkey
499
499
  FOREIGN KEY(limit_warning_state_table_id)
500
- REFERENCES metaschema_public."table" (id)
500
+ REFERENCES metaschema_public.table (id)
501
501
  ON DELETE CASCADE
502
502
  );
503
503
 
@@ -519,7 +519,7 @@ CREATE TABLE metaschema_modules_public.membership_types_module (
519
519
  ON DELETE CASCADE,
520
520
  CONSTRAINT table_fkey
521
521
  FOREIGN KEY(table_id)
522
- REFERENCES metaschema_public."table" (id)
522
+ REFERENCES metaschema_public.table (id)
523
523
  ON DELETE CASCADE
524
524
  );
525
525
 
@@ -561,6 +561,8 @@ CREATE TABLE metaschema_modules_public.memberships_module (
561
561
  entity_ids_by_perm text NULL,
562
562
  entity_ids_function text NULL,
563
563
  member_profiles_table_id uuid NULL,
564
+ permission_default_permissions_table_id uuid NULL,
565
+ permission_default_grants_table_id uuid NULL,
564
566
  api_name text DEFAULT 'admin',
565
567
  private_api_name text DEFAULT NULL,
566
568
  CONSTRAINT db_fkey
@@ -577,31 +579,31 @@ CREATE TABLE metaschema_modules_public.memberships_module (
577
579
  ON DELETE CASCADE,
578
580
  CONSTRAINT memberships_table_fkey
579
581
  FOREIGN KEY(memberships_table_id)
580
- REFERENCES metaschema_public."table" (id)
582
+ REFERENCES metaschema_public.table (id)
581
583
  ON DELETE CASCADE,
582
584
  CONSTRAINT membership_defaults_table_fkey
583
585
  FOREIGN KEY(membership_defaults_table_id)
584
- REFERENCES metaschema_public."table" (id)
586
+ REFERENCES metaschema_public.table (id)
585
587
  ON DELETE CASCADE,
586
588
  CONSTRAINT membership_settings_table_fkey
587
589
  FOREIGN KEY(membership_settings_table_id)
588
- REFERENCES metaschema_public."table" (id)
590
+ REFERENCES metaschema_public.table (id)
589
591
  ON DELETE CASCADE,
590
592
  CONSTRAINT members_table_fkey
591
593
  FOREIGN KEY(members_table_id)
592
- REFERENCES metaschema_public."table" (id)
594
+ REFERENCES metaschema_public.table (id)
593
595
  ON DELETE CASCADE,
594
596
  CONSTRAINT grants_table_fkey
595
597
  FOREIGN KEY(grants_table_id)
596
- REFERENCES metaschema_public."table" (id)
598
+ REFERENCES metaschema_public.table (id)
597
599
  ON DELETE CASCADE,
598
600
  CONSTRAINT sprt_table_fkey
599
601
  FOREIGN KEY(sprt_table_id)
600
- REFERENCES metaschema_public."table" (id)
602
+ REFERENCES metaschema_public.table (id)
601
603
  ON DELETE CASCADE,
602
604
  CONSTRAINT entity_table_fkey
603
605
  FOREIGN KEY(entity_table_id)
604
- REFERENCES metaschema_public."table" (id)
606
+ REFERENCES metaschema_public.table (id)
605
607
  ON DELETE CASCADE,
606
608
  CONSTRAINT entity_table_owner_fkey
607
609
  FOREIGN KEY(entity_table_owner_id)
@@ -609,23 +611,23 @@ CREATE TABLE metaschema_modules_public.memberships_module (
609
611
  ON DELETE CASCADE,
610
612
  CONSTRAINT actor_table_fkey
611
613
  FOREIGN KEY(actor_table_id)
612
- REFERENCES metaschema_public."table" (id)
614
+ REFERENCES metaschema_public.table (id)
613
615
  ON DELETE CASCADE,
614
616
  CONSTRAINT limits_table_fkey
615
617
  FOREIGN KEY(limits_table_id)
616
- REFERENCES metaschema_public."table" (id)
618
+ REFERENCES metaschema_public.table (id)
617
619
  ON DELETE CASCADE,
618
620
  CONSTRAINT default_limits_table_fkey
619
621
  FOREIGN KEY(default_limits_table_id)
620
- REFERENCES metaschema_public."table" (id)
622
+ REFERENCES metaschema_public.table (id)
621
623
  ON DELETE CASCADE,
622
624
  CONSTRAINT permissions_table_fkey
623
625
  FOREIGN KEY(permissions_table_id)
624
- REFERENCES metaschema_public."table" (id)
626
+ REFERENCES metaschema_public.table (id)
625
627
  ON DELETE CASCADE,
626
628
  CONSTRAINT default_permissions_table_fkey
627
629
  FOREIGN KEY(default_permissions_table_id)
628
- REFERENCES metaschema_public."table" (id)
630
+ REFERENCES metaschema_public.table (id)
629
631
  ON DELETE CASCADE,
630
632
  CONSTRAINT memberships_module_unique
631
633
  UNIQUE (database_id, scope, prefix)
@@ -667,19 +669,19 @@ CREATE TABLE metaschema_modules_public.permissions_module (
667
669
  ON DELETE CASCADE,
668
670
  CONSTRAINT table_fkey
669
671
  FOREIGN KEY(table_id)
670
- REFERENCES metaschema_public."table" (id)
672
+ REFERENCES metaschema_public.table (id)
671
673
  ON DELETE CASCADE,
672
674
  CONSTRAINT default_table_fkey
673
675
  FOREIGN KEY(default_table_id)
674
- REFERENCES metaschema_public."table" (id)
676
+ REFERENCES metaschema_public.table (id)
675
677
  ON DELETE CASCADE,
676
678
  CONSTRAINT entity_table_fkey
677
679
  FOREIGN KEY(entity_table_id)
678
- REFERENCES metaschema_public."table" (id)
680
+ REFERENCES metaschema_public.table (id)
679
681
  ON DELETE CASCADE,
680
682
  CONSTRAINT actor_table_fkey
681
683
  FOREIGN KEY(actor_table_id)
682
- REFERENCES metaschema_public."table" (id)
684
+ REFERENCES metaschema_public.table (id)
683
685
  ON DELETE CASCADE
684
686
  );
685
687
 
@@ -701,11 +703,11 @@ CREATE TABLE metaschema_modules_public.phone_numbers_module (
701
703
  ON DELETE CASCADE,
702
704
  CONSTRAINT table_fkey
703
705
  FOREIGN KEY(table_id)
704
- REFERENCES metaschema_public."table" (id)
706
+ REFERENCES metaschema_public.table (id)
705
707
  ON DELETE CASCADE,
706
708
  CONSTRAINT owner_table_fkey
707
709
  FOREIGN KEY(owner_table_id)
708
- REFERENCES metaschema_public."table" (id)
710
+ REFERENCES metaschema_public.table (id)
709
711
  ON DELETE CASCADE,
710
712
  CONSTRAINT schema_fkey
711
713
  FOREIGN KEY(schema_id)
@@ -756,39 +758,39 @@ CREATE TABLE metaschema_modules_public.profiles_module (
756
758
  ON DELETE CASCADE,
757
759
  CONSTRAINT table_fkey
758
760
  FOREIGN KEY(table_id)
759
- REFERENCES metaschema_public."table" (id)
761
+ REFERENCES metaschema_public.table (id)
760
762
  ON DELETE CASCADE,
761
763
  CONSTRAINT profile_permissions_table_fkey
762
764
  FOREIGN KEY(profile_permissions_table_id)
763
- REFERENCES metaschema_public."table" (id)
765
+ REFERENCES metaschema_public.table (id)
764
766
  ON DELETE CASCADE,
765
767
  CONSTRAINT profile_grants_table_fkey
766
768
  FOREIGN KEY(profile_grants_table_id)
767
- REFERENCES metaschema_public."table" (id)
769
+ REFERENCES metaschema_public.table (id)
768
770
  ON DELETE CASCADE,
769
771
  CONSTRAINT profile_definition_grants_table_fkey
770
772
  FOREIGN KEY(profile_definition_grants_table_id)
771
- REFERENCES metaschema_public."table" (id)
773
+ REFERENCES metaschema_public.table (id)
772
774
  ON DELETE CASCADE,
773
775
  CONSTRAINT profile_templates_table_fkey
774
776
  FOREIGN KEY(profile_templates_table_id)
775
- REFERENCES metaschema_public."table" (id)
777
+ REFERENCES metaschema_public.table (id)
776
778
  ON DELETE CASCADE,
777
779
  CONSTRAINT entity_table_fkey
778
780
  FOREIGN KEY(entity_table_id)
779
- REFERENCES metaschema_public."table" (id)
781
+ REFERENCES metaschema_public.table (id)
780
782
  ON DELETE CASCADE,
781
783
  CONSTRAINT actor_table_fkey
782
784
  FOREIGN KEY(actor_table_id)
783
- REFERENCES metaschema_public."table" (id)
785
+ REFERENCES metaschema_public.table (id)
784
786
  ON DELETE CASCADE,
785
787
  CONSTRAINT permissions_table_fkey
786
788
  FOREIGN KEY(permissions_table_id)
787
- REFERENCES metaschema_public."table" (id)
789
+ REFERENCES metaschema_public.table (id)
788
790
  ON DELETE CASCADE,
789
791
  CONSTRAINT memberships_table_fkey
790
792
  FOREIGN KEY(memberships_table_id)
791
- REFERENCES metaschema_public."table" (id)
793
+ REFERENCES metaschema_public.table (id)
792
794
  ON DELETE CASCADE,
793
795
  CONSTRAINT profiles_module_unique
794
796
  UNIQUE (database_id, scope, prefix)
@@ -816,15 +818,15 @@ CREATE TABLE metaschema_modules_public.rls_module (
816
818
  ON DELETE CASCADE,
817
819
  CONSTRAINT session_credentials_table_fkey
818
820
  FOREIGN KEY(session_credentials_table_id)
819
- REFERENCES metaschema_public."table" (id)
821
+ REFERENCES metaschema_public.table (id)
820
822
  ON DELETE CASCADE,
821
823
  CONSTRAINT sessions_table_fkey
822
824
  FOREIGN KEY(sessions_table_id)
823
- REFERENCES metaschema_public."table" (id)
825
+ REFERENCES metaschema_public.table (id)
824
826
  ON DELETE CASCADE,
825
827
  CONSTRAINT users_table_fkey
826
828
  FOREIGN KEY(users_table_id)
827
- REFERENCES metaschema_public."table" (id)
829
+ REFERENCES metaschema_public.table (id)
828
830
  ON DELETE CASCADE,
829
831
  CONSTRAINT schema_fkey
830
832
  FOREIGN KEY(schema_id)
@@ -864,7 +866,7 @@ CREATE TABLE metaschema_modules_public.user_state_module (
864
866
  ON DELETE CASCADE,
865
867
  CONSTRAINT table_fkey
866
868
  FOREIGN KEY(table_id)
867
- REFERENCES metaschema_public."table" (id)
869
+ REFERENCES metaschema_public.table (id)
868
870
  ON DELETE CASCADE
869
871
  );
870
872
 
@@ -892,19 +894,19 @@ CREATE TABLE metaschema_modules_public.sessions_module (
892
894
  ON DELETE CASCADE,
893
895
  CONSTRAINT sessions_table_fkey
894
896
  FOREIGN KEY(sessions_table_id)
895
- REFERENCES metaschema_public."table" (id)
897
+ REFERENCES metaschema_public.table (id)
896
898
  ON DELETE CASCADE,
897
899
  CONSTRAINT session_credentials_table_fkey
898
900
  FOREIGN KEY(session_credentials_table_id)
899
- REFERENCES metaschema_public."table" (id)
901
+ REFERENCES metaschema_public.table (id)
900
902
  ON DELETE CASCADE,
901
903
  CONSTRAINT auth_settings_table_fkey
902
904
  FOREIGN KEY(auth_settings_table_id)
903
- REFERENCES metaschema_public."table" (id)
905
+ REFERENCES metaschema_public.table (id)
904
906
  ON DELETE CASCADE,
905
907
  CONSTRAINT users_table_fkey
906
908
  FOREIGN KEY(users_table_id)
907
- REFERENCES metaschema_public."table" (id)
909
+ REFERENCES metaschema_public.table (id)
908
910
  ON DELETE CASCADE
909
911
  );
910
912
 
@@ -955,27 +957,27 @@ CREATE TABLE metaschema_modules_public.user_auth_module (
955
957
  ON DELETE CASCADE,
956
958
  CONSTRAINT email_table_fkey
957
959
  FOREIGN KEY(emails_table_id)
958
- REFERENCES metaschema_public."table" (id)
960
+ REFERENCES metaschema_public.table (id)
959
961
  ON DELETE CASCADE,
960
962
  CONSTRAINT users_table_fkey
961
963
  FOREIGN KEY(users_table_id)
962
- REFERENCES metaschema_public."table" (id)
964
+ REFERENCES metaschema_public.table (id)
963
965
  ON DELETE CASCADE,
964
966
  CONSTRAINT secrets_table_fkey
965
967
  FOREIGN KEY(secrets_table_id)
966
- REFERENCES metaschema_public."table" (id)
968
+ REFERENCES metaschema_public.table (id)
967
969
  ON DELETE CASCADE,
968
970
  CONSTRAINT encrypted_table_fkey
969
971
  FOREIGN KEY(encrypted_table_id)
970
- REFERENCES metaschema_public."table" (id)
972
+ REFERENCES metaschema_public.table (id)
971
973
  ON DELETE CASCADE,
972
974
  CONSTRAINT sessions_table_fkey
973
975
  FOREIGN KEY(sessions_table_id)
974
- REFERENCES metaschema_public."table" (id)
976
+ REFERENCES metaschema_public.table (id)
975
977
  ON DELETE CASCADE,
976
978
  CONSTRAINT session_credentials_table_fkey
977
979
  FOREIGN KEY(session_credentials_table_id)
978
- REFERENCES metaschema_public."table" (id)
980
+ REFERENCES metaschema_public.table (id)
979
981
  ON DELETE CASCADE
980
982
  );
981
983
 
@@ -1013,11 +1015,11 @@ CREATE TABLE metaschema_modules_public.users_module (
1013
1015
  ON DELETE CASCADE,
1014
1016
  CONSTRAINT table_fkey
1015
1017
  FOREIGN KEY(table_id)
1016
- REFERENCES metaschema_public."table" (id)
1018
+ REFERENCES metaschema_public.table (id)
1017
1019
  ON DELETE CASCADE,
1018
1020
  CONSTRAINT type_table_fkey
1019
1021
  FOREIGN KEY(type_table_id)
1020
- REFERENCES metaschema_public."table" (id)
1022
+ REFERENCES metaschema_public.table (id)
1021
1023
  ON DELETE CASCADE
1022
1024
  );
1023
1025
 
@@ -1060,23 +1062,23 @@ CREATE TABLE metaschema_modules_public.hierarchy_module (
1060
1062
  ON DELETE CASCADE,
1061
1063
  CONSTRAINT chart_edges_table_fkey
1062
1064
  FOREIGN KEY(chart_edges_table_id)
1063
- REFERENCES metaschema_public."table" (id)
1065
+ REFERENCES metaschema_public.table (id)
1064
1066
  ON DELETE CASCADE,
1065
1067
  CONSTRAINT hierarchy_sprt_table_fkey
1066
1068
  FOREIGN KEY(hierarchy_sprt_table_id)
1067
- REFERENCES metaschema_public."table" (id)
1069
+ REFERENCES metaschema_public.table (id)
1068
1070
  ON DELETE CASCADE,
1069
1071
  CONSTRAINT chart_edge_grants_table_fkey
1070
1072
  FOREIGN KEY(chart_edge_grants_table_id)
1071
- REFERENCES metaschema_public."table" (id)
1073
+ REFERENCES metaschema_public.table (id)
1072
1074
  ON DELETE CASCADE,
1073
1075
  CONSTRAINT entity_table_fkey
1074
1076
  FOREIGN KEY(entity_table_id)
1075
- REFERENCES metaschema_public."table" (id)
1077
+ REFERENCES metaschema_public.table (id)
1076
1078
  ON DELETE CASCADE,
1077
1079
  CONSTRAINT users_table_fkey
1078
1080
  FOREIGN KEY(users_table_id)
1079
- REFERENCES metaschema_public."table" (id)
1081
+ REFERENCES metaschema_public.table (id)
1080
1082
  ON DELETE CASCADE,
1081
1083
  CONSTRAINT hierarchy_module_database_unique
1082
1084
  UNIQUE (database_id)
@@ -1102,7 +1104,7 @@ CREATE TABLE metaschema_modules_public.secure_table_provision (
1102
1104
  ON DELETE CASCADE,
1103
1105
  CONSTRAINT table_fkey
1104
1106
  FOREIGN KEY(table_id)
1105
- REFERENCES metaschema_public."table" (id)
1107
+ REFERENCES metaschema_public.table (id)
1106
1108
  ON DELETE CASCADE,
1107
1109
  CONSTRAINT schema_fkey
1108
1110
  FOREIGN KEY(schema_id)
@@ -1169,11 +1171,11 @@ CREATE TABLE metaschema_modules_public.relation_provision (
1169
1171
  ON DELETE CASCADE,
1170
1172
  CONSTRAINT source_table_fkey
1171
1173
  FOREIGN KEY(source_table_id)
1172
- REFERENCES metaschema_public."table" (id)
1174
+ REFERENCES metaschema_public.table (id)
1173
1175
  ON DELETE CASCADE,
1174
1176
  CONSTRAINT target_table_fkey
1175
1177
  FOREIGN KEY(target_table_id)
1176
- REFERENCES metaschema_public."table" (id)
1178
+ REFERENCES metaschema_public.table (id)
1177
1179
  ON DELETE CASCADE
1178
1180
  );
1179
1181
 
@@ -1538,23 +1540,23 @@ CREATE TABLE metaschema_modules_public.storage_module (
1538
1540
  ON DELETE CASCADE,
1539
1541
  CONSTRAINT buckets_table_fkey
1540
1542
  FOREIGN KEY(buckets_table_id)
1541
- REFERENCES metaschema_public."table" (id)
1543
+ REFERENCES metaschema_public.table (id)
1542
1544
  ON DELETE CASCADE,
1543
1545
  CONSTRAINT files_table_fkey
1544
1546
  FOREIGN KEY(files_table_id)
1545
- REFERENCES metaschema_public."table" (id)
1547
+ REFERENCES metaschema_public.table (id)
1546
1548
  ON DELETE CASCADE,
1547
1549
  CONSTRAINT entity_table_fkey
1548
1550
  FOREIGN KEY(entity_table_id)
1549
- REFERENCES metaschema_public."table" (id)
1551
+ REFERENCES metaschema_public.table (id)
1550
1552
  ON DELETE CASCADE,
1551
1553
  CONSTRAINT path_shares_table_fkey
1552
1554
  FOREIGN KEY(path_shares_table_id)
1553
- REFERENCES metaschema_public."table" (id)
1555
+ REFERENCES metaschema_public.table (id)
1554
1556
  ON DELETE CASCADE,
1555
1557
  CONSTRAINT file_events_table_fkey
1556
1558
  FOREIGN KEY(file_events_table_id)
1557
- REFERENCES metaschema_public."table" (id)
1559
+ REFERENCES metaschema_public.table (id)
1558
1560
  ON DELETE CASCADE
1559
1561
  );
1560
1562
 
@@ -1834,15 +1836,15 @@ CREATE TABLE metaschema_modules_public.rate_limits_module (
1834
1836
  ON DELETE CASCADE,
1835
1837
  CONSTRAINT rate_limit_settings_table_fkey
1836
1838
  FOREIGN KEY(rate_limit_settings_table_id)
1837
- REFERENCES metaschema_public."table" (id)
1839
+ REFERENCES metaschema_public.table (id)
1838
1840
  ON DELETE CASCADE,
1839
1841
  CONSTRAINT ip_rate_limits_table_fkey
1840
1842
  FOREIGN KEY(ip_rate_limits_table_id)
1841
- REFERENCES metaschema_public."table" (id)
1843
+ REFERENCES metaschema_public.table (id)
1842
1844
  ON DELETE CASCADE,
1843
1845
  CONSTRAINT rate_limits_table_fkey
1844
1846
  FOREIGN KEY(rate_limits_table_id)
1845
- REFERENCES metaschema_public."table" (id)
1847
+ REFERENCES metaschema_public.table (id)
1846
1848
  ON DELETE CASCADE,
1847
1849
  CONSTRAINT rate_limits_module_database_id_uniq
1848
1850
  UNIQUE (database_id)
@@ -1874,11 +1876,11 @@ CREATE TABLE metaschema_modules_public.devices_module (
1874
1876
  ON DELETE CASCADE,
1875
1877
  CONSTRAINT user_devices_table_fkey
1876
1878
  FOREIGN KEY(user_devices_table_id)
1877
- REFERENCES metaschema_public."table" (id)
1879
+ REFERENCES metaschema_public.table (id)
1878
1880
  ON DELETE CASCADE,
1879
1881
  CONSTRAINT device_settings_table_fkey
1880
1882
  FOREIGN KEY(device_settings_table_id)
1881
- REFERENCES metaschema_public."table" (id)
1883
+ REFERENCES metaschema_public.table (id)
1882
1884
  ON DELETE CASCADE,
1883
1885
  CONSTRAINT devices_module_database_id_uniq
1884
1886
  UNIQUE (database_id)
@@ -1907,11 +1909,11 @@ CREATE TABLE metaschema_modules_public.session_secrets_module (
1907
1909
  ON DELETE CASCADE,
1908
1910
  CONSTRAINT table_fkey
1909
1911
  FOREIGN KEY(table_id)
1910
- REFERENCES metaschema_public."table" (id)
1912
+ REFERENCES metaschema_public.table (id)
1911
1913
  ON DELETE CASCADE,
1912
1914
  CONSTRAINT sessions_table_fkey
1913
1915
  FOREIGN KEY(sessions_table_id)
1914
- REFERENCES metaschema_public."table" (id)
1916
+ REFERENCES metaschema_public.table (id)
1915
1917
  ON DELETE CASCADE
1916
1918
  );
1917
1919
 
@@ -1943,11 +1945,11 @@ CREATE TABLE metaschema_modules_public.webauthn_credentials_module (
1943
1945
  ON DELETE CASCADE,
1944
1946
  CONSTRAINT table_fkey
1945
1947
  FOREIGN KEY(table_id)
1946
- REFERENCES metaschema_public."table" (id)
1948
+ REFERENCES metaschema_public.table (id)
1947
1949
  ON DELETE CASCADE,
1948
1950
  CONSTRAINT owner_table_fkey
1949
1951
  FOREIGN KEY(owner_table_id)
1950
- REFERENCES metaschema_public."table" (id)
1952
+ REFERENCES metaschema_public.table (id)
1951
1953
  ON DELETE CASCADE,
1952
1954
  CONSTRAINT schema_fkey
1953
1955
  FOREIGN KEY(schema_id)
@@ -1992,27 +1994,27 @@ CREATE TABLE metaschema_modules_public.webauthn_auth_module (
1992
1994
  ON DELETE CASCADE,
1993
1995
  CONSTRAINT users_table_fkey
1994
1996
  FOREIGN KEY(users_table_id)
1995
- REFERENCES metaschema_public."table" (id)
1997
+ REFERENCES metaschema_public.table (id)
1996
1998
  ON DELETE CASCADE,
1997
1999
  CONSTRAINT credentials_table_fkey
1998
2000
  FOREIGN KEY(credentials_table_id)
1999
- REFERENCES metaschema_public."table" (id)
2001
+ REFERENCES metaschema_public.table (id)
2000
2002
  ON DELETE CASCADE,
2001
2003
  CONSTRAINT sessions_table_fkey
2002
2004
  FOREIGN KEY(sessions_table_id)
2003
- REFERENCES metaschema_public."table" (id)
2005
+ REFERENCES metaschema_public.table (id)
2004
2006
  ON DELETE CASCADE,
2005
2007
  CONSTRAINT session_credentials_table_fkey
2006
2008
  FOREIGN KEY(session_credentials_table_id)
2007
- REFERENCES metaschema_public."table" (id)
2009
+ REFERENCES metaschema_public.table (id)
2008
2010
  ON DELETE CASCADE,
2009
2011
  CONSTRAINT session_secrets_table_fkey
2010
2012
  FOREIGN KEY(session_secrets_table_id)
2011
- REFERENCES metaschema_public."table" (id)
2013
+ REFERENCES metaschema_public.table (id)
2012
2014
  ON DELETE CASCADE,
2013
2015
  CONSTRAINT auth_settings_table_fkey
2014
2016
  FOREIGN KEY(auth_settings_table_id)
2015
- REFERENCES metaschema_public."table" (id)
2017
+ REFERENCES metaschema_public.table (id)
2016
2018
  ON DELETE CASCADE
2017
2019
  );
2018
2020
 
@@ -2036,7 +2038,7 @@ CREATE TABLE metaschema_modules_public.identity_providers_module (
2036
2038
  ON DELETE CASCADE,
2037
2039
  CONSTRAINT table_fkey
2038
2040
  FOREIGN KEY(table_id)
2039
- REFERENCES metaschema_public."table" (id)
2041
+ REFERENCES metaschema_public.table (id)
2040
2042
  ON DELETE CASCADE,
2041
2043
  CONSTRAINT schema_fkey
2042
2044
  FOREIGN KEY(schema_id)
@@ -2048,7 +2050,7 @@ CREATE TABLE metaschema_modules_public.identity_providers_module (
2048
2050
  ON DELETE CASCADE,
2049
2051
  CONSTRAINT entity_table_fkey
2050
2052
  FOREIGN KEY(entity_table_id)
2051
- REFERENCES metaschema_public."table" (id)
2053
+ REFERENCES metaschema_public.table (id)
2052
2054
  ON DELETE CASCADE
2053
2055
  );
2054
2056
 
@@ -2085,6 +2087,7 @@ CREATE TABLE metaschema_modules_public.notifications_module (
2085
2087
  preferences_table_id uuid,
2086
2088
  channels_table_id uuid,
2087
2089
  delivery_log_table_id uuid,
2090
+ suppressions_table_id uuid,
2088
2091
  owner_table_id uuid NOT NULL DEFAULT uuid_nil(),
2089
2092
  user_settings_table_id uuid,
2090
2093
  organization_settings_table_id uuid,
@@ -2102,35 +2105,39 @@ CREATE TABLE metaschema_modules_public.notifications_module (
2102
2105
  ON DELETE CASCADE,
2103
2106
  CONSTRAINT notifications_table_fkey
2104
2107
  FOREIGN KEY(notifications_table_id)
2105
- REFERENCES metaschema_public."table" (id)
2108
+ REFERENCES metaschema_public.table (id)
2106
2109
  ON DELETE CASCADE,
2107
2110
  CONSTRAINT read_state_table_fkey
2108
2111
  FOREIGN KEY(read_state_table_id)
2109
- REFERENCES metaschema_public."table" (id)
2112
+ REFERENCES metaschema_public.table (id)
2110
2113
  ON DELETE CASCADE,
2111
2114
  CONSTRAINT preferences_table_fkey
2112
2115
  FOREIGN KEY(preferences_table_id)
2113
- REFERENCES metaschema_public."table" (id)
2116
+ REFERENCES metaschema_public.table (id)
2114
2117
  ON DELETE SET NULL,
2115
2118
  CONSTRAINT channels_table_fkey
2116
2119
  FOREIGN KEY(channels_table_id)
2117
- REFERENCES metaschema_public."table" (id)
2120
+ REFERENCES metaschema_public.table (id)
2118
2121
  ON DELETE SET NULL,
2119
2122
  CONSTRAINT delivery_log_table_fkey
2120
2123
  FOREIGN KEY(delivery_log_table_id)
2121
- REFERENCES metaschema_public."table" (id)
2124
+ REFERENCES metaschema_public.table (id)
2125
+ ON DELETE SET NULL,
2126
+ CONSTRAINT suppressions_table_fkey
2127
+ FOREIGN KEY(suppressions_table_id)
2128
+ REFERENCES metaschema_public.table (id)
2122
2129
  ON DELETE SET NULL,
2123
2130
  CONSTRAINT owner_table_fkey
2124
2131
  FOREIGN KEY(owner_table_id)
2125
- REFERENCES metaschema_public."table" (id)
2132
+ REFERENCES metaschema_public.table (id)
2126
2133
  ON DELETE CASCADE,
2127
2134
  CONSTRAINT user_settings_table_fkey
2128
2135
  FOREIGN KEY(user_settings_table_id)
2129
- REFERENCES metaschema_public."table" (id)
2136
+ REFERENCES metaschema_public.table (id)
2130
2137
  ON DELETE SET NULL,
2131
2138
  CONSTRAINT organization_settings_table_fkey
2132
2139
  FOREIGN KEY(organization_settings_table_id)
2133
- REFERENCES metaschema_public."table" (id)
2140
+ REFERENCES metaschema_public.table (id)
2134
2141
  ON DELETE SET NULL,
2135
2142
  CONSTRAINT schema_fkey
2136
2143
  FOREIGN KEY(schema_id)
@@ -2161,6 +2168,8 @@ COMMENT ON CONSTRAINT channels_table_fkey ON metaschema_modules_public.notificat
2161
2168
  COMMENT ON CONSTRAINT delivery_log_table_fkey ON metaschema_modules_public.notifications_module IS '@fieldName deliveryLogTableByDeliveryLogTableId
2162
2169
  @omit manyToMany';
2163
2170
 
2171
+ COMMENT ON CONSTRAINT suppressions_table_fkey ON metaschema_modules_public.notifications_module IS '@fieldName suppressionsTableBySuppressionsTableId';
2172
+
2164
2173
  COMMENT ON CONSTRAINT owner_table_fkey ON metaschema_modules_public.notifications_module IS '@omit manyToMany';
2165
2174
 
2166
2175
  COMMENT ON CONSTRAINT user_settings_table_fkey ON metaschema_modules_public.notifications_module IS '@fieldName userSettingsTableByUserSettingsTableId
@@ -2207,27 +2216,27 @@ CREATE TABLE metaschema_modules_public.plans_module (
2207
2216
  ON DELETE CASCADE,
2208
2217
  CONSTRAINT plans_table_fkey
2209
2218
  FOREIGN KEY(plans_table_id)
2210
- REFERENCES metaschema_public."table" (id)
2219
+ REFERENCES metaschema_public.table (id)
2211
2220
  ON DELETE CASCADE,
2212
2221
  CONSTRAINT plan_limits_table_fkey
2213
2222
  FOREIGN KEY(plan_limits_table_id)
2214
- REFERENCES metaschema_public."table" (id)
2223
+ REFERENCES metaschema_public.table (id)
2215
2224
  ON DELETE CASCADE,
2216
2225
  CONSTRAINT plan_pricing_table_fkey
2217
2226
  FOREIGN KEY(plan_pricing_table_id)
2218
- REFERENCES metaschema_public."table" (id)
2227
+ REFERENCES metaschema_public.table (id)
2219
2228
  ON DELETE CASCADE,
2220
2229
  CONSTRAINT plan_overrides_table_fkey
2221
2230
  FOREIGN KEY(plan_overrides_table_id)
2222
- REFERENCES metaschema_public."table" (id)
2231
+ REFERENCES metaschema_public.table (id)
2223
2232
  ON DELETE CASCADE,
2224
2233
  CONSTRAINT plan_meter_limits_table_fkey
2225
2234
  FOREIGN KEY(plan_meter_limits_table_id)
2226
- REFERENCES metaschema_public."table" (id)
2235
+ REFERENCES metaschema_public.table (id)
2227
2236
  ON DELETE CASCADE,
2228
2237
  CONSTRAINT plan_caps_table_fkey
2229
2238
  FOREIGN KEY(plan_caps_table_id)
2230
- REFERENCES metaschema_public."table" (id)
2239
+ REFERENCES metaschema_public.table (id)
2231
2240
  ON DELETE CASCADE,
2232
2241
  CONSTRAINT plans_module_database_id_unique
2233
2242
  UNIQUE (database_id)
@@ -2273,31 +2282,31 @@ CREATE TABLE metaschema_modules_public.billing_module (
2273
2282
  ON DELETE CASCADE,
2274
2283
  CONSTRAINT meters_table_fkey
2275
2284
  FOREIGN KEY(meters_table_id)
2276
- REFERENCES metaschema_public."table" (id)
2285
+ REFERENCES metaschema_public.table (id)
2277
2286
  ON DELETE CASCADE,
2278
2287
  CONSTRAINT plan_subscriptions_table_fkey
2279
2288
  FOREIGN KEY(plan_subscriptions_table_id)
2280
- REFERENCES metaschema_public."table" (id)
2289
+ REFERENCES metaschema_public.table (id)
2281
2290
  ON DELETE CASCADE,
2282
2291
  CONSTRAINT ledger_table_fkey
2283
2292
  FOREIGN KEY(ledger_table_id)
2284
- REFERENCES metaschema_public."table" (id)
2293
+ REFERENCES metaschema_public.table (id)
2285
2294
  ON DELETE CASCADE,
2286
2295
  CONSTRAINT balances_table_fkey
2287
2296
  FOREIGN KEY(balances_table_id)
2288
- REFERENCES metaschema_public."table" (id)
2297
+ REFERENCES metaschema_public.table (id)
2289
2298
  ON DELETE CASCADE,
2290
2299
  CONSTRAINT meter_credits_table_fkey
2291
2300
  FOREIGN KEY(meter_credits_table_id)
2292
- REFERENCES metaschema_public."table" (id)
2301
+ REFERENCES metaschema_public.table (id)
2293
2302
  ON DELETE CASCADE,
2294
2303
  CONSTRAINT meter_sources_table_fkey
2295
2304
  FOREIGN KEY(meter_sources_table_id)
2296
- REFERENCES metaschema_public."table" (id)
2305
+ REFERENCES metaschema_public.table (id)
2297
2306
  ON DELETE CASCADE,
2298
2307
  CONSTRAINT meter_defaults_table_fkey
2299
2308
  FOREIGN KEY(meter_defaults_table_id)
2300
- REFERENCES metaschema_public."table" (id)
2309
+ REFERENCES metaschema_public.table (id)
2301
2310
  ON DELETE CASCADE,
2302
2311
  CONSTRAINT billing_module_database_id_unique
2303
2312
  UNIQUE (database_id)
@@ -2342,35 +2351,35 @@ CREATE TABLE metaschema_modules_public.billing_provider_module (
2342
2351
  ON DELETE CASCADE,
2343
2352
  CONSTRAINT billing_customers_table_fkey
2344
2353
  FOREIGN KEY(billing_customers_table_id)
2345
- REFERENCES metaschema_public."table" (id)
2354
+ REFERENCES metaschema_public.table (id)
2346
2355
  ON DELETE CASCADE,
2347
2356
  CONSTRAINT billing_products_table_fkey
2348
2357
  FOREIGN KEY(billing_products_table_id)
2349
- REFERENCES metaschema_public."table" (id)
2358
+ REFERENCES metaschema_public.table (id)
2350
2359
  ON DELETE CASCADE,
2351
2360
  CONSTRAINT billing_prices_table_fkey
2352
2361
  FOREIGN KEY(billing_prices_table_id)
2353
- REFERENCES metaschema_public."table" (id)
2362
+ REFERENCES metaschema_public.table (id)
2354
2363
  ON DELETE CASCADE,
2355
2364
  CONSTRAINT billing_subscriptions_table_fkey
2356
2365
  FOREIGN KEY(billing_subscriptions_table_id)
2357
- REFERENCES metaschema_public."table" (id)
2366
+ REFERENCES metaschema_public.table (id)
2358
2367
  ON DELETE CASCADE,
2359
2368
  CONSTRAINT billing_webhook_events_table_fkey
2360
2369
  FOREIGN KEY(billing_webhook_events_table_id)
2361
- REFERENCES metaschema_public."table" (id)
2370
+ REFERENCES metaschema_public.table (id)
2362
2371
  ON DELETE CASCADE,
2363
2372
  CONSTRAINT products_table_fkey
2364
2373
  FOREIGN KEY(products_table_id)
2365
- REFERENCES metaschema_public."table" (id)
2374
+ REFERENCES metaschema_public.table (id)
2366
2375
  ON DELETE SET NULL,
2367
2376
  CONSTRAINT prices_table_fkey
2368
2377
  FOREIGN KEY(prices_table_id)
2369
- REFERENCES metaschema_public."table" (id)
2378
+ REFERENCES metaschema_public.table (id)
2370
2379
  ON DELETE SET NULL,
2371
2380
  CONSTRAINT subscriptions_table_fkey
2372
2381
  FOREIGN KEY(subscriptions_table_id)
2373
- REFERENCES metaschema_public."table" (id)
2382
+ REFERENCES metaschema_public.table (id)
2374
2383
  ON DELETE SET NULL,
2375
2384
  CONSTRAINT billing_provider_module_database_id_unique
2376
2385
  UNIQUE (database_id)
@@ -2389,7 +2398,7 @@ CREATE TABLE metaschema_modules_public.realtime_module (
2389
2398
  source_registry_table_id uuid NOT NULL DEFAULT uuid_nil(),
2390
2399
  retention_hours int NOT NULL DEFAULT 168,
2391
2400
  premake int NOT NULL DEFAULT 7,
2392
- interval text NOT NULL DEFAULT '1 day',
2401
+ "interval" text NOT NULL DEFAULT '1 day',
2393
2402
  notify_channel text NULL,
2394
2403
  api_name text DEFAULT 'realtime',
2395
2404
  private_api_name text DEFAULT NULL,
@@ -2411,15 +2420,15 @@ CREATE TABLE metaschema_modules_public.realtime_module (
2411
2420
  ON DELETE CASCADE,
2412
2421
  CONSTRAINT change_log_table_fkey
2413
2422
  FOREIGN KEY(change_log_table_id)
2414
- REFERENCES metaschema_public."table" (id)
2423
+ REFERENCES metaschema_public.table (id)
2415
2424
  ON DELETE CASCADE,
2416
2425
  CONSTRAINT listener_node_table_fkey
2417
2426
  FOREIGN KEY(listener_node_table_id)
2418
- REFERENCES metaschema_public."table" (id)
2427
+ REFERENCES metaschema_public.table (id)
2419
2428
  ON DELETE CASCADE,
2420
2429
  CONSTRAINT source_registry_table_fkey
2421
2430
  FOREIGN KEY(source_registry_table_id)
2422
- REFERENCES metaschema_public."table" (id)
2431
+ REFERENCES metaschema_public.table (id)
2423
2432
  ON DELETE CASCADE
2424
2433
  );
2425
2434
 
@@ -2469,15 +2478,15 @@ CREATE TABLE metaschema_modules_public.rate_limit_meters_module (
2469
2478
  ON DELETE CASCADE,
2470
2479
  CONSTRAINT rate_limit_state_table_fkey
2471
2480
  FOREIGN KEY(rate_limit_state_table_id)
2472
- REFERENCES metaschema_public."table" (id)
2481
+ REFERENCES metaschema_public.table (id)
2473
2482
  ON DELETE CASCADE,
2474
2483
  CONSTRAINT rate_limit_overrides_table_fkey
2475
2484
  FOREIGN KEY(rate_limit_overrides_table_id)
2476
- REFERENCES metaschema_public."table" (id)
2485
+ REFERENCES metaschema_public.table (id)
2477
2486
  ON DELETE CASCADE,
2478
2487
  CONSTRAINT rate_window_limits_table_fkey
2479
2488
  FOREIGN KEY(rate_window_limits_table_id)
2480
- REFERENCES metaschema_public."table" (id)
2489
+ REFERENCES metaschema_public.table (id)
2481
2490
  ON DELETE CASCADE,
2482
2491
  CONSTRAINT rate_limit_meters_module_database_id_unique
2483
2492
  UNIQUE (database_id)
@@ -2509,7 +2518,7 @@ CREATE TABLE metaschema_modules_public.config_secrets_org_module (
2509
2518
  ON DELETE CASCADE,
2510
2519
  CONSTRAINT table_fkey
2511
2520
  FOREIGN KEY(table_id)
2512
- REFERENCES metaschema_public."table" (id)
2521
+ REFERENCES metaschema_public.table (id)
2513
2522
  ON DELETE CASCADE
2514
2523
  );
2515
2524
 
@@ -2530,7 +2539,7 @@ CREATE TABLE metaschema_modules_public.inference_log_module (
2530
2539
  inference_log_table_name text NOT NULL DEFAULT '',
2531
2540
  usage_daily_table_id uuid NOT NULL DEFAULT uuid_nil(),
2532
2541
  usage_daily_table_name text NOT NULL DEFAULT '',
2533
- interval text NOT NULL DEFAULT '1 month',
2542
+ "interval" text NOT NULL DEFAULT '1 month',
2534
2543
  retention text NOT NULL DEFAULT '12 months',
2535
2544
  premake int NOT NULL DEFAULT 2,
2536
2545
  scope text NOT NULL DEFAULT 'app',
@@ -2553,11 +2562,11 @@ CREATE TABLE metaschema_modules_public.inference_log_module (
2553
2562
  ON DELETE CASCADE,
2554
2563
  CONSTRAINT inference_log_table_fkey
2555
2564
  FOREIGN KEY(inference_log_table_id)
2556
- REFERENCES metaschema_public."table" (id)
2565
+ REFERENCES metaschema_public.table (id)
2557
2566
  ON DELETE CASCADE,
2558
2567
  CONSTRAINT usage_daily_table_fkey
2559
2568
  FOREIGN KEY(usage_daily_table_id)
2560
- REFERENCES metaschema_public."table" (id)
2569
+ REFERENCES metaschema_public.table (id)
2561
2570
  ON DELETE CASCADE,
2562
2571
  CONSTRAINT inference_log_module_database_id_prefix_unique
2563
2572
  UNIQUE NULLS NOT DISTINCT (database_id, prefix)
@@ -2574,7 +2583,7 @@ CREATE TABLE metaschema_modules_public.compute_log_module (
2574
2583
  compute_log_table_name text NOT NULL DEFAULT '',
2575
2584
  usage_daily_table_id uuid NOT NULL DEFAULT uuid_nil(),
2576
2585
  usage_daily_table_name text NOT NULL DEFAULT '',
2577
- interval text NOT NULL DEFAULT '1 month',
2586
+ "interval" text NOT NULL DEFAULT '1 month',
2578
2587
  retention text NOT NULL DEFAULT '12 months',
2579
2588
  premake int NOT NULL DEFAULT 2,
2580
2589
  scope text NOT NULL DEFAULT 'app',
@@ -2597,11 +2606,11 @@ CREATE TABLE metaschema_modules_public.compute_log_module (
2597
2606
  ON DELETE CASCADE,
2598
2607
  CONSTRAINT compute_log_table_fkey
2599
2608
  FOREIGN KEY(compute_log_table_id)
2600
- REFERENCES metaschema_public."table" (id)
2609
+ REFERENCES metaschema_public.table (id)
2601
2610
  ON DELETE CASCADE,
2602
2611
  CONSTRAINT usage_daily_table_fkey
2603
2612
  FOREIGN KEY(usage_daily_table_id)
2604
- REFERENCES metaschema_public."table" (id)
2613
+ REFERENCES metaschema_public.table (id)
2605
2614
  ON DELETE CASCADE,
2606
2615
  CONSTRAINT compute_log_module_database_id_prefix_unique
2607
2616
  UNIQUE NULLS NOT DISTINCT (database_id, prefix)
@@ -2618,7 +2627,7 @@ CREATE TABLE metaschema_modules_public.transfer_log_module (
2618
2627
  transfer_log_table_name text NOT NULL DEFAULT '',
2619
2628
  usage_daily_table_id uuid NOT NULL DEFAULT uuid_nil(),
2620
2629
  usage_daily_table_name text NOT NULL DEFAULT '',
2621
- interval text NOT NULL DEFAULT '1 month',
2630
+ "interval" text NOT NULL DEFAULT '1 month',
2622
2631
  retention text NOT NULL DEFAULT '12 months',
2623
2632
  premake int NOT NULL DEFAULT 2,
2624
2633
  scope text NOT NULL DEFAULT 'app',
@@ -2641,11 +2650,11 @@ CREATE TABLE metaschema_modules_public.transfer_log_module (
2641
2650
  ON DELETE CASCADE,
2642
2651
  CONSTRAINT transfer_log_table_fkey
2643
2652
  FOREIGN KEY(transfer_log_table_id)
2644
- REFERENCES metaschema_public."table" (id)
2653
+ REFERENCES metaschema_public.table (id)
2645
2654
  ON DELETE CASCADE,
2646
2655
  CONSTRAINT usage_daily_table_fkey
2647
2656
  FOREIGN KEY(usage_daily_table_id)
2648
- REFERENCES metaschema_public."table" (id)
2657
+ REFERENCES metaschema_public.table (id)
2649
2658
  ON DELETE CASCADE,
2650
2659
  CONSTRAINT transfer_log_module_database_id_prefix_unique
2651
2660
  UNIQUE NULLS NOT DISTINCT (database_id, prefix)
@@ -2662,7 +2671,7 @@ CREATE TABLE metaschema_modules_public.storage_log_module (
2662
2671
  storage_log_table_name text NOT NULL DEFAULT '',
2663
2672
  usage_daily_table_id uuid NOT NULL DEFAULT uuid_nil(),
2664
2673
  usage_daily_table_name text NOT NULL DEFAULT '',
2665
- interval text NOT NULL DEFAULT '1 month',
2674
+ "interval" text NOT NULL DEFAULT '1 month',
2666
2675
  retention text NOT NULL DEFAULT '12 months',
2667
2676
  premake int NOT NULL DEFAULT 2,
2668
2677
  scope text NOT NULL DEFAULT 'app',
@@ -2685,11 +2694,11 @@ CREATE TABLE metaschema_modules_public.storage_log_module (
2685
2694
  ON DELETE CASCADE,
2686
2695
  CONSTRAINT storage_log_table_fkey
2687
2696
  FOREIGN KEY(storage_log_table_id)
2688
- REFERENCES metaschema_public."table" (id)
2697
+ REFERENCES metaschema_public.table (id)
2689
2698
  ON DELETE CASCADE,
2690
2699
  CONSTRAINT usage_daily_table_fkey
2691
2700
  FOREIGN KEY(usage_daily_table_id)
2692
- REFERENCES metaschema_public."table" (id)
2701
+ REFERENCES metaschema_public.table (id)
2693
2702
  ON DELETE CASCADE,
2694
2703
  CONSTRAINT storage_log_module_database_id_prefix_unique
2695
2704
  UNIQUE NULLS NOT DISTINCT (database_id, prefix)
@@ -2710,7 +2719,7 @@ CREATE TABLE metaschema_modules_public.db_usage_module (
2710
2719
  query_stats_log_table_name text NOT NULL DEFAULT '',
2711
2720
  query_stats_daily_table_id uuid NOT NULL DEFAULT uuid_nil(),
2712
2721
  query_stats_daily_table_name text NOT NULL DEFAULT '',
2713
- interval text NOT NULL DEFAULT '1 month',
2722
+ "interval" text NOT NULL DEFAULT '1 month',
2714
2723
  retention text NOT NULL DEFAULT '12 months',
2715
2724
  premake int NOT NULL DEFAULT 2,
2716
2725
  scope text NOT NULL DEFAULT 'app',
@@ -2732,19 +2741,19 @@ CREATE TABLE metaschema_modules_public.db_usage_module (
2732
2741
  ON DELETE CASCADE,
2733
2742
  CONSTRAINT table_stats_log_table_fkey
2734
2743
  FOREIGN KEY(table_stats_log_table_id)
2735
- REFERENCES metaschema_public."table" (id)
2744
+ REFERENCES metaschema_public.table (id)
2736
2745
  ON DELETE CASCADE,
2737
2746
  CONSTRAINT table_stats_daily_table_fkey
2738
2747
  FOREIGN KEY(table_stats_daily_table_id)
2739
- REFERENCES metaschema_public."table" (id)
2748
+ REFERENCES metaschema_public.table (id)
2740
2749
  ON DELETE CASCADE,
2741
2750
  CONSTRAINT query_stats_log_table_fkey
2742
2751
  FOREIGN KEY(query_stats_log_table_id)
2743
- REFERENCES metaschema_public."table" (id)
2752
+ REFERENCES metaschema_public.table (id)
2744
2753
  ON DELETE CASCADE,
2745
2754
  CONSTRAINT query_stats_daily_table_fkey
2746
2755
  FOREIGN KEY(query_stats_daily_table_id)
2747
- REFERENCES metaschema_public."table" (id)
2756
+ REFERENCES metaschema_public.table (id)
2748
2757
  ON DELETE CASCADE,
2749
2758
  CONSTRAINT db_usage_module_database_id_prefix_unique
2750
2759
  UNIQUE NULLS NOT DISTINCT (database_id, prefix)
@@ -2800,39 +2809,39 @@ CREATE TABLE metaschema_modules_public.agent_module (
2800
2809
  ON DELETE CASCADE,
2801
2810
  CONSTRAINT agent_module_thread_table_fkey
2802
2811
  FOREIGN KEY(thread_table_id)
2803
- REFERENCES metaschema_public."table" (id)
2812
+ REFERENCES metaschema_public.table (id)
2804
2813
  ON DELETE CASCADE,
2805
2814
  CONSTRAINT agent_module_message_table_fkey
2806
2815
  FOREIGN KEY(message_table_id)
2807
- REFERENCES metaschema_public."table" (id)
2816
+ REFERENCES metaschema_public.table (id)
2808
2817
  ON DELETE CASCADE,
2809
2818
  CONSTRAINT agent_module_task_table_fkey
2810
2819
  FOREIGN KEY(task_table_id)
2811
- REFERENCES metaschema_public."table" (id)
2820
+ REFERENCES metaschema_public.table (id)
2812
2821
  ON DELETE CASCADE,
2813
2822
  CONSTRAINT agent_module_prompts_table_fkey
2814
2823
  FOREIGN KEY(prompts_table_id)
2815
- REFERENCES metaschema_public."table" (id)
2824
+ REFERENCES metaschema_public.table (id)
2816
2825
  ON DELETE CASCADE,
2817
2826
  CONSTRAINT agent_module_plan_table_fkey
2818
2827
  FOREIGN KEY(plan_table_id)
2819
- REFERENCES metaschema_public."table" (id)
2828
+ REFERENCES metaschema_public.table (id)
2820
2829
  ON DELETE CASCADE,
2821
2830
  CONSTRAINT agent_module_agent_table_fkey
2822
2831
  FOREIGN KEY(agent_table_id)
2823
- REFERENCES metaschema_public."table" (id)
2832
+ REFERENCES metaschema_public.table (id)
2824
2833
  ON DELETE CASCADE,
2825
2834
  CONSTRAINT agent_module_persona_table_fkey
2826
2835
  FOREIGN KEY(persona_table_id)
2827
- REFERENCES metaschema_public."table" (id)
2836
+ REFERENCES metaschema_public.table (id)
2828
2837
  ON DELETE CASCADE,
2829
2838
  CONSTRAINT agent_module_resource_table_fkey
2830
2839
  FOREIGN KEY(resource_table_id)
2831
- REFERENCES metaschema_public."table" (id)
2840
+ REFERENCES metaschema_public.table (id)
2832
2841
  ON DELETE CASCADE,
2833
2842
  CONSTRAINT agent_module_entity_table_fkey
2834
2843
  FOREIGN KEY(entity_table_id)
2835
- REFERENCES metaschema_public."table" (id)
2844
+ REFERENCES metaschema_public.table (id)
2836
2845
  ON DELETE CASCADE
2837
2846
  );
2838
2847
 
@@ -2855,6 +2864,7 @@ CREATE TABLE metaschema_modules_public.merkle_store_module (
2855
2864
  api_name text,
2856
2865
  private_api_name text,
2857
2866
  scope text NOT NULL DEFAULT 'app',
2867
+ function_prefix text DEFAULT NULL,
2858
2868
  created_at timestamptz NOT NULL DEFAULT now(),
2859
2869
  CONSTRAINT db_fkey
2860
2870
  FOREIGN KEY(database_id)
@@ -2870,19 +2880,19 @@ CREATE TABLE metaschema_modules_public.merkle_store_module (
2870
2880
  ON DELETE CASCADE,
2871
2881
  CONSTRAINT object_table_fkey
2872
2882
  FOREIGN KEY(object_table_id)
2873
- REFERENCES metaschema_public."table" (id)
2883
+ REFERENCES metaschema_public.table (id)
2874
2884
  ON DELETE CASCADE,
2875
2885
  CONSTRAINT store_table_fkey
2876
2886
  FOREIGN KEY(store_table_id)
2877
- REFERENCES metaschema_public."table" (id)
2887
+ REFERENCES metaschema_public.table (id)
2878
2888
  ON DELETE CASCADE,
2879
2889
  CONSTRAINT commit_table_fkey
2880
2890
  FOREIGN KEY(commit_table_id)
2881
- REFERENCES metaschema_public."table" (id)
2891
+ REFERENCES metaschema_public.table (id)
2882
2892
  ON DELETE CASCADE,
2883
2893
  CONSTRAINT ref_table_fkey
2884
2894
  FOREIGN KEY(ref_table_id)
2885
- REFERENCES metaschema_public."table" (id)
2895
+ REFERENCES metaschema_public.table (id)
2886
2896
  ON DELETE CASCADE,
2887
2897
  CONSTRAINT merkle_store_module_database_prefix_unique
2888
2898
  UNIQUE (database_id, prefix)
@@ -2930,19 +2940,19 @@ CREATE TABLE metaschema_modules_public.graph_module (
2930
2940
  ON DELETE CASCADE,
2931
2941
  CONSTRAINT graphs_table_fkey
2932
2942
  FOREIGN KEY(graphs_table_id)
2933
- REFERENCES metaschema_public."table" (id)
2943
+ REFERENCES metaschema_public.table (id)
2934
2944
  ON DELETE CASCADE,
2935
2945
  CONSTRAINT executions_table_fkey
2936
2946
  FOREIGN KEY(executions_table_id)
2937
- REFERENCES metaschema_public."table" (id)
2947
+ REFERENCES metaschema_public.table (id)
2938
2948
  ON DELETE CASCADE,
2939
2949
  CONSTRAINT outputs_table_fkey
2940
2950
  FOREIGN KEY(outputs_table_id)
2941
- REFERENCES metaschema_public."table" (id)
2951
+ REFERENCES metaschema_public.table (id)
2942
2952
  ON DELETE CASCADE,
2943
2953
  CONSTRAINT graph_module_entity_table_fkey
2944
2954
  FOREIGN KEY(entity_table_id)
2945
- REFERENCES metaschema_public."table" (id)
2955
+ REFERENCES metaschema_public.table (id)
2946
2956
  ON DELETE CASCADE,
2947
2957
  CONSTRAINT graph_module_database_merkle_unique
2948
2958
  UNIQUE (database_id, merkle_store_module_id)
@@ -2983,15 +2993,15 @@ CREATE TABLE metaschema_modules_public.namespace_module (
2983
2993
  ON DELETE CASCADE,
2984
2994
  CONSTRAINT namespace_module_namespaces_table_fkey
2985
2995
  FOREIGN KEY(namespaces_table_id)
2986
- REFERENCES metaschema_public."table" (id)
2996
+ REFERENCES metaschema_public.table (id)
2987
2997
  ON DELETE CASCADE,
2988
2998
  CONSTRAINT namespace_module_events_table_fkey
2989
2999
  FOREIGN KEY(namespace_events_table_id)
2990
- REFERENCES metaschema_public."table" (id)
3000
+ REFERENCES metaschema_public.table (id)
2991
3001
  ON DELETE CASCADE,
2992
3002
  CONSTRAINT namespace_module_entity_table_fkey
2993
3003
  FOREIGN KEY(entity_table_id)
2994
- REFERENCES metaschema_public."table" (id)
3004
+ REFERENCES metaschema_public.table (id)
2995
3005
  ON DELETE CASCADE
2996
3006
  );
2997
3007
 
@@ -3007,12 +3017,8 @@ CREATE TABLE metaschema_modules_public.function_module (
3007
3017
  public_schema_name text,
3008
3018
  private_schema_name text,
3009
3019
  definitions_table_id uuid NOT NULL DEFAULT uuid_nil(),
3010
- invocations_table_id uuid NOT NULL DEFAULT uuid_nil(),
3011
- execution_logs_table_id uuid NOT NULL DEFAULT uuid_nil(),
3012
3020
  secret_definitions_table_id uuid NOT NULL DEFAULT uuid_nil(),
3013
3021
  definitions_table_name text NOT NULL DEFAULT 'function_definitions',
3014
- invocations_table_name text NOT NULL DEFAULT 'function_invocations',
3015
- execution_logs_table_name text NOT NULL DEFAULT 'function_execution_logs',
3016
3022
  secret_definitions_table_name text NOT NULL DEFAULT 'secret_definitions',
3017
3023
  api_name text,
3018
3024
  private_api_name text,
@@ -3036,23 +3042,15 @@ CREATE TABLE metaschema_modules_public.function_module (
3036
3042
  ON DELETE CASCADE,
3037
3043
  CONSTRAINT function_module_definitions_table_fkey
3038
3044
  FOREIGN KEY(definitions_table_id)
3039
- REFERENCES metaschema_public."table" (id)
3040
- ON DELETE CASCADE,
3041
- CONSTRAINT function_module_invocations_table_fkey
3042
- FOREIGN KEY(invocations_table_id)
3043
- REFERENCES metaschema_public."table" (id)
3044
- ON DELETE CASCADE,
3045
- CONSTRAINT function_module_execution_logs_table_fkey
3046
- FOREIGN KEY(execution_logs_table_id)
3047
- REFERENCES metaschema_public."table" (id)
3045
+ REFERENCES metaschema_public.table (id)
3048
3046
  ON DELETE CASCADE,
3049
3047
  CONSTRAINT function_module_secret_defs_table_fkey
3050
3048
  FOREIGN KEY(secret_definitions_table_id)
3051
- REFERENCES metaschema_public."table" (id)
3049
+ REFERENCES metaschema_public.table (id)
3052
3050
  ON DELETE CASCADE,
3053
3051
  CONSTRAINT function_module_entity_table_fkey
3054
3052
  FOREIGN KEY(entity_table_id)
3055
- REFERENCES metaschema_public."table" (id)
3053
+ REFERENCES metaschema_public.table (id)
3056
3054
  ON DELETE CASCADE
3057
3055
  );
3058
3056
 
@@ -3060,6 +3058,55 @@ CREATE INDEX function_module_database_id_idx ON metaschema_modules_public.functi
3060
3058
 
3061
3059
  CREATE UNIQUE INDEX function_module_unique_scope ON metaschema_modules_public.function_module (database_id, scope, prefix);
3062
3060
 
3061
+ CREATE TABLE metaschema_modules_public.function_invocation_module (
3062
+ id uuid PRIMARY KEY DEFAULT uuidv7(),
3063
+ database_id uuid NOT NULL,
3064
+ schema_id uuid NOT NULL DEFAULT uuid_nil(),
3065
+ private_schema_id uuid NOT NULL DEFAULT uuid_nil(),
3066
+ public_schema_name text,
3067
+ private_schema_name text,
3068
+ invocations_table_id uuid NOT NULL DEFAULT uuid_nil(),
3069
+ execution_logs_table_id uuid NOT NULL DEFAULT uuid_nil(),
3070
+ invocations_table_name text NOT NULL DEFAULT 'function_invocations',
3071
+ execution_logs_table_name text NOT NULL DEFAULT 'function_execution_logs',
3072
+ api_name text,
3073
+ private_api_name text,
3074
+ scope text NOT NULL DEFAULT 'app',
3075
+ prefix text NOT NULL DEFAULT '',
3076
+ entity_table_id uuid NULL,
3077
+ policies jsonb NULL,
3078
+ provisions jsonb NULL,
3079
+ default_permissions text[] DEFAULT NULL,
3080
+ CONSTRAINT function_invocation_module_db_fkey
3081
+ FOREIGN KEY(database_id)
3082
+ REFERENCES metaschema_public.database (id)
3083
+ ON DELETE CASCADE,
3084
+ CONSTRAINT function_invocation_module_schema_fkey
3085
+ FOREIGN KEY(schema_id)
3086
+ REFERENCES metaschema_public.schema (id)
3087
+ ON DELETE CASCADE,
3088
+ CONSTRAINT function_invocation_module_private_schema_fkey
3089
+ FOREIGN KEY(private_schema_id)
3090
+ REFERENCES metaschema_public.schema (id)
3091
+ ON DELETE CASCADE,
3092
+ CONSTRAINT function_invocation_module_invocations_table_fkey
3093
+ FOREIGN KEY(invocations_table_id)
3094
+ REFERENCES metaschema_public.table (id)
3095
+ ON DELETE CASCADE,
3096
+ CONSTRAINT function_invocation_module_logs_table_fkey
3097
+ FOREIGN KEY(execution_logs_table_id)
3098
+ REFERENCES metaschema_public.table (id)
3099
+ ON DELETE CASCADE,
3100
+ CONSTRAINT function_invocation_module_entity_table_fkey
3101
+ FOREIGN KEY(entity_table_id)
3102
+ REFERENCES metaschema_public.table (id)
3103
+ ON DELETE CASCADE
3104
+ );
3105
+
3106
+ CREATE INDEX function_invocation_module_database_id_idx ON metaschema_modules_public.function_invocation_module (database_id);
3107
+
3108
+ CREATE UNIQUE INDEX function_invocation_module_unique_scope ON metaschema_modules_public.function_invocation_module (database_id, scope, prefix);
3109
+
3063
3110
  CREATE TABLE metaschema_modules_public.config_secrets_module (
3064
3111
  id uuid PRIMARY KEY DEFAULT uuidv7(),
3065
3112
  database_id uuid NOT NULL,
@@ -3090,15 +3137,15 @@ CREATE TABLE metaschema_modules_public.config_secrets_module (
3090
3137
  ON DELETE CASCADE,
3091
3138
  CONSTRAINT config_secrets_module_table_fkey
3092
3139
  FOREIGN KEY(table_id)
3093
- REFERENCES metaschema_public."table" (id)
3140
+ REFERENCES metaschema_public.table (id)
3094
3141
  ON DELETE CASCADE,
3095
3142
  CONSTRAINT config_secrets_module_config_defs_table_fkey
3096
3143
  FOREIGN KEY(config_definitions_table_id)
3097
- REFERENCES metaschema_public."table" (id)
3144
+ REFERENCES metaschema_public.table (id)
3098
3145
  ON DELETE CASCADE,
3099
3146
  CONSTRAINT config_secrets_module_entity_table_fkey
3100
3147
  FOREIGN KEY(entity_table_id)
3101
- REFERENCES metaschema_public."table" (id)
3148
+ REFERENCES metaschema_public.table (id)
3102
3149
  ON DELETE CASCADE
3103
3150
  );
3104
3151
 
@@ -3132,7 +3179,7 @@ CREATE TABLE metaschema_modules_public.user_credentials_module (
3132
3179
  ON DELETE CASCADE,
3133
3180
  CONSTRAINT user_credentials_module_table_fkey
3134
3181
  FOREIGN KEY(table_id)
3135
- REFERENCES metaschema_public."table" (id)
3182
+ REFERENCES metaschema_public.table (id)
3136
3183
  ON DELETE CASCADE
3137
3184
  );
3138
3185
 
@@ -3166,11 +3213,11 @@ CREATE TABLE metaschema_modules_public.user_settings_module (
3166
3213
  ON DELETE CASCADE,
3167
3214
  CONSTRAINT table_fkey
3168
3215
  FOREIGN KEY(table_id)
3169
- REFERENCES metaschema_public."table" (id)
3216
+ REFERENCES metaschema_public.table (id)
3170
3217
  ON DELETE CASCADE,
3171
3218
  CONSTRAINT owner_table_fkey
3172
3219
  FOREIGN KEY(owner_table_id)
3173
- REFERENCES metaschema_public."table" (id)
3220
+ REFERENCES metaschema_public.table (id)
3174
3221
  ON DELETE CASCADE
3175
3222
  );
3176
3223
 
@@ -3200,7 +3247,7 @@ CREATE TABLE metaschema_modules_public.i18n_module (
3200
3247
  ON DELETE CASCADE,
3201
3248
  CONSTRAINT settings_table_fkey
3202
3249
  FOREIGN KEY(settings_table_id)
3203
- REFERENCES metaschema_public."table" (id)
3250
+ REFERENCES metaschema_public.table (id)
3204
3251
  ON DELETE CASCADE
3205
3252
  );
3206
3253