This commit is contained in:
Paul Trowbridge 2018-09-19 22:24:27 -04:00
parent 9d56c49411
commit 0d4b8a9114
3 changed files with 23 additions and 6 deletions

View File

@ -1,8 +1,11 @@
BEGIN TRANSACTION; BEGIN TRANSACTION;
--\conninfo --\conninfo
drop schema evt cascade;
--------------------------build schema---------------------------------------------- --------------------------build schema----------------------------------------------
DROP EXTENSTION IF EXISTS ltree;
CREATE EXTENSTION ltree;
DROP SCHEMA IF EXISTS evt cascade;
CREATE SCHEMA evt; CREATE SCHEMA evt;
COMMENT ON SCHEMA evt IS 'event log'; COMMENT ON SCHEMA evt IS 'event log';
@ -28,6 +31,16 @@ CREATE TABLE evt.acct (
COMMENT ON COLUMN evt.acct.acct IS 'account'; COMMENT ON COLUMN evt.acct.acct IS 'account';
COMMENT ON COLUMN evt.acct.prop IS 'properties'; COMMENT ON COLUMN evt.acct.prop IS 'properties';
------------------------fiscal periods------------------------
CREATE TABLE evt.fspr (
id ltree
,dur tstzrange
)
CREATE INDEX fspr_id ON evt.fspr USING GIST (id);
COMMENT ON COLUMN evt.fspr.id IS 'fiscal period id';
COMMENT ON COLUMN evt.fspr.dur IS 'fiscal period dutation in timestamp range';
--------------------------relational ledger------------------------------------------ --------------------------relational ledger------------------------------------------
CREATE TABLE evt.gl ( CREATE TABLE evt.gl (

9
schema/tables/fspr.sql Normal file
View File

@ -0,0 +1,9 @@
------------------------fiscal periods------------------------
CREATE TABLE evt.fspr (
id ltree
,dur tstzrange
)
CREATE INDEX fspr_id ON evt.fspr USING GIST (id);
COMMENT ON COLUMN evt.fspr.id IS 'fiscal period id';
COMMENT ON COLUMN evt.fspr.dur IS 'fiscal period dutation in timestamp range';

View File

@ -1,5 +0,0 @@
------------------------fiscal periods------------------------
CREATE TABLE evt.fspr (
id ltree
,dur tstzrange
)