@pgpm/metaschema-modules 0.16.6 → 0.16.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/deploy/schemas/metaschema_modules_public/tables/crypto_auth_module/table.sql +9 -3
- package/deploy/schemas/metaschema_modules_public/tables/sessions_module/table.sql +45 -0
- package/deploy/schemas/metaschema_modules_public/tables/user_auth_module/table.sql +13 -3
- package/package.json +2 -2
- package/pgpm.plan +3 -3
- package/revert/schemas/metaschema_modules_public/tables/sessions_module/table.sql +7 -0
- package/verify/schemas/metaschema_modules_public/tables/sessions_module/table.sql +7 -0
- package/deploy/schemas/metaschema_modules_public/tables/tokens_module/table.sql +0 -35
- package/revert/schemas/metaschema_modules_public/tables/tokens_module/table.sql +0 -7
- package/verify/schemas/metaschema_modules_public/tables/tokens_module/table.sql +0 -7
|
@@ -11,8 +11,10 @@ CREATE TABLE metaschema_modules_public.crypto_auth_module (
|
|
|
11
11
|
schema_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
12
12
|
|
|
13
13
|
users_table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
14
|
-
tokens_table_id
|
|
14
|
+
-- TOKENS_REMOVAL: tokens_table_id removed - crypto auth now uses sessions_module
|
|
15
15
|
secrets_table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
16
|
+
sessions_table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
17
|
+
session_credentials_table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
16
18
|
addresses_table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
17
19
|
|
|
18
20
|
user_field text NOT NULL,
|
|
@@ -27,14 +29,18 @@ CREATE TABLE metaschema_modules_public.crypto_auth_module (
|
|
|
27
29
|
CONSTRAINT db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE,
|
|
28
30
|
CONSTRAINT secrets_table_fkey FOREIGN KEY (secrets_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE,
|
|
29
31
|
CONSTRAINT users_table_fkey FOREIGN KEY (users_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE,
|
|
30
|
-
|
|
32
|
+
-- TOKENS_REMOVAL: tokens_table_fkey removed - crypto auth now uses sessions_module
|
|
33
|
+
CONSTRAINT sessions_table_fkey FOREIGN KEY (sessions_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE,
|
|
34
|
+
CONSTRAINT session_credentials_table_fkey FOREIGN KEY (session_credentials_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE,
|
|
31
35
|
CONSTRAINT schema_fkey FOREIGN KEY (schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE
|
|
32
36
|
);
|
|
33
37
|
|
|
34
38
|
COMMENT ON CONSTRAINT db_fkey ON metaschema_modules_public.crypto_auth_module IS E'@omit manyToMany';
|
|
35
39
|
COMMENT ON CONSTRAINT secrets_table_fkey ON metaschema_modules_public.crypto_auth_module IS E'@omit manyToMany';
|
|
36
40
|
COMMENT ON CONSTRAINT users_table_fkey ON metaschema_modules_public.crypto_auth_module IS E'@omit manyToMany';
|
|
37
|
-
|
|
41
|
+
-- TOKENS_REMOVAL: tokens_table_fkey comment removed
|
|
42
|
+
COMMENT ON CONSTRAINT sessions_table_fkey ON metaschema_modules_public.crypto_auth_module IS E'@omit manyToMany';
|
|
43
|
+
COMMENT ON CONSTRAINT session_credentials_table_fkey ON metaschema_modules_public.crypto_auth_module IS E'@omit manyToMany';
|
|
38
44
|
COMMENT ON CONSTRAINT schema_fkey ON metaschema_modules_public.crypto_auth_module IS E'@omit manyToMany';
|
|
39
45
|
CREATE INDEX crypto_auth_module_database_id_idx ON metaschema_modules_public.crypto_auth_module ( database_id );
|
|
40
46
|
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
-- Deploy schemas/metaschema_modules_public/tables/sessions_module/table to pg
|
|
2
|
+
|
|
3
|
+
-- requires: schemas/metaschema_modules_public/schema
|
|
4
|
+
|
|
5
|
+
BEGIN;
|
|
6
|
+
|
|
7
|
+
CREATE TABLE metaschema_modules_public.sessions_module (
|
|
8
|
+
id uuid PRIMARY KEY DEFAULT uuid_generate_v4 (),
|
|
9
|
+
database_id uuid NOT NULL,
|
|
10
|
+
|
|
11
|
+
--
|
|
12
|
+
schema_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
13
|
+
sessions_table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
14
|
+
session_credentials_table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
15
|
+
auth_settings_table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
16
|
+
users_table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
17
|
+
|
|
18
|
+
sessions_default_expiration interval NOT NULL DEFAULT '30 days'::interval,
|
|
19
|
+
sessions_table text NOT NULL DEFAULT 'sessions',
|
|
20
|
+
session_credentials_table text NOT NULL DEFAULT 'session_credentials',
|
|
21
|
+
auth_settings_table text NOT NULL DEFAULT 'app_auth_settings',
|
|
22
|
+
--
|
|
23
|
+
|
|
24
|
+
CONSTRAINT db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE,
|
|
25
|
+
CONSTRAINT schema_fkey FOREIGN KEY (schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE,
|
|
26
|
+
CONSTRAINT sessions_table_fkey FOREIGN KEY (sessions_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE,
|
|
27
|
+
CONSTRAINT session_credentials_table_fkey FOREIGN KEY (session_credentials_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE,
|
|
28
|
+
CONSTRAINT auth_settings_table_fkey FOREIGN KEY (auth_settings_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE,
|
|
29
|
+
CONSTRAINT users_table_fkey FOREIGN KEY (users_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE
|
|
30
|
+
);
|
|
31
|
+
|
|
32
|
+
COMMENT ON CONSTRAINT schema_fkey ON metaschema_modules_public.sessions_module IS E'@omit manyToMany';
|
|
33
|
+
COMMENT ON CONSTRAINT db_fkey ON metaschema_modules_public.sessions_module IS E'@omit manyToMany';
|
|
34
|
+
CREATE INDEX sessions_module_database_id_idx ON metaschema_modules_public.sessions_module ( database_id );
|
|
35
|
+
|
|
36
|
+
COMMENT ON CONSTRAINT sessions_table_fkey
|
|
37
|
+
ON metaschema_modules_public.sessions_module IS E'@fieldName sessionsTableBySessionsTableId\n@omit manyToMany';
|
|
38
|
+
COMMENT ON CONSTRAINT session_credentials_table_fkey
|
|
39
|
+
ON metaschema_modules_public.sessions_module IS E'@fieldName sessionCredentialsTableBySessionCredentialsTableId\n@omit manyToMany';
|
|
40
|
+
COMMENT ON CONSTRAINT auth_settings_table_fkey
|
|
41
|
+
ON metaschema_modules_public.sessions_module IS E'@fieldName authSettingsTableByAuthSettingsTableId\n@omit manyToMany';
|
|
42
|
+
COMMENT ON CONSTRAINT users_table_fkey
|
|
43
|
+
ON metaschema_modules_public.sessions_module IS E'@omit manyToMany';
|
|
44
|
+
|
|
45
|
+
COMMIT;
|
|
@@ -13,7 +13,10 @@ CREATE TABLE metaschema_modules_public.user_auth_module (
|
|
|
13
13
|
users_table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
14
14
|
secrets_table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
15
15
|
encrypted_table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
16
|
-
tokens_table_id
|
|
16
|
+
-- TOKENS_REMOVAL: tokens_table_id removed - all auth now uses sessions_module
|
|
17
|
+
-- SESSION_MIGRATION: sessions and session_credentials for session-centric auth
|
|
18
|
+
sessions_table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
19
|
+
session_credentials_table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
17
20
|
|
|
18
21
|
audits_table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
19
22
|
audits_table_name text NOT NULL DEFAULT 'audit_logs',
|
|
@@ -47,7 +50,10 @@ CREATE TABLE metaschema_modules_public.user_auth_module (
|
|
|
47
50
|
CONSTRAINT users_table_fkey FOREIGN KEY (users_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE,
|
|
48
51
|
CONSTRAINT secrets_table_fkey FOREIGN KEY (secrets_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE,
|
|
49
52
|
CONSTRAINT encrypted_table_fkey FOREIGN KEY (encrypted_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE,
|
|
50
|
-
|
|
53
|
+
-- TOKENS_REMOVAL: tokens_table_fkey removed - all auth now uses sessions_module
|
|
54
|
+
-- SESSION_MIGRATION: foreign keys for sessions and session_credentials
|
|
55
|
+
CONSTRAINT sessions_table_fkey FOREIGN KEY (sessions_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE,
|
|
56
|
+
CONSTRAINT session_credentials_table_fkey FOREIGN KEY (session_credentials_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE
|
|
51
57
|
);
|
|
52
58
|
|
|
53
59
|
COMMENT ON CONSTRAINT schema_fkey ON metaschema_modules_public.user_auth_module IS E'@omit manyToMany';
|
|
@@ -62,7 +68,11 @@ COMMENT ON CONSTRAINT secrets_table_fkey
|
|
|
62
68
|
ON metaschema_modules_public.user_auth_module IS E'@omit';
|
|
63
69
|
COMMENT ON CONSTRAINT encrypted_table_fkey
|
|
64
70
|
ON metaschema_modules_public.user_auth_module IS E'@omit';
|
|
65
|
-
|
|
71
|
+
-- TOKENS_REMOVAL: tokens_table_fkey comment removed
|
|
72
|
+
-- SESSION_MIGRATION: omit comments for sessions and session_credentials foreign keys
|
|
73
|
+
COMMENT ON CONSTRAINT sessions_table_fkey
|
|
74
|
+
ON metaschema_modules_public.user_auth_module IS E'@omit';
|
|
75
|
+
COMMENT ON CONSTRAINT session_credentials_table_fkey
|
|
66
76
|
ON metaschema_modules_public.user_auth_module IS E'@omit';
|
|
67
77
|
|
|
68
78
|
COMMIT;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pgpm/metaschema-modules",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.7",
|
|
4
4
|
"description": "Module metadata handling and dependency tracking",
|
|
5
5
|
"author": "Dan Lynch <pyramation@gmail.com>",
|
|
6
6
|
"contributors": [
|
|
@@ -36,5 +36,5 @@
|
|
|
36
36
|
"bugs": {
|
|
37
37
|
"url": "https://github.com/constructive-io/pgpm-modules/issues"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "3ada2add98b93ba6b6991d3ed791d8c9ea1b3297"
|
|
40
40
|
}
|
package/pgpm.plan
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
%syntax-version=1.0.0
|
|
2
2
|
%project=metaschema-modules
|
|
3
3
|
%uri=metaschema-modules
|
|
4
|
-
|
|
4
|
+
|
|
5
5
|
schemas/services_private/schema [services:schemas/services_public/tables/site_themes/table] 2017-08-11T08:11:51Z skitch <skitch@5b0c196eeb62> # add schemas/services_private/schema
|
|
6
6
|
schemas/services_public/schema 2017-08-11T08:11:51Z skitch <skitch@5b0c196eeb62> # add schemas/services_public/schema
|
|
7
7
|
schemas/metaschema_modules_public/schema 2026-01-04T08:28:00Z devin <devin@cognition.ai> # add schemas/metaschema_modules_public/schema
|
|
@@ -14,6 +14,7 @@ schemas/metaschema_modules_public/tables/denormalized_table_field/table [schemas
|
|
|
14
14
|
schemas/metaschema_modules_public/tables/emails_module/table [schemas/metaschema_modules_public/schema] 2017-08-11T08:11:51Z skitch <skitch@5b0c196eeb62> # add schemas/metaschema_modules_public/tables/emails_module/table
|
|
15
15
|
schemas/metaschema_modules_public/tables/encrypted_secrets_module/table [schemas/metaschema_modules_public/schema] 2017-08-11T08:11:51Z skitch <skitch@5b0c196eeb62> # add schemas/metaschema_modules_public/tables/encrypted_secrets_module/table
|
|
16
16
|
schemas/metaschema_modules_public/tables/field_module/table [schemas/metaschema_modules_public/schema] 2017-08-11T08:11:51Z skitch <skitch@5b0c196eeb62> # add schemas/metaschema_modules_public/tables/field_module/table
|
|
17
|
+
schemas/metaschema_modules_public/tables/table_module/table [schemas/metaschema_modules_public/schema] 2026-01-12T00:00:00Z devin <devin@cognition.ai> # add schemas/metaschema_modules_public/tables/table_module/table
|
|
17
18
|
schemas/metaschema_modules_public/tables/invites_module/table [schemas/metaschema_modules_public/schema] 2017-08-11T08:11:51Z skitch <skitch@5b0c196eeb62> # add schemas/metaschema_modules_public/tables/invites_module/table
|
|
18
19
|
schemas/metaschema_modules_public/tables/levels_module/table [schemas/metaschema_modules_public/schema] 2017-08-11T08:11:51Z skitch <skitch@5b0c196eeb62> # add schemas/metaschema_modules_public/tables/levels_module/table
|
|
19
20
|
schemas/metaschema_modules_public/tables/limits_module/table [schemas/metaschema_modules_public/schema] 2017-08-11T08:11:51Z skitch <skitch@5b0c196eeb62> # add schemas/metaschema_modules_public/tables/limits_module/table
|
|
@@ -25,10 +26,9 @@ schemas/metaschema_modules_public/tables/profiles_module/table [schemas/metasche
|
|
|
25
26
|
schemas/metaschema_modules_public/tables/rls_module/table [schemas/metaschema_modules_public/schema schemas/services_public/tables/apis/table] 2017-08-11T08:11:51Z skitch <skitch@5b0c196eeb62> # add schemas/metaschema_modules_public/tables/rls_module/table
|
|
26
27
|
schemas/metaschema_modules_public/tables/secrets_module/table [schemas/metaschema_modules_public/schema] 2017-08-11T08:11:51Z skitch <skitch@5b0c196eeb62> # add schemas/metaschema_modules_public/tables/secrets_module/table
|
|
27
28
|
schemas/services_public/tables/sites/table [schemas/services_public/schema] 2017-08-11T08:11:51Z skitch <skitch@5b0c196eeb62> # add schemas/services_public/tables/sites/table
|
|
28
|
-
schemas/metaschema_modules_public/tables/
|
|
29
|
+
schemas/metaschema_modules_public/tables/sessions_module/table [schemas/metaschema_modules_public/schema] 2026-01-24T00:00:00Z devin <devin@cognition.ai> # add schemas/metaschema_modules_public/tables/sessions_module/table
|
|
29
30
|
schemas/metaschema_modules_public/tables/user_auth_module/table [schemas/metaschema_modules_public/schema] 2017-08-11T08:11:51Z skitch <skitch@5b0c196eeb62> # add schemas/metaschema_modules_public/tables/user_auth_module/table
|
|
30
31
|
schemas/metaschema_modules_public/tables/users_module/table [schemas/metaschema_modules_public/schema] 2017-08-11T08:11:51Z skitch <skitch@5b0c196eeb62> # add schemas/metaschema_modules_public/tables/users_module/table
|
|
31
32
|
schemas/metaschema_modules_public/tables/uuid_module/table [schemas/metaschema_modules_public/schema] 2017-08-11T08:11:51Z skitch <skitch@5b0c196eeb62> # add schemas/metaschema_modules_public/tables/uuid_module/table
|
|
32
33
|
schemas/metaschema_modules_public/tables/hierarchy_module/table [schemas/metaschema_modules_public/schema] 2024-12-28T00:00:00Z skitch <skitch@5b0c196eeb62> # add schemas/metaschema_modules_public/tables/hierarchy_module/table
|
|
33
|
-
schemas/metaschema_modules_public/tables/table_module/table [schemas/metaschema_modules_public/schema] 2026-01-14T00:00:00Z devin <devin@cognition.ai> # add schemas/metaschema_modules_public/tables/table_module/table
|
|
34
34
|
schemas/metaschema_modules_public/tables/table_template_module/table [schemas/metaschema_modules_public/schema] 2026-01-14T00:00:00Z devin <devin@cognition.ai> # add schemas/metaschema_modules_public/tables/table_template_module/table
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
-- Deploy schemas/metaschema_modules_public/tables/tokens_module/table to pg
|
|
2
|
-
|
|
3
|
-
-- requires: schemas/metaschema_modules_public/schema
|
|
4
|
-
|
|
5
|
-
BEGIN;
|
|
6
|
-
|
|
7
|
-
CREATE TABLE metaschema_modules_public.tokens_module (
|
|
8
|
-
id uuid PRIMARY KEY DEFAULT uuid_generate_v4 (),
|
|
9
|
-
database_id uuid NOT NULL,
|
|
10
|
-
|
|
11
|
-
--
|
|
12
|
-
schema_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
13
|
-
table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
14
|
-
owned_table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
15
|
-
|
|
16
|
-
tokens_default_expiration interval NOT NULL DEFAULT '3 days'::interval,
|
|
17
|
-
tokens_table text NOT NULL DEFAULT 'api_tokens',
|
|
18
|
-
--
|
|
19
|
-
|
|
20
|
-
CONSTRAINT db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE,
|
|
21
|
-
CONSTRAINT schema_fkey FOREIGN KEY (schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE,
|
|
22
|
-
CONSTRAINT table_fkey FOREIGN KEY (table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE,
|
|
23
|
-
CONSTRAINT owned_table_fkey FOREIGN KEY (owned_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE
|
|
24
|
-
);
|
|
25
|
-
|
|
26
|
-
COMMENT ON CONSTRAINT schema_fkey ON metaschema_modules_public.tokens_module IS E'@omit manyToMany';
|
|
27
|
-
COMMENT ON CONSTRAINT db_fkey ON metaschema_modules_public.tokens_module IS E'@omit manyToMany';
|
|
28
|
-
CREATE INDEX tokens_module_database_id_idx ON metaschema_modules_public.tokens_module ( database_id );
|
|
29
|
-
|
|
30
|
-
COMMENT ON CONSTRAINT owned_table_fkey
|
|
31
|
-
ON metaschema_modules_public.tokens_module IS E'@omit manyToMany';
|
|
32
|
-
COMMENT ON CONSTRAINT table_fkey
|
|
33
|
-
ON metaschema_modules_public.tokens_module IS E'@omit manyToMany';
|
|
34
|
-
|
|
35
|
-
COMMIT;
|