3 INSERT INTO config.upgrade_log (version) VALUES ('0156'); -- senator
5 CREATE TABLE acq.distribution_formula_application (
6 id BIGSERIAL PRIMARY KEY,
7 creator INT NOT NULL REFERENCES actor.usr(id) DEFERRABLE INITIALLY DEFERRED,
8 create_time TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW(),
10 REFERENCES acq.distribution_formula(id) DEFERRABLE INITIALLY DEFERRED,
12 REFERENCES acq.lineitem(id) DEFERRABLE INITIALLY DEFERRED
15 CREATE INDEX acqdfa_df_idx
16 ON acq.distribution_formula_application(formula);
17 CREATE INDEX acqdfa_li_idx
18 ON acq.distribution_formula_application(lineitem);
19 CREATE INDEX acqdfa_creator_idx
20 ON acq.distribution_formula_application(creator);