Skip to content

Commit e204266

Browse files
committed
fix: add constructive_private schema + trigger stub to constructive-compute
The job provision trigger function is generated at runtime by constructive-db. Add a no-op stub so standalone pgpm deploy works.
1 parent f9423e5 commit e204266

7 files changed

Lines changed: 39 additions & 1 deletion

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
-- Deploy: schemas/constructive_private/schema
2+
-- made with <3 @ constructive.io
3+
4+
5+
CREATE SCHEMA IF NOT EXISTS "constructive_private";
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
-- Deploy: schemas/constructive_private/trigger_fns/platform_function_definitions_job_functionprovision_insert
2+
-- made with <3 @ constructive.io
3+
4+
-- requires: schemas/constructive_private/schema
5+
6+
7+
CREATE FUNCTION "constructive_private".platform_function_definitions_job_functionprovision_insert() RETURNS TRIGGER AS $_PGFN_$
8+
BEGIN
9+
RETURN NEW;
10+
END;
11+
$_PGFN_$ LANGUAGE plpgsql VOLATILE;

pgpm/constructive-compute/pgpm.plan

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
%project=constructive-compute
33
%uri=constructive-compute
44

5+
schemas/constructive_private/schema 2017-08-11T08:11:51Z Constructive <developers@constructive.io> # add create_schema
6+
schemas/constructive_private/trigger_fns/platform_function_definitions_job_functionprovision_insert [schemas/constructive_private/schema] 2017-08-11T08:11:51Z Constructive <developers@constructive.io> # add create_trigger_function
57
schemas/constructive_compute_public/schema 2017-08-11T08:11:51Z Constructive <developers@constructive.io> # add create_schema
68
schemas/constructive_compute_public/schema/default_table_privs/administrator [schemas/constructive_compute_public/schema] 2017-08-11T08:11:51Z Constructive <developers@constructive.io> # add alter_default_privileges_grant_on_tables
79
schemas/constructive_compute_public/schema/default_seq_privs/administrator [schemas/constructive_compute_public/schema] 2017-08-11T08:11:51Z Constructive <developers@constructive.io> # add alter_default_privileges_grant_on_sequences
@@ -76,7 +78,7 @@ schemas/constructive_compute_public/tables/platform_function_definitions/columns
7678
schemas/constructive_compute_public/tables/platform_function_definitions/columns/required_configs/alterations/alt0000002079 [schemas/constructive_compute_public/tables/platform_function_definitions/columns/required_configs/column schemas/constructive_compute_public/tables/platform_function_definitions/table schemas/constructive_compute_public/schema] 2017-08-11T08:11:51Z Constructive <developers@constructive.io> # add alter_table_set_column_default
7779
schemas/constructive_compute_public/tables/platform_function_definitions/columns/required_configs/alterations/alt0000002080 [schemas/constructive_compute_public/tables/platform_function_definitions/columns/required_configs/column schemas/constructive_compute_public/schema] 2017-08-11T08:11:51Z Constructive <developers@constructive.io> # add set_comment
7880
schemas/constructive_compute_public/tables/platform_function_definitions/constraints/platform_function_definitions_scope_name_key/constraint [schemas/constructive_compute_public/tables/platform_function_definitions/table schemas/constructive_compute_public/schema] 2017-08-11T08:11:51Z Constructive <developers@constructive.io> # add alter_table_add_unique_constraint
79-
schemas/constructive_compute_public/tables/platform_function_definitions/triggers/platform_function_definitions_job_functionprovision_insert_tg [constructive-storage:schemas/constructive_private/trigger_fns/platform_function_definitions_job_functionprovision_insert schemas/constructive_compute_public/tables/platform_function_definitions/table constructive-storage:schemas/constructive_private/schema schemas/constructive_compute_public/schema] 2017-08-11T08:11:51Z Constructive <developers@constructive.io> # add create_trigger
81+
schemas/constructive_compute_public/tables/platform_function_definitions/triggers/platform_function_definitions_job_functionprovision_insert_tg [schemas/constructive_private/trigger_fns/platform_function_definitions_job_functionprovision_insert schemas/constructive_compute_public/tables/platform_function_definitions/table schemas/constructive_private/schema schemas/constructive_compute_public/schema] 2017-08-11T08:11:51Z Constructive <developers@constructive.io> # add create_trigger
8082
schemas/constructive_compute_public/tables/platform_secret_definitions/table [schemas/constructive_compute_public/schema] 2017-08-11T08:11:51Z Constructive <developers@constructive.io> # add create_table
8183
schemas/constructive_compute_public/tables/platform_secret_definitions/alterations/alt0000002081 [schemas/constructive_compute_public/tables/platform_secret_definitions/table schemas/constructive_compute_public/schema] 2017-08-11T08:11:51Z Constructive <developers@constructive.io> # add disable_row_level_security
8284
schemas/constructive_compute_public/tables/platform_secret_definitions/alterations/alt0000002082 [schemas/constructive_compute_public/tables/platform_secret_definitions/table schemas/constructive_compute_public/schema] 2017-08-11T08:11:51Z Constructive <developers@constructive.io> # add set_comment
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
-- Revert: schemas/constructive_private/schema
2+
-- made with <3 @ constructive.io
3+
4+
DROP SCHEMA IF EXISTS "constructive_private" CASCADE;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
-- Revert: schemas/constructive_private/trigger_fns/platform_function_definitions_job_functionprovision_insert
2+
-- made with <3 @ constructive.io
3+
4+
DROP FUNCTION IF EXISTS "constructive_private".platform_function_definitions_job_functionprovision_insert();
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
-- Verify: schemas/constructive_private/schema
2+
-- made with <3 @ constructive.io
3+
4+
BEGIN;
5+
SELECT pg_catalog.has_schema_privilege('constructive_private', 'usage');
6+
ROLLBACK;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
-- Verify: schemas/constructive_private/trigger_fns/platform_function_definitions_job_functionprovision_insert
2+
-- made with <3 @ constructive.io
3+
4+
BEGIN;
5+
SELECT has_function_privilege('constructive_private.platform_function_definitions_job_functionprovision_insert()', 'execute');
6+
ROLLBACK;

0 commit comments

Comments
 (0)