diff options
Diffstat (limited to 'sql/Pg-tables.sql')
-rwxr-xr-x | sql/Pg-tables.sql | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/sql/Pg-tables.sql b/sql/Pg-tables.sql index 42471a15..40a81af8 100755 --- a/sql/Pg-tables.sql +++ b/sql/Pg-tables.sql @@ -12,7 +12,7 @@ CREATE SEQUENCE jcitemsid; SELECT nextval ('jcitemsid'); -- -create table transactions ( +CREATE TABLE transactions ( id int PRIMARY KEY, table_name text ); @@ -243,12 +243,20 @@ CREATE TABLE partstax ( PRIMARY KEY (parts_id, chart_id) ); -- +CREATE TABLE taxmodule ( + taxmodule_id serial PRIMARY KEY, + taxmodulename text NOT NULL +}; +-- CREATE TABLE tax ( chart_id int PRIMARY KEY, rate numeric, taxnumber text, validto date, - FOREIGN KEY (chart_id) REFERENCES chart (id) + pass integer DEFAULT 0 NOT NULL, + taxmodule_id int, + FOREIGN KEY (chart_id) REFERENCES chart (id), + FOREIGN KEY (taxmodule_id) REFERENCES taxmodule (taxmodule_id) ); -- CREATE TABLE customertax ( |