From ac5b087ea2d9ba7428d367aaeb288534158fee9a Mon Sep 17 00:00:00 2001
From: christopherm <christopherm@4979c152-3d1c-0410-bac9-87ea11338e46>
Date: Fri, 1 Sep 2006 01:16:38 +0000
Subject: Initial Import

git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/ledger-smb@1 4979c152-3d1c-0410-bac9-87ea11338e46
---
 sql/Pg-upgrade-2.3.9-2.4.2.sql | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)
 create mode 100755 sql/Pg-upgrade-2.3.9-2.4.2.sql

(limited to 'sql/Pg-upgrade-2.3.9-2.4.2.sql')

diff --git a/sql/Pg-upgrade-2.3.9-2.4.2.sql b/sql/Pg-upgrade-2.3.9-2.4.2.sql
new file mode 100755
index 00000000..4e91e473
--- /dev/null
+++ b/sql/Pg-upgrade-2.3.9-2.4.2.sql
@@ -0,0 +1,34 @@
+--
+drop trigger del_customer on customer;
+drop trigger del_vendor on vendor;
+drop function del_customer();
+drop function del_vendor();
+--
+create function del_customer() returns opaque as '
+begin
+  delete from shipto where trans_id = old.id;
+  delete from customertax where customer_id = old.id;
+  delete from partscustomer where customer_id = old.id;
+  return NULL;
+end;
+' language 'plpgsql';
+-- end function
+--
+create trigger del_customer after delete on customer for each row execute procedure del_customer();
+-- end trigger
+--
+create function del_vendor() returns opaque as '
+begin
+  delete from shipto where trans_id = old.id;
+  delete from vendortax where vendor_id = old.id;
+  delete from partsvendor where vendor_id = old.id;
+  return NULL;
+end;
+' language 'plpgsql';
+-- end function
+-- 
+create trigger del_vendor after delete on vendor for each row execute procedure del_vendor();
+-- end trigger
+--
+update defaults set version = '2.4.2';
+
-- 
cgit v1.2.3

/a><a class='active' href='/notmuch/diff/tags/b6/5c/E1nu64R-0004I9-0S@respighi.debian.org/inbox?h=master'>diff</a></td><td class='form'><form class='right' method='get' action='/notmuch/log/tags/b6/5c/E1nu64R-0004I9-0S@respighi.debian.org/inbox'>
<input type='hidden' name='h' value='master'/><select name='qt'>
<option value='grep'>log msg</option>
<option value='author'>author</option>
<option value='committer'>committer</option>
<option value='range'>range</option>
</select>
<input class='txt' type='search' size='10' name='q' value=''/>
<input type='submit' value='search'/>
</form>
</td></tr></table>
<div class='path'>path: <a href='/notmuch/diff/?h=master'>root</a>/<a href='/notmuch/diff/tags?h=master'>tags</a>/<a href='/notmuch/diff/tags/b6?h=master'>b6</a>/<a href='/notmuch/diff/tags/b6/5c?h=master'>5c</a>/<a href='/notmuch/diff/tags/b6/5c/E1nu64R-0004I9-0S@respighi.debian.org?h=master'>E1nu64R-0004I9-0S@respighi.debian.org</a>/<a href='/notmuch/diff/tags/b6/5c/E1nu64R-0004I9-0S@respighi.debian.org/inbox?h=master'>inbox</a></div><div class='content'><div class='cgit-panel'><b>diff options</b><form method='get'><input type='hidden' name='h' value='master'/><table><tr><td colspan='2'/></tr><tr><td class='label'>context:</td><td class='ctrl'><select name='context' onchange='this.form.submit();'><option value='1'>1</option><option value='2'>2</option><option value='3' selected='selected'>3</option><option value='4'>4</option><option value='5'>5</option><option value='6'>6</option><option value='7'>7</option><option value='8'>8</option><option value='9'>9</option><option value='10'>10</option><option value='15'>15</option><option value='20'>20</option><option value='25'>25</option><option value='30'>30</option><option value='35'>35</option><option value='40'>40</option></select></td></tr><tr><td class='label'>space:</td><td class='ctrl'><select name='ignorews' onchange='this.form.submit();'><option value='0' selected='selected'>include</option><option value='1'>ignore</option></select></td></tr><tr><td class='label'>mode:</td><td class='ctrl'><select name='dt' onchange='this.form.submit();'><option value='0' selected='selected'>unified</option><option value='1'>ssdiff</option><option value='2'>stat only</option></select></td></tr><tr><td/><td class='ctrl'><noscript><input type='submit' value='reload'/></noscript></td></tr></table></form></div><div class='diffstat-header'><a href='/notmuch/diff/?h=master'>Diffstat</a> (limited to 'tags/b6/5c/E1nu64R-0004I9-0S@respighi.debian.org/inbox')</div><table summary='diffstat' class='diffstat'>