2018-09-12 14:48:59 -04:00
|
|
|
--------------------------relational ledger------------------------------------------
|
|
|
|
|
|
|
|
CREATE TABLE evt.gl (
|
|
|
|
id INT GENERATED ALWAYS AS IDENTITY PRIMARY KEY
|
|
|
|
,bpr_id INT REFERENCES evt.bpr (id)
|
|
|
|
,acct text REFERENCES evt.acct (acct)
|
|
|
|
,amount numeric (12,2)
|
|
|
|
,bpr jsonb
|
|
|
|
);
|
|
|
|
COMMENT ON COLUMN evt.gl.bpr_id IS 'id of initial basic pecuniary record';
|
|
|
|
COMMENT ON COLUMN evt.gl.acct IS 'account code';
|
|
|
|
COMMENT ON COLUMN evt.gl.amount IS 'amount';
|
2018-09-12 00:48:44 -04:00
|
|
|
COMMENT ON COLUMN evt.gl.bpr IS 'extract from initial basic pecuniary record';
|