2 -- @description: Preismatrix Tabellen
3 -- @depends: release_3_1_0
6 CREATE TABLE price_rules (
10 priority INTEGER NOT NULL DEFAULT 3,
12 discount NUMERIC(15,5),
13 obsolete BOOLEAN NOT NULL DEFAULT FALSE,
18 CREATE TABLE price_rule_items (
19 id SERIAL PRIMARY KEY,
20 price_rules_id INTEGER NOT NULL,
23 custom_variable_configs_id INTEGER,
27 value_num NUMERIC(15,5),
30 FOREIGN KEY (price_rules_id) REFERENCES price_rules (id),
31 FOREIGN KEY (custom_variable_configs_id) REFERENCES custom_variable_configs (id)
34 CREATE TRIGGER mtime_price_rules BEFORE UPDATE ON price_rules FOR EACH ROW EXECUTE PROCEDURE set_mtime();
35 CREATE TRIGGER mtime_price_rule_items BEFORE UPDATE ON price_rule_items FOR EACH ROW EXECUTE PROCEDURE set_mtime();