specify fspr not null so that a left join null result forces it to bomb
This commit is contained in:
parent
e6dc7f154b
commit
de2fdc869f
@ -49,7 +49,7 @@ CREATE TABLE evt.gl (
|
|||||||
,pstmp timestamptz DEFAULT CURRENT_TIMESTAMP
|
,pstmp timestamptz DEFAULT CURRENT_TIMESTAMP
|
||||||
--populates by trigger join to evt.fspr
|
--populates by trigger join to evt.fspr
|
||||||
,tstmp timestamptz
|
,tstmp timestamptz
|
||||||
,fspr ltree REFERENCES evt.fspr (id)
|
,fspr ltree NOT NULL REFERENCES evt.fspr (id)
|
||||||
,amount numeric (12,2)
|
,amount numeric (12,2)
|
||||||
,glline INT
|
,glline INT
|
||||||
,bprkeys JSONB
|
,bprkeys JSONB
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
--------------------------relational ledger------------------------------------------
|
--------------------------relational ledger------------------------------------------
|
||||||
|
--DROP TABLE evt.gl
|
||||||
CREATE TABLE evt.gl (
|
CREATE TABLE evt.gl (
|
||||||
id INT GENERATED ALWAYS AS IDENTITY PRIMARY KEY
|
id INT GENERATED ALWAYS AS IDENTITY PRIMARY KEY
|
||||||
,bprid INT REFERENCES evt.bpr (id)
|
,bprid INT REFERENCES evt.bpr (id)
|
||||||
@ -7,7 +7,7 @@ CREATE TABLE evt.gl (
|
|||||||
,pstmp timestamptz DEFAULT CURRENT_TIMESTAMP
|
,pstmp timestamptz DEFAULT CURRENT_TIMESTAMP
|
||||||
--populates by trigger join to evt.fspr
|
--populates by trigger join to evt.fspr
|
||||||
,tstmp timestamptz
|
,tstmp timestamptz
|
||||||
,fspr ltree REFERENCES evt.fspr (id)
|
,fspr ltree NOT NULL REFERENCES evt.fspr (id)
|
||||||
,amount numeric (12,2)
|
,amount numeric (12,2)
|
||||||
,glline INT
|
,glline INT
|
||||||
,bprkeys JSONB
|
,bprkeys JSONB
|
||||||
|
0
schema/triggers/gl_insert.sql
Normal file
0
schema/triggers/gl_insert.sql
Normal file
Loading…
Reference in New Issue
Block a user