From 784c7533bb096c21e03bcd0159a7bd6f4d8aa5ff Mon Sep 17 00:00:00 2001 From: Paul Trowbridge Date: Mon, 17 Sep 2018 23:42:01 -0400 Subject: [PATCH] gl columns --- db_deploy.sql | 14 ++++++++------ schema/tables/gl.sql | 12 +++++++----- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/db_deploy.sql b/db_deploy.sql index 9503177..732b306 100644 --- a/db_deploy.sql +++ b/db_deploy.sql @@ -1,6 +1,6 @@ BEGIN TRANSACTION; --\conninfo ---drop schema evt cascade +drop schema evt cascade; --------------------------build schema---------------------------------------------- CREATE SCHEMA evt; @@ -32,16 +32,18 @@ COMMENT ON COLUMN evt.acct.prop IS 'properties'; CREATE TABLE evt.gl ( id INT GENERATED ALWAYS AS IDENTITY PRIMARY KEY - ,bpr_id INT REFERENCES evt.bpr (id) + ,bprid INT REFERENCES evt.bpr (id) ,acct text REFERENCES evt.acct (acct) ,amount numeric (12,2) - ,gl_line INT - ,bpr_extract JSONB + ,glline INT + ,bprkeys JSONB ); -COMMENT ON COLUMN evt.gl.bpr_id IS 'id of initial basic pecuniary record'; +COMMENT ON COLUMN evt.gl.id IS 'gl id'; +COMMENT ON COLUMN evt.gl.bprid IS 'id of initial basic pecuniary record'; COMMENT ON COLUMN evt.gl.acct IS 'account code'; COMMENT ON COLUMN evt.gl.amount IS 'amount'; -COMMENT ON COLUMN evt.gl.bpr IS 'extract from initial basic pecuniary record'; +COMMENT ON COLUMN evt.gl.glline IS 'gl line number'; +COMMENT ON COLUMN evt.gl.bprkeys IS 'extract from initial basic pecuniary record'; --------------------------balances---------------------------------------------------- diff --git a/schema/tables/gl.sql b/schema/tables/gl.sql index 9fde7fc..82db718 100644 --- a/schema/tables/gl.sql +++ b/schema/tables/gl.sql @@ -2,13 +2,15 @@ CREATE TABLE evt.gl ( id INT GENERATED ALWAYS AS IDENTITY PRIMARY KEY - ,bpr_id INT REFERENCES evt.bpr (id) + ,bprid INT REFERENCES evt.bpr (id) ,acct text REFERENCES evt.acct (acct) ,amount numeric (12,2) - ,gl_line INT - ,bpr_extract JSONB + ,glline INT + ,bprkeys JSONB ); -COMMENT ON COLUMN evt.gl.bpr_id IS 'id of initial basic pecuniary record'; +COMMENT ON COLUMN evt.gl.id IS 'gl id'; +COMMENT ON COLUMN evt.gl.bprid IS 'id of initial basic pecuniary record'; COMMENT ON COLUMN evt.gl.acct IS 'account code'; COMMENT ON COLUMN evt.gl.amount IS 'amount'; -COMMENT ON COLUMN evt.gl.bpr IS 'extract from initial basic pecuniary record'; \ No newline at end of file +COMMENT ON COLUMN evt.gl.glline IS 'gl line number'; +COMMENT ON COLUMN evt.gl.bprkeys IS 'extract from initial basic pecuniary record'; \ No newline at end of file