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

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



Revision: 1972
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=1972&view=rev
Author:   einhverfr
Date:     2007-12-10 21:47:39 -0800 (Mon, 10 Dec 2007)

Log Message:
-----------
Minor db fixes

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

Modified: trunk/sql/Pg-database.sql
===================================================================
--- trunk/sql/Pg-database.sql	2007-12-11 05:24:58 UTC (rev 1971)
+++ trunk/sql/Pg-database.sql	2007-12-11 05:47:39 UTC (rev 1972)
@@ -426,7 +426,7 @@
     startdate date DEFAULT CURRENT_DATE,
     enddate date,
     threshold numeric default 0,
-    employee_id int references employee_entity(employee_id),
+    employee_id int references entity_employee(employee_id),
     primary_contact int references person(id),
     PRIMARY KEY(entity_id, meta_number)
 );
@@ -1032,19 +1032,19 @@
 			UPDATE transactions SET id = new.id WHERE id = old.id;
 		END IF;
 	ELSE 
-		DELETE FROM transactions WHERE id = old_id;
+		DELETE FROM transactions WHERE id = old.id;
 	END IF;
 	RETURN new;
 END;
 $$ LANGUAGE PLPGSQL;
 
-CREATE TRIGGER ap_track_global_sequence before insert or update or delete on ap
+CREATE TRIGGER ap_track_global_sequence before insert or update on ap
 for each row execute procedure track_global_sequence();
 
-CREATE TRIGGER ar_track_global_sequence before insert or update or delete on ar
+CREATE TRIGGER ar_track_global_sequence before insert or update on ar
 for each row execute procedure track_global_sequence();
 
-CREATE TRIGGER gl_track_global_sequence before insert or update or delete on gl
+CREATE TRIGGER gl_track_global_sequence before insert or update on gl
 for each row execute procedure track_global_sequence();
 
 CREATE TABLE custom_table_catalog (


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