@pgpm/metaschema-modules 0.16.2 → 0.16.3
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/field_module/table.sql +3 -2
- package/deploy/schemas/metaschema_modules_public/tables/organization_settings_module/table.sql +34 -0
- package/deploy/schemas/metaschema_modules_public/tables/table_module/table.sql +34 -0
- package/deploy/schemas/metaschema_modules_public/tables/user_profiles_module/table.sql +34 -0
- package/deploy/schemas/metaschema_modules_public/tables/user_settings_module/table.sql +34 -0
- package/package.json +4 -4
- package/pgpm.plan +4 -0
- package/revert/schemas/metaschema_modules_public/tables/organization_settings_module/table.sql +7 -0
- package/revert/schemas/metaschema_modules_public/tables/table_module/table.sql +7 -0
- package/revert/schemas/metaschema_modules_public/tables/user_profiles_module/table.sql +7 -0
- package/revert/schemas/metaschema_modules_public/tables/user_settings_module/table.sql +7 -0
- package/verify/schemas/metaschema_modules_public/tables/organization_settings_module/table.sql +16 -0
- package/verify/schemas/metaschema_modules_public/tables/table_module/table.sql +16 -0
- package/verify/schemas/metaschema_modules_public/tables/user_profiles_module/table.sql +16 -0
- package/verify/schemas/metaschema_modules_public/tables/user_settings_module/table.sql +16 -0
|
@@ -13,8 +13,8 @@ CREATE TABLE metaschema_modules_public.field_module (
|
|
|
13
13
|
table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
14
14
|
field_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
node_type text NOT NULL,
|
|
17
|
+
|
|
18
18
|
data jsonb NOT NULL DEFAULT '{}',
|
|
19
19
|
|
|
20
20
|
triggers text[],
|
|
@@ -32,6 +32,7 @@ COMMENT ON CONSTRAINT table_fkey ON metaschema_modules_public.field_module IS E'
|
|
|
32
32
|
COMMENT ON CONSTRAINT field_fkey ON metaschema_modules_public.field_module IS E'@omit manyToMany';
|
|
33
33
|
COMMENT ON CONSTRAINT db_fkey ON metaschema_modules_public.field_module IS E'@omit manyToMany';
|
|
34
34
|
CREATE INDEX field_module_database_id_idx ON metaschema_modules_public.field_module ( database_id );
|
|
35
|
+
CREATE INDEX field_module_node_type_idx ON metaschema_modules_public.field_module ( node_type );
|
|
35
36
|
|
|
36
37
|
COMMIT;
|
|
37
38
|
|
package/deploy/schemas/metaschema_modules_public/tables/organization_settings_module/table.sql
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
-- Deploy schemas/metaschema_modules_public/tables/organization_settings_module/table to pg
|
|
2
|
+
|
|
3
|
+
-- requires: schemas/metaschema_modules_public/schema
|
|
4
|
+
|
|
5
|
+
BEGIN;
|
|
6
|
+
|
|
7
|
+
CREATE TABLE metaschema_modules_public.organization_settings_module (
|
|
8
|
+
id uuid PRIMARY KEY DEFAULT uuid_generate_v4 (),
|
|
9
|
+
database_id uuid NOT NULL,
|
|
10
|
+
|
|
11
|
+
schema_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
12
|
+
private_schema_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
13
|
+
|
|
14
|
+
table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
15
|
+
owner_table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
16
|
+
|
|
17
|
+
table_name text NOT NULL,
|
|
18
|
+
|
|
19
|
+
--
|
|
20
|
+
CONSTRAINT db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE,
|
|
21
|
+
CONSTRAINT table_fkey FOREIGN KEY (table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE,
|
|
22
|
+
CONSTRAINT owner_table_fkey FOREIGN KEY (owner_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE,
|
|
23
|
+
CONSTRAINT schema_fkey FOREIGN KEY (schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE,
|
|
24
|
+
CONSTRAINT private_schema_fkey FOREIGN KEY (private_schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE
|
|
25
|
+
);
|
|
26
|
+
|
|
27
|
+
COMMENT ON CONSTRAINT schema_fkey ON metaschema_modules_public.organization_settings_module IS E'@omit manyToMany';
|
|
28
|
+
COMMENT ON CONSTRAINT private_schema_fkey ON metaschema_modules_public.organization_settings_module IS E'@omit manyToMany';
|
|
29
|
+
COMMENT ON CONSTRAINT table_fkey ON metaschema_modules_public.organization_settings_module IS E'@omit manyToMany';
|
|
30
|
+
COMMENT ON CONSTRAINT owner_table_fkey ON metaschema_modules_public.organization_settings_module IS E'@omit manyToMany';
|
|
31
|
+
COMMENT ON CONSTRAINT db_fkey ON metaschema_modules_public.organization_settings_module IS E'@omit manyToMany';
|
|
32
|
+
CREATE INDEX organization_settings_module_database_id_idx ON metaschema_modules_public.organization_settings_module ( database_id );
|
|
33
|
+
|
|
34
|
+
COMMIT;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
-- Deploy schemas/metaschema_modules_public/tables/table_module/table to pg
|
|
2
|
+
|
|
3
|
+
-- requires: schemas/metaschema_modules_public/schema
|
|
4
|
+
|
|
5
|
+
BEGIN;
|
|
6
|
+
|
|
7
|
+
CREATE TABLE metaschema_modules_public.table_module (
|
|
8
|
+
id uuid PRIMARY KEY DEFAULT uuid_generate_v4 (),
|
|
9
|
+
database_id uuid NOT NULL,
|
|
10
|
+
|
|
11
|
+
private_schema_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
12
|
+
|
|
13
|
+
table_id uuid NOT NULL,
|
|
14
|
+
|
|
15
|
+
node_type text NOT NULL,
|
|
16
|
+
|
|
17
|
+
data jsonb NOT NULL DEFAULT '{}',
|
|
18
|
+
|
|
19
|
+
fields uuid[],
|
|
20
|
+
|
|
21
|
+
--
|
|
22
|
+
CONSTRAINT db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE,
|
|
23
|
+
CONSTRAINT table_fkey FOREIGN KEY (table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE,
|
|
24
|
+
CONSTRAINT private_schema_fkey FOREIGN KEY (private_schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE
|
|
25
|
+
);
|
|
26
|
+
|
|
27
|
+
COMMENT ON CONSTRAINT private_schema_fkey ON metaschema_modules_public.table_module IS E'@omit manyToMany';
|
|
28
|
+
COMMENT ON CONSTRAINT table_fkey ON metaschema_modules_public.table_module IS E'@omit manyToMany';
|
|
29
|
+
COMMENT ON CONSTRAINT db_fkey ON metaschema_modules_public.table_module IS E'@omit manyToMany';
|
|
30
|
+
CREATE INDEX table_module_database_id_idx ON metaschema_modules_public.table_module ( database_id );
|
|
31
|
+
CREATE INDEX table_module_table_id_idx ON metaschema_modules_public.table_module ( table_id );
|
|
32
|
+
CREATE INDEX table_module_node_type_idx ON metaschema_modules_public.table_module ( node_type );
|
|
33
|
+
|
|
34
|
+
COMMIT;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
-- Deploy schemas/metaschema_modules_public/tables/user_profiles_module/table to pg
|
|
2
|
+
|
|
3
|
+
-- requires: schemas/metaschema_modules_public/schema
|
|
4
|
+
|
|
5
|
+
BEGIN;
|
|
6
|
+
|
|
7
|
+
CREATE TABLE metaschema_modules_public.user_profiles_module (
|
|
8
|
+
id uuid PRIMARY KEY DEFAULT uuid_generate_v4 (),
|
|
9
|
+
database_id uuid NOT NULL,
|
|
10
|
+
|
|
11
|
+
schema_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
12
|
+
private_schema_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
13
|
+
|
|
14
|
+
table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
15
|
+
owner_table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
16
|
+
|
|
17
|
+
table_name text NOT NULL,
|
|
18
|
+
|
|
19
|
+
--
|
|
20
|
+
CONSTRAINT db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE,
|
|
21
|
+
CONSTRAINT table_fkey FOREIGN KEY (table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE,
|
|
22
|
+
CONSTRAINT owner_table_fkey FOREIGN KEY (owner_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE,
|
|
23
|
+
CONSTRAINT schema_fkey FOREIGN KEY (schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE,
|
|
24
|
+
CONSTRAINT private_schema_fkey FOREIGN KEY (private_schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE
|
|
25
|
+
);
|
|
26
|
+
|
|
27
|
+
COMMENT ON CONSTRAINT schema_fkey ON metaschema_modules_public.user_profiles_module IS E'@omit manyToMany';
|
|
28
|
+
COMMENT ON CONSTRAINT private_schema_fkey ON metaschema_modules_public.user_profiles_module IS E'@omit manyToMany';
|
|
29
|
+
COMMENT ON CONSTRAINT table_fkey ON metaschema_modules_public.user_profiles_module IS E'@omit manyToMany';
|
|
30
|
+
COMMENT ON CONSTRAINT owner_table_fkey ON metaschema_modules_public.user_profiles_module IS E'@omit manyToMany';
|
|
31
|
+
COMMENT ON CONSTRAINT db_fkey ON metaschema_modules_public.user_profiles_module IS E'@omit manyToMany';
|
|
32
|
+
CREATE INDEX user_profiles_module_database_id_idx ON metaschema_modules_public.user_profiles_module ( database_id );
|
|
33
|
+
|
|
34
|
+
COMMIT;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
-- Deploy schemas/metaschema_modules_public/tables/user_settings_module/table to pg
|
|
2
|
+
|
|
3
|
+
-- requires: schemas/metaschema_modules_public/schema
|
|
4
|
+
|
|
5
|
+
BEGIN;
|
|
6
|
+
|
|
7
|
+
CREATE TABLE metaschema_modules_public.user_settings_module (
|
|
8
|
+
id uuid PRIMARY KEY DEFAULT uuid_generate_v4 (),
|
|
9
|
+
database_id uuid NOT NULL,
|
|
10
|
+
|
|
11
|
+
schema_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
12
|
+
private_schema_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
13
|
+
|
|
14
|
+
table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
15
|
+
owner_table_id uuid NOT NULL DEFAULT uuid_nil(),
|
|
16
|
+
|
|
17
|
+
table_name text NOT NULL,
|
|
18
|
+
|
|
19
|
+
--
|
|
20
|
+
CONSTRAINT db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE,
|
|
21
|
+
CONSTRAINT table_fkey FOREIGN KEY (table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE,
|
|
22
|
+
CONSTRAINT owner_table_fkey FOREIGN KEY (owner_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE,
|
|
23
|
+
CONSTRAINT schema_fkey FOREIGN KEY (schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE,
|
|
24
|
+
CONSTRAINT private_schema_fkey FOREIGN KEY (private_schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE
|
|
25
|
+
);
|
|
26
|
+
|
|
27
|
+
COMMENT ON CONSTRAINT schema_fkey ON metaschema_modules_public.user_settings_module IS E'@omit manyToMany';
|
|
28
|
+
COMMENT ON CONSTRAINT private_schema_fkey ON metaschema_modules_public.user_settings_module IS E'@omit manyToMany';
|
|
29
|
+
COMMENT ON CONSTRAINT table_fkey ON metaschema_modules_public.user_settings_module IS E'@omit manyToMany';
|
|
30
|
+
COMMENT ON CONSTRAINT owner_table_fkey ON metaschema_modules_public.user_settings_module IS E'@omit manyToMany';
|
|
31
|
+
COMMENT ON CONSTRAINT db_fkey ON metaschema_modules_public.user_settings_module IS E'@omit manyToMany';
|
|
32
|
+
CREATE INDEX user_settings_module_database_id_idx ON metaschema_modules_public.user_settings_module ( database_id );
|
|
33
|
+
|
|
34
|
+
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.3",
|
|
4
4
|
"description": "Module metadata handling and dependency tracking",
|
|
5
5
|
"author": "Dan Lynch <pyramation@gmail.com>",
|
|
6
6
|
"contributors": [
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
"test:watch": "jest --watch"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@pgpm/metaschema-schema": "0.16.
|
|
25
|
-
"@pgpm/services": "0.16.
|
|
24
|
+
"@pgpm/metaschema-schema": "0.16.3",
|
|
25
|
+
"@pgpm/services": "0.16.3",
|
|
26
26
|
"@pgpm/verify": "0.16.0"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
@@ -36,5 +36,5 @@
|
|
|
36
36
|
"bugs": {
|
|
37
37
|
"url": "https://github.com/constructive-io/pgpm-modules/issues"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "def088082889aa3895d9c77504941cf72a53ec6d"
|
|
40
40
|
}
|
package/pgpm.plan
CHANGED
|
@@ -30,3 +30,7 @@ schemas/metaschema_modules_public/tables/user_auth_module/table [schemas/metasch
|
|
|
30
30
|
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
31
|
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
32
|
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
|
+
schemas/metaschema_modules_public/tables/user_profiles_module/table [schemas/metaschema_modules_public/schema] 2026-01-14T00:00:00Z devin <devin@cognition.ai> # add schemas/metaschema_modules_public/tables/user_profiles_module/table
|
|
35
|
+
schemas/metaschema_modules_public/tables/user_settings_module/table [schemas/metaschema_modules_public/schema] 2026-01-14T00:00:00Z devin <devin@cognition.ai> # add schemas/metaschema_modules_public/tables/user_settings_module/table
|
|
36
|
+
schemas/metaschema_modules_public/tables/organization_settings_module/table [schemas/metaschema_modules_public/schema] 2026-01-14T00:00:00Z devin <devin@cognition.ai> # add schemas/metaschema_modules_public/tables/organization_settings_module/table
|
package/verify/schemas/metaschema_modules_public/tables/organization_settings_module/table.sql
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
-- Verify schemas/metaschema_modules_public/tables/organization_settings_module/table on pg
|
|
2
|
+
|
|
3
|
+
BEGIN;
|
|
4
|
+
|
|
5
|
+
SELECT
|
|
6
|
+
id,
|
|
7
|
+
database_id,
|
|
8
|
+
schema_id,
|
|
9
|
+
private_schema_id,
|
|
10
|
+
table_id,
|
|
11
|
+
owner_table_id,
|
|
12
|
+
table_name
|
|
13
|
+
FROM metaschema_modules_public.organization_settings_module
|
|
14
|
+
WHERE FALSE;
|
|
15
|
+
|
|
16
|
+
ROLLBACK;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
-- Verify schemas/metaschema_modules_public/tables/table_module/table on pg
|
|
2
|
+
|
|
3
|
+
BEGIN;
|
|
4
|
+
|
|
5
|
+
SELECT
|
|
6
|
+
id,
|
|
7
|
+
database_id,
|
|
8
|
+
private_schema_id,
|
|
9
|
+
table_id,
|
|
10
|
+
node_type,
|
|
11
|
+
data,
|
|
12
|
+
fields
|
|
13
|
+
FROM metaschema_modules_public.table_module
|
|
14
|
+
WHERE FALSE;
|
|
15
|
+
|
|
16
|
+
ROLLBACK;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
-- Verify schemas/metaschema_modules_public/tables/user_profiles_module/table on pg
|
|
2
|
+
|
|
3
|
+
BEGIN;
|
|
4
|
+
|
|
5
|
+
SELECT
|
|
6
|
+
id,
|
|
7
|
+
database_id,
|
|
8
|
+
schema_id,
|
|
9
|
+
private_schema_id,
|
|
10
|
+
table_id,
|
|
11
|
+
owner_table_id,
|
|
12
|
+
table_name
|
|
13
|
+
FROM metaschema_modules_public.user_profiles_module
|
|
14
|
+
WHERE FALSE;
|
|
15
|
+
|
|
16
|
+
ROLLBACK;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
-- Verify schemas/metaschema_modules_public/tables/user_settings_module/table on pg
|
|
2
|
+
|
|
3
|
+
BEGIN;
|
|
4
|
+
|
|
5
|
+
SELECT
|
|
6
|
+
id,
|
|
7
|
+
database_id,
|
|
8
|
+
schema_id,
|
|
9
|
+
private_schema_id,
|
|
10
|
+
table_id,
|
|
11
|
+
owner_table_id,
|
|
12
|
+
table_name
|
|
13
|
+
FROM metaschema_modules_public.user_settings_module
|
|
14
|
+
WHERE FALSE;
|
|
15
|
+
|
|
16
|
+
ROLLBACK;
|