summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortetragon <tetragon@4979c152-3d1c-0410-bac9-87ea11338e46>2007-11-29 20:26:55 +0000
committertetragon <tetragon@4979c152-3d1c-0410-bac9-87ea11338e46>2007-11-29 20:26:55 +0000
commit6834bed0070192ee78e7b4056e72f94e37b46162 (patch)
tree77c26a70f2199cf054ef67aaa20a1ec5fe8d08c2
parentbc761936059300ae24be93b5ac7dcbf3a0c62a34 (diff)
Adjusting the schema to account for recurring(print|email) and status having
multicolumn primary keys git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1922 4979c152-3d1c-0410-bac9-87ea11338e46
-rw-r--r--sql/Pg-database.sql19
1 files changed, 11 insertions, 8 deletions
diff --git a/sql/Pg-database.sql b/sql/Pg-database.sql
index 96dea912..3e51a356 100644
--- a/sql/Pg-database.sql
+++ b/sql/Pg-database.sql
@@ -850,11 +850,12 @@ CREATE TABLE partsgroup (
);
--
CREATE TABLE status (
- trans_id int PRIMARY KEY,
+ trans_id int,
formname text,
printed bool default 'f',
emailed bool default 'f',
- spoolfile text
+ spoolfile text,
+ PRIMARY KEY (trans_id, formname)
);
--
CREATE TABLE department (
@@ -978,17 +979,19 @@ CREATE TABLE recurring (
);
--
CREATE TABLE recurringemail (
- id int PRIMARY KEY,
+ id int,
formname text,
format text,
- message text
+ message text,
+ PRIMARY KEY (id, formname)
);
--
CREATE TABLE recurringprint (
- id int PRIMARY KEY,
+ id int,
formname text,
format text,
- printer text
+ printer text,
+ PRIMARY KEY (id, formname)
);
--
CREATE TABLE jcitems (
@@ -1696,7 +1699,7 @@ CREATE TABLE menu_node (
);
-ALTER TABLE public.menu_node OWNER TO ledgersmb;
+--ALTER TABLE public.menu_node OWNER TO ledgersmb;
--
-- Name: menu_node_id_seq; Type: SEQUENCE SET; Schema: public; Owner: ledgersmb
@@ -2631,7 +2634,7 @@ CREATE VIEW menu_friendly AS
SELECT t."level", t.path, t.list_order, (repeat(' '::text, (2 * t."level")) || (n.label)::text) AS label, n.id, n."position" FROM (connectby('menu_node'::text, 'id'::text, 'parent'::text, 'position'::text, '0'::text, 0, ','::text) t(id integer, parent integer, "level" integer, path text, list_order integer) JOIN menu_node n USING (id));
-ALTER TABLE public.menu_friendly OWNER TO ledgersmb;
+--ALTER TABLE public.menu_friendly OWNER TO ledgersmb;
--
-- PostgreSQL database dump complete