@pgpm/metaschema-modules 0.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. package/LICENSE +22 -0
  2. package/Makefile +6 -0
  3. package/README.md +240 -0
  4. package/deploy/schemas/metaschema_modules_public/schema.sql +16 -0
  5. package/deploy/schemas/metaschema_modules_public/tables/connected_accounts_module/table.sql +34 -0
  6. package/deploy/schemas/metaschema_modules_public/tables/crypto_addresses_module/table.sql +35 -0
  7. package/deploy/schemas/metaschema_modules_public/tables/crypto_auth_module/table.sql +41 -0
  8. package/deploy/schemas/metaschema_modules_public/tables/default_ids_module/table.sql +19 -0
  9. package/deploy/schemas/metaschema_modules_public/tables/denormalized_table_field/table.sql +41 -0
  10. package/deploy/schemas/metaschema_modules_public/tables/emails_module/table.sql +34 -0
  11. package/deploy/schemas/metaschema_modules_public/tables/encrypted_secrets_module/table.sql +29 -0
  12. package/deploy/schemas/metaschema_modules_public/tables/field_module/table.sql +37 -0
  13. package/deploy/schemas/metaschema_modules_public/tables/hierarchy_module/table.sql +79 -0
  14. package/deploy/schemas/metaschema_modules_public/tables/invites_module/table.sql +51 -0
  15. package/deploy/schemas/metaschema_modules_public/tables/levels_module/table.sql +71 -0
  16. package/deploy/schemas/metaschema_modules_public/tables/limits_module/table.sql +63 -0
  17. package/deploy/schemas/metaschema_modules_public/tables/membership_types_module/table.sql +30 -0
  18. package/deploy/schemas/metaschema_modules_public/tables/memberships_module/table.sql +120 -0
  19. package/deploy/schemas/metaschema_modules_public/tables/permissions_module/table.sql +65 -0
  20. package/deploy/schemas/metaschema_modules_public/tables/phone_numbers_module/table.sql +34 -0
  21. package/deploy/schemas/metaschema_modules_public/tables/profiles_module/table.sql +89 -0
  22. package/deploy/schemas/metaschema_modules_public/tables/rls_module/table.sql +46 -0
  23. package/deploy/schemas/metaschema_modules_public/tables/secrets_module/table.sql +28 -0
  24. package/deploy/schemas/metaschema_modules_public/tables/tokens_module/table.sql +35 -0
  25. package/deploy/schemas/metaschema_modules_public/tables/user_auth_module/table.sql +68 -0
  26. package/deploy/schemas/metaschema_modules_public/tables/users_module/table.sql +38 -0
  27. package/deploy/schemas/metaschema_modules_public/tables/uuid_module/table.sql +23 -0
  28. package/deploy/schemas/services_private/schema.sql +2 -0
  29. package/deploy/schemas/services_public/schema.sql +2 -0
  30. package/deploy/schemas/services_public/tables/apis/table.sql +3 -0
  31. package/deploy/schemas/services_public/tables/sites/table.sql +3 -0
  32. package/metaschema-modules.control +7 -0
  33. package/package.json +40 -0
  34. package/pgpm.plan +32 -0
  35. package/revert/schemas/metaschema_modules_public/schema.sql +7 -0
  36. package/revert/schemas/metaschema_modules_public/tables/connected_accounts_module/table.sql +7 -0
  37. package/revert/schemas/metaschema_modules_public/tables/crypto_addresses_module/table.sql +7 -0
  38. package/revert/schemas/metaschema_modules_public/tables/crypto_auth_module/table.sql +7 -0
  39. package/revert/schemas/metaschema_modules_public/tables/default_ids_module/table.sql +7 -0
  40. package/revert/schemas/metaschema_modules_public/tables/denormalized_table_field/table.sql +7 -0
  41. package/revert/schemas/metaschema_modules_public/tables/emails_module/table.sql +7 -0
  42. package/revert/schemas/metaschema_modules_public/tables/encrypted_secrets_module/table.sql +7 -0
  43. package/revert/schemas/metaschema_modules_public/tables/field_module/table.sql +7 -0
  44. package/revert/schemas/metaschema_modules_public/tables/hierarchy_module/table.sql +7 -0
  45. package/revert/schemas/metaschema_modules_public/tables/invites_module/table.sql +7 -0
  46. package/revert/schemas/metaschema_modules_public/tables/levels_module/table.sql +7 -0
  47. package/revert/schemas/metaschema_modules_public/tables/limits_module/table.sql +7 -0
  48. package/revert/schemas/metaschema_modules_public/tables/membership_types_module/table.sql +7 -0
  49. package/revert/schemas/metaschema_modules_public/tables/memberships_module/table.sql +7 -0
  50. package/revert/schemas/metaschema_modules_public/tables/permissions_module/table.sql +7 -0
  51. package/revert/schemas/metaschema_modules_public/tables/phone_numbers_module/table.sql +7 -0
  52. package/revert/schemas/metaschema_modules_public/tables/profiles_module/table.sql +7 -0
  53. package/revert/schemas/metaschema_modules_public/tables/rls_module/table.sql +7 -0
  54. package/revert/schemas/metaschema_modules_public/tables/secrets_module/table.sql +7 -0
  55. package/revert/schemas/metaschema_modules_public/tables/tokens_module/table.sql +7 -0
  56. package/revert/schemas/metaschema_modules_public/tables/user_auth_module/table.sql +7 -0
  57. package/revert/schemas/metaschema_modules_public/tables/users_module/table.sql +7 -0
  58. package/revert/schemas/metaschema_modules_public/tables/uuid_module/table.sql +7 -0
  59. package/revert/schemas/services_private/schema.sql +1 -0
  60. package/revert/schemas/services_public/schema.sql +1 -0
  61. package/revert/schemas/services_public/tables/apis/table.sql +1 -0
  62. package/revert/schemas/services_public/tables/sites/table.sql +1 -0
  63. package/sql/metaschema-modules--0.15.5.sql +1206 -0
  64. package/verify/schemas/metaschema_modules_public/schema.sql +7 -0
  65. package/verify/schemas/metaschema_modules_public/tables/connected_accounts_module/table.sql +7 -0
  66. package/verify/schemas/metaschema_modules_public/tables/crypto_addresses_module/table.sql +7 -0
  67. package/verify/schemas/metaschema_modules_public/tables/crypto_auth_module/table.sql +7 -0
  68. package/verify/schemas/metaschema_modules_public/tables/default_ids_module/table.sql +7 -0
  69. package/verify/schemas/metaschema_modules_public/tables/denormalized_table_field/table.sql +7 -0
  70. package/verify/schemas/metaschema_modules_public/tables/emails_module/table.sql +7 -0
  71. package/verify/schemas/metaschema_modules_public/tables/encrypted_secrets_module/table.sql +7 -0
  72. package/verify/schemas/metaschema_modules_public/tables/field_module/table.sql +7 -0
  73. package/verify/schemas/metaschema_modules_public/tables/hierarchy_module/table.sql +29 -0
  74. package/verify/schemas/metaschema_modules_public/tables/invites_module/table.sql +7 -0
  75. package/verify/schemas/metaschema_modules_public/tables/levels_module/table.sql +7 -0
  76. package/verify/schemas/metaschema_modules_public/tables/limits_module/table.sql +7 -0
  77. package/verify/schemas/metaschema_modules_public/tables/membership_types_module/table.sql +7 -0
  78. package/verify/schemas/metaschema_modules_public/tables/memberships_module/table.sql +7 -0
  79. package/verify/schemas/metaschema_modules_public/tables/permissions_module/table.sql +7 -0
  80. package/verify/schemas/metaschema_modules_public/tables/phone_numbers_module/table.sql +7 -0
  81. package/verify/schemas/metaschema_modules_public/tables/profiles_module/table.sql +14 -0
  82. package/verify/schemas/metaschema_modules_public/tables/rls_module/table.sql +7 -0
  83. package/verify/schemas/metaschema_modules_public/tables/secrets_module/table.sql +7 -0
  84. package/verify/schemas/metaschema_modules_public/tables/tokens_module/table.sql +7 -0
  85. package/verify/schemas/metaschema_modules_public/tables/user_auth_module/table.sql +7 -0
  86. package/verify/schemas/metaschema_modules_public/tables/users_module/table.sql +7 -0
  87. package/verify/schemas/metaschema_modules_public/tables/uuid_module/table.sql +7 -0
  88. package/verify/schemas/services_private/schema.sql +1 -0
  89. package/verify/schemas/services_public/schema.sql +1 -0
  90. package/verify/schemas/services_public/tables/apis/table.sql +1 -0
  91. package/verify/schemas/services_public/tables/sites/table.sql +1 -0
@@ -0,0 +1,7 @@
1
+ -- Verify schemas/metaschema_modules_public/schema on pg
2
+
3
+ BEGIN;
4
+
5
+ SELECT pg_catalog.has_schema_privilege('metaschema_modules_public', 'usage');
6
+
7
+ ROLLBACK;
@@ -0,0 +1,7 @@
1
+ -- Verify schemas/metaschema_modules_public/tables/connected_accounts_module/table on pg
2
+
3
+ BEGIN;
4
+
5
+ SELECT verify_table ('metaschema_modules_public.connected_accounts_module');
6
+
7
+ ROLLBACK;
@@ -0,0 +1,7 @@
1
+ -- Verify schemas/metaschema_modules_public/tables/crypto_addresses_module/table on pg
2
+
3
+ BEGIN;
4
+
5
+ SELECT verify_table ('metaschema_modules_public.crypto_addresses_module');
6
+
7
+ ROLLBACK;
@@ -0,0 +1,7 @@
1
+ -- Verify schemas/metaschema_modules_public/tables/crypto_auth_module/table on pg
2
+
3
+ BEGIN;
4
+
5
+ SELECT verify_table ('metaschema_modules_public.crypto_auth_module');
6
+
7
+ ROLLBACK;
@@ -0,0 +1,7 @@
1
+ -- Verify schemas/metaschema_modules_public/tables/default_ids_module/table on pg
2
+
3
+ BEGIN;
4
+
5
+ SELECT verify_table ('metaschema_modules_public.default_ids_module');
6
+
7
+ ROLLBACK;
@@ -0,0 +1,7 @@
1
+ -- Verify schemas/metaschema_modules_public/tables/denormalized_table_field/table on pg
2
+
3
+ BEGIN;
4
+
5
+ SELECT verify_table ('metaschema_modules_public.denormalized_table_field');
6
+
7
+ ROLLBACK;
@@ -0,0 +1,7 @@
1
+ -- Verify schemas/metaschema_modules_public/tables/emails_module/table on pg
2
+
3
+ BEGIN;
4
+
5
+ SELECT verify_table ('metaschema_modules_public.emails_module');
6
+
7
+ ROLLBACK;
@@ -0,0 +1,7 @@
1
+ -- Verify schemas/metaschema_modules_public/tables/encrypted_secrets_module/table on pg
2
+
3
+ BEGIN;
4
+
5
+ SELECT verify_table ('metaschema_modules_public.encrypted_secrets_module');
6
+
7
+ ROLLBACK;
@@ -0,0 +1,7 @@
1
+ -- Verify schemas/metaschema_modules_public/tables/field_module/table on pg
2
+
3
+ BEGIN;
4
+
5
+ SELECT verify_table ('metaschema_modules_public.field_module');
6
+
7
+ ROLLBACK;
@@ -0,0 +1,29 @@
1
+ -- Verify schemas/metaschema_modules_public/tables/hierarchy_module/table on pg
2
+
3
+ BEGIN;
4
+
5
+ SELECT
6
+ id,
7
+ database_id,
8
+ schema_id,
9
+ private_schema_id,
10
+ chart_edges_table_id,
11
+ chart_edges_table_name,
12
+ hierarchy_sprt_table_id,
13
+ hierarchy_sprt_table_name,
14
+ chart_edge_grants_table_id,
15
+ chart_edge_grants_table_name,
16
+ entity_table_id,
17
+ users_table_id,
18
+ prefix,
19
+ private_schema_name,
20
+ sprt_table_name,
21
+ rebuild_hierarchy_function,
22
+ get_subordinates_function,
23
+ get_managers_function,
24
+ is_manager_of_function,
25
+ created_at
26
+ FROM metaschema_modules_public.hierarchy_module
27
+ WHERE FALSE;
28
+
29
+ ROLLBACK;
@@ -0,0 +1,7 @@
1
+ -- Verify schemas/metaschema_modules_public/tables/invites_module/table on pg
2
+
3
+ BEGIN;
4
+
5
+ SELECT verify_table ('metaschema_modules_public.invites_module');
6
+
7
+ ROLLBACK;
@@ -0,0 +1,7 @@
1
+ -- Verify schemas/metaschema_modules_public/tables/levels_module/table on pg
2
+
3
+ BEGIN;
4
+
5
+ SELECT verify_table ('metaschema_modules_public.levels_module');
6
+
7
+ ROLLBACK;
@@ -0,0 +1,7 @@
1
+ -- Verify schemas/metaschema_modules_public/tables/limits_module/table on pg
2
+
3
+ BEGIN;
4
+
5
+ SELECT verify_table ('metaschema_modules_public.limits_module');
6
+
7
+ ROLLBACK;
@@ -0,0 +1,7 @@
1
+ -- Verify schemas/metaschema_modules_public/tables/membership_types_module/table on pg
2
+
3
+ BEGIN;
4
+
5
+ SELECT verify_table ('metaschema_modules_public.membership_types_module');
6
+
7
+ ROLLBACK;
@@ -0,0 +1,7 @@
1
+ -- Verify schemas/metaschema_modules_public/tables/memberships_module/table on pg
2
+
3
+ BEGIN;
4
+
5
+ SELECT verify_table ('metaschema_modules_public.memberships_module');
6
+
7
+ ROLLBACK;
@@ -0,0 +1,7 @@
1
+ -- Verify schemas/metaschema_modules_public/tables/permissions_module/table on pg
2
+
3
+ BEGIN;
4
+
5
+ SELECT verify_table ('metaschema_modules_public.permissions_module');
6
+
7
+ ROLLBACK;
@@ -0,0 +1,7 @@
1
+ -- Verify schemas/metaschema_modules_public/tables/phone_numbers_module/table on pg
2
+
3
+ BEGIN;
4
+
5
+ SELECT verify_table ('metaschema_modules_public.phone_numbers_module');
6
+
7
+ ROLLBACK;
@@ -0,0 +1,14 @@
1
+ -- Verify schemas/metaschema_modules_public/tables/profiles_module/table on pg
2
+
3
+ BEGIN;
4
+
5
+ SELECT id, database_id, schema_id, private_schema_id, table_id, table_name,
6
+ profile_permissions_table_id, profile_permissions_table_name,
7
+ profile_grants_table_id, profile_grants_table_name,
8
+ profile_definition_grants_table_id, profile_definition_grants_table_name,
9
+ bitlen, membership_type, entity_table_id, actor_table_id,
10
+ permissions_table_id, memberships_table_id, prefix
11
+ FROM metaschema_modules_public.profiles_module
12
+ WHERE FALSE;
13
+
14
+ ROLLBACK;
@@ -0,0 +1,7 @@
1
+ -- Verify schemas/metaschema_modules_public/tables/rls_module/table on pg
2
+
3
+ BEGIN;
4
+
5
+ SELECT verify_table ('metaschema_modules_public.rls_module');
6
+
7
+ ROLLBACK;
@@ -0,0 +1,7 @@
1
+ -- Verify schemas/metaschema_modules_public/tables/secrets_module/table on pg
2
+
3
+ BEGIN;
4
+
5
+ SELECT verify_table ('metaschema_modules_public.secrets_module');
6
+
7
+ ROLLBACK;
@@ -0,0 +1,7 @@
1
+ -- Verify schemas/metaschema_modules_public/tables/tokens_module/table on pg
2
+
3
+ BEGIN;
4
+
5
+ SELECT verify_table ('metaschema_modules_public.tokens_module');
6
+
7
+ ROLLBACK;
@@ -0,0 +1,7 @@
1
+ -- Verify schemas/metaschema_modules_public/tables/user_auth_module/table on pg
2
+
3
+ BEGIN;
4
+
5
+ SELECT verify_table ('metaschema_modules_public.user_auth_module');
6
+
7
+ ROLLBACK;
@@ -0,0 +1,7 @@
1
+ -- Verify schemas/metaschema_modules_public/tables/users_module/table on pg
2
+
3
+ BEGIN;
4
+
5
+ SELECT verify_table ('metaschema_modules_public.users_module');
6
+
7
+ ROLLBACK;
@@ -0,0 +1,7 @@
1
+ -- Verify schemas/metaschema_modules_public/tables/uuid_module/table on pg
2
+
3
+ BEGIN;
4
+
5
+ SELECT verify_table ('metaschema_modules_public.uuid_module');
6
+
7
+ ROLLBACK;
@@ -0,0 +1 @@
1
+ -- Verify schemas/services_private/schema on pg
@@ -0,0 +1 @@
1
+ -- Verify schemas/services_public/schema on pg
@@ -0,0 +1 @@
1
+ -- Verify schemas/services_public/tables/apis/table on pg
@@ -0,0 +1 @@
1
+ -- Verify schemas/services_public/tables/sites/table on pg