@pgpm/metaschema-schema 0.16.5 → 0.16.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.
package/README.md CHANGED
@@ -25,7 +25,6 @@ Database metadata utilities and introspection functions.
25
25
  - **Index Management**: Store and query index definitions
26
26
  - **Trigger and Procedure Metadata**: Track database functions and triggers
27
27
  - **RLS and Policy Information**: Store row-level security policies
28
- - **Extension Tracking**: Manage database extensions and their relationships
29
28
  - **API and Site Metadata**: Store API configurations and site information
30
29
  - **GraphQL Integration**: Smart tags and annotations for GraphQL schema generation
31
30
 
@@ -99,8 +98,6 @@ Stores database structure metadata:
99
98
  - **trigger**: Trigger definitions
100
99
  - **procedure**: Stored procedure definitions
101
100
  - **policy**: Row-level security policies
102
- - **extension**: PostgreSQL extensions
103
- - **database_extension**: Extension installations per database
104
101
 
105
102
  ### metaschema_private Schema
106
103
 
@@ -111,7 +108,6 @@ Private schema for internal metadata operations.
111
108
  Application-level metadata:
112
109
 
113
110
  - **apis**: API configurations
114
- - **api_extensions**: API extension relationships
115
111
  - **api_modules**: API module definitions
116
112
  - **api_schemas**: API schema configurations
117
113
  - **sites**: Site definitions
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pgpm/metaschema-schema",
3
- "version": "0.16.5",
3
+ "version": "0.16.6",
4
4
  "description": "Database metadata utilities and introspection functions",
5
5
  "author": "Dan Lynch <pyramation@gmail.com>",
6
6
  "contributors": [
@@ -37,5 +37,5 @@
37
37
  "bugs": {
38
38
  "url": "https://github.com/constructive-io/pgpm-modules/issues"
39
39
  },
40
- "gitHead": "ce419d2c087d6c92a8e4a2fe87306bad6c10875e"
40
+ "gitHead": "54217658828a8005b3e512e70fe1b9f723457e6f"
41
41
  }
package/pgpm.plan CHANGED
@@ -9,8 +9,6 @@ schemas/metaschema_public/tables/database/table [schemas/metaschema_public/schem
9
9
  schemas/metaschema_public/tables/schema/table [schemas/metaschema_public/schema schemas/metaschema_public/tables/database/table schemas/metaschema_public/types/object_category] 2017-08-11T08:11:51Z skitch <skitch@5b0c196eeb62> # add schemas/metaschema_public/tables/schema/table
10
10
  schemas/metaschema_public/tables/table/table [schemas/metaschema_public/schema schemas/metaschema_public/tables/database/table schemas/metaschema_public/tables/schema/table schemas/metaschema_public/types/object_category] 2017-08-11T08:11:51Z skitch <skitch@5b0c196eeb62> # add schemas/metaschema_public/tables/table/table
11
11
  schemas/metaschema_public/tables/check_constraint/table [schemas/metaschema_public/schema schemas/metaschema_public/tables/database/table schemas/metaschema_public/tables/table/table schemas/metaschema_public/types/object_category] 2017-08-11T08:11:51Z skitch <skitch@5b0c196eeb62> # add schemas/metaschema_public/tables/check_constraint/table
12
- schemas/metaschema_public/tables/extension/table [schemas/metaschema_public/schema] 2017-08-11T08:11:51Z skitch <skitch@5b0c196eeb62> # add schemas/metaschema_public/tables/extension/table
13
- schemas/metaschema_public/tables/database_extension/table [schemas/metaschema_public/schema schemas/metaschema_public/tables/extension/table schemas/metaschema_public/tables/database/table] 2017-08-11T08:11:51Z skitch <skitch@5b0c196eeb62> # add schemas/metaschema_public/tables/database_extension/table
14
12
  schemas/metaschema_public/tables/database/indexes/databases_database_unique_name_idx [schemas/metaschema_private/schema schemas/metaschema_public/schema schemas/metaschema_public/tables/database/table] 2017-08-11T08:11:51Z skitch <skitch@5b0c196eeb62> # add schemas/metaschema_public/tables/database/indexes/databases_database_unique_name_idx
15
13
  schemas/metaschema_public/tables/field/table [schemas/metaschema_public/schema schemas/metaschema_public/tables/table/table schemas/metaschema_public/types/object_category] 2017-08-11T08:11:51Z skitch <skitch@5b0c196eeb62> # add schemas/metaschema_public/tables/field/table
16
14
  schemas/metaschema_public/tables/field/indexes/databases_field_uniq_names_idx [schemas/metaschema_public/schema schemas/metaschema_public/tables/field/table] 2017-08-11T08:11:51Z skitch <skitch@5b0c196eeb62> # add schemas/metaschema_public/tables/field/indexes/databases_field_uniq_names_idx
@@ -139,38 +139,6 @@ CREATE INDEX check_constraint_table_id_idx ON metaschema_public.check_constraint
139
139
 
140
140
  CREATE INDEX check_constraint_database_id_idx ON metaschema_public.check_constraint (database_id);
141
141
 
142
- CREATE TABLE metaschema_public.extension (
143
- name text NOT NULL PRIMARY KEY,
144
- public_schemas text[],
145
- private_schemas text[]
146
- );
147
-
148
- INSERT INTO metaschema_public.extension (
149
- name,
150
- public_schemas,
151
- private_schemas
152
- ) VALUES
153
- ('collections', ARRAY['metaschema_public'], ARRAY['metaschema_private']),
154
- ('meta', ARRAY['services_public'], ARRAY['services_private']);
155
-
156
- CREATE TABLE metaschema_public.database_extension (
157
- name text NOT NULL PRIMARY KEY,
158
- database_id uuid NOT NULL,
159
- CONSTRAINT ext_fkey
160
- FOREIGN KEY(name)
161
- REFERENCES metaschema_public.extension (name)
162
- ON DELETE CASCADE,
163
- CONSTRAINT db_fkey
164
- FOREIGN KEY(database_id)
165
- REFERENCES metaschema_public.database (id)
166
- ON DELETE CASCADE,
167
- UNIQUE (database_id, name)
168
- );
169
-
170
- COMMENT ON CONSTRAINT db_fkey ON metaschema_public.database_extension IS '@omit manyToMany';
171
-
172
- CREATE INDEX database_extension_database_id_idx ON metaschema_public.database_extension (database_id);
173
-
174
142
  CREATE FUNCTION metaschema_private.database_name_hash(name text) RETURNS bytea AS $EOFCODE$
175
143
  SELECT
176
144
  DECODE(MD5(LOWER(inflection.plural (name))), 'hex');
@@ -1,23 +0,0 @@
1
- -- Deploy schemas/metaschema_public/tables/database_extension/table to pg
2
-
3
- -- requires: schemas/metaschema_public/schema
4
- -- requires: schemas/metaschema_public/tables/extension/table
5
- -- requires: schemas/metaschema_public/tables/database/table
6
-
7
- BEGIN;
8
-
9
- CREATE TABLE metaschema_public.database_extension (
10
- name text NOT NULL PRIMARY KEY,
11
- database_id uuid NOT NULL,
12
-
13
- --
14
-
15
- CONSTRAINT ext_fkey FOREIGN KEY (name) REFERENCES metaschema_public.extension (name) ON DELETE CASCADE,
16
- CONSTRAINT db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE,
17
- UNIQUE (database_id, name)
18
- );
19
-
20
- COMMENT ON CONSTRAINT db_fkey ON metaschema_public.database_extension IS E'@omit manyToMany';
21
- CREATE INDEX database_extension_database_id_idx ON metaschema_public.database_extension ( database_id );
22
-
23
- COMMIT;
@@ -1,28 +0,0 @@
1
- -- Deploy schemas/metaschema_public/tables/extension/table to pg
2
-
3
- -- requires: schemas/metaschema_public/schema
4
-
5
- BEGIN;
6
-
7
- -- TODO add package name
8
-
9
- CREATE TABLE metaschema_public.extension (
10
- name text NOT NULL PRIMARY KEY,
11
- public_schemas text[],
12
- private_schemas text[]
13
- );
14
-
15
- INSERT INTO metaschema_public.extension (name, public_schemas, private_schemas) VALUES
16
- (
17
- 'collections',
18
- ARRAY['metaschema_public'],
19
- ARRAY['metaschema_private']
20
- ),
21
- (
22
- 'meta',
23
- ARRAY['services_public'],
24
- ARRAY['services_private']
25
- )
26
- ;
27
-
28
- COMMIT;
@@ -1,7 +0,0 @@
1
- -- Revert schemas/metaschema_public/tables/database_extension/table from pg
2
-
3
- BEGIN;
4
-
5
- DROP TABLE metaschema_public.database_extension;
6
-
7
- COMMIT;
@@ -1,7 +0,0 @@
1
- -- Revert schemas/metaschema_public/tables/extension/table from pg
2
-
3
- BEGIN;
4
-
5
- DROP TABLE metaschema_public.extension;
6
-
7
- COMMIT;
@@ -1,7 +0,0 @@
1
- -- Revert schemas/services_public/tables/api_extensions/table from pg
2
-
3
- BEGIN;
4
-
5
- DROP TABLE services_public.api_extensions;
6
-
7
- COMMIT;
@@ -1,7 +0,0 @@
1
- -- Verify schemas/metaschema_public/tables/database_extension/table on pg
2
-
3
- BEGIN;
4
-
5
- SELECT verify_table ('metaschema_public.database_extension');
6
-
7
- ROLLBACK;
@@ -1,7 +0,0 @@
1
- -- Verify schemas/metaschema_public/tables/extension/table on pg
2
-
3
- BEGIN;
4
-
5
- SELECT verify_table ('metaschema_public.extension');
6
-
7
- ROLLBACK;
@@ -1,7 +0,0 @@
1
- -- Verify schemas/services_public/tables/api_extensions/table on pg
2
-
3
- BEGIN;
4
-
5
- SELECT verify_table ('services_public.api_extensions');
6
-
7
- ROLLBACK;