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;
--\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----------------------------------------------------

View File

@ -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';
COMMENT ON COLUMN evt.gl.glline IS 'gl line number';
COMMENT ON COLUMN evt.gl.bprkeys IS 'extract from initial basic pecuniary record';