gl columns

This commit is contained in:
Paul Trowbridge 2018-09-17 23:42:01 -04:00
parent 847cc0e87a
commit 784c7533bb
2 changed files with 15 additions and 11 deletions

View File

@ -1,6 +1,6 @@
BEGIN TRANSACTION; BEGIN TRANSACTION;
--\conninfo --\conninfo
--drop schema evt cascade drop schema evt cascade;
--------------------------build schema---------------------------------------------- --------------------------build schema----------------------------------------------
CREATE SCHEMA evt; CREATE SCHEMA evt;
@ -32,16 +32,18 @@ COMMENT ON COLUMN evt.acct.prop IS 'properties';
CREATE TABLE evt.gl ( CREATE TABLE evt.gl (
id INT GENERATED ALWAYS AS IDENTITY PRIMARY KEY 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) ,acct text REFERENCES evt.acct (acct)
,amount numeric (12,2) ,amount numeric (12,2)
,gl_line INT ,glline INT
,bpr_extract JSONB ,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.acct IS 'account code';
COMMENT ON COLUMN evt.gl.amount IS 'amount'; 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---------------------------------------------------- --------------------------balances----------------------------------------------------

View File

@ -2,13 +2,15 @@
CREATE TABLE evt.gl ( CREATE TABLE evt.gl (
id INT GENERATED ALWAYS AS IDENTITY PRIMARY KEY 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) ,acct text REFERENCES evt.acct (acct)
,amount numeric (12,2) ,amount numeric (12,2)
,gl_line INT ,glline INT
,bpr_extract JSONB ,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.acct IS 'account code';
COMMENT ON COLUMN evt.gl.amount IS 'amount'; 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';