[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb: [1922] trunk/sql/Pg-database.sql



Revision: 1922
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=1922&view=rev
Author:   tetragon
Date:     2007-11-29 12:26:55 -0800 (Thu, 29 Nov 2007)

Log Message:
-----------
Adjusting the schema to account for recurring(print|email) and status having
multicolumn primary keys

Modified Paths:
--------------
    trunk/sql/Pg-database.sql

Modified: trunk/sql/Pg-database.sql
===================================================================
--- trunk/sql/Pg-database.sql	2007-11-29 20:25:15 UTC (rev 1921)
+++ trunk/sql/Pg-database.sql	2007-11-29 20:26:55 UTC (rev 1922)
@@ -850,11 +850,12 @@
 );
 --
 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 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 @@
 );
 
 
-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 @@
     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


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.