notes/master_data_nodes.md

20 lines
435 B
Markdown
Raw Normal View History

2018-01-26 10:34:47 -05:00
CREATE TABLE mast.node
(
2018-01-26 17:21:58 -05:00
id bigint GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY
2018-01-26 10:34:47 -05:00
,nam text
2018-01-26 17:21:58 -05:00
,sch text
2018-01-26 10:34:47 -05:00
,doc jsonb
)
CREATE TABLE acct.accm
(
2018-01-26 17:22:07 -05:00
id bigint GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY
2018-01-26 10:34:47 -05:00
,nam text
2018-01-26 17:22:07 -05:00
--reference to node ids
--should be limited to certain types of nodes, like location, product line, fsline, perhaps an enum?
,nodes bigint[]
--node attributes pooled here
,doc jsonb
2018-01-26 10:34:47 -05:00
)