2 -- @description: Preismatrix Tabellen
3 -- @depends: release_3_1_0
5 CREATE TABLE price_rules (
9 priority INTEGER NOT NULL DEFAULT 3,
11 discount NUMERIC(15,5),
12 obsolete BOOLEAN NOT NULL DEFAULT FALSE,
17 CREATE TABLE price_rule_items (
18 id SERIAL PRIMARY KEY,
19 price_rules_id INTEGER NOT NULL,
22 custom_variable_configs_id INTEGER,
26 value_num NUMERIC(15,5),
29 FOREIGN KEY (price_rules_id) REFERENCES price_rules (id),
30 FOREIGN KEY (custom_variable_configs_id) REFERENCES custom_variable_configs (id)
33 CREATE TRIGGER mtime_price_rules BEFORE UPDATE ON price_rules FOR EACH ROW EXECUTE PROCEDURE set_mtime();
34 CREATE TRIGGER mtime_price_rule_items BEFORE UPDATE ON price_rule_items FOR EACH ROW EXECUTE PROCEDURE set_mtime();