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

SF.net SVN: ledger-smb: [27] trunk/sql



Revision: 27
          http://svn.sourceforge.net/ledger-smb/?rev=27&view=rev
Author:   einhverfr
Date:     2006-09-05 18:35:12 -0700 (Tue, 05 Sep 2006)

Log Message:
-----------
Fixed db update

Added Paths:
-----------
    trunk/sql/Pg-upgrade-2.6.12-2.6.17.sql

Removed Paths:
-------------
    trunk/sql/Pg-upgrade-2.6.12-2.6.16.sql

Deleted: trunk/sql/Pg-upgrade-2.6.12-2.6.16.sql
===================================================================
--- trunk/sql/Pg-upgrade-2.6.12-2.6.16.sql	2006-09-06 00:10:38 UTC (rev 26)
+++ trunk/sql/Pg-upgrade-2.6.12-2.6.16.sql	2006-09-06 01:35:12 UTC (rev 27)
@@ -1,11 +0,0 @@
-
-CREATE SEQUENCE session_session_id_seq;
-
-CREATE TABLE session(
-session_id INTEGER PRIMARY KEY DEFAULT nextval('session_session_id_seq'),
-sl_login VARCHAR(50),
-token CHAR(32),
-last_used TIMESTAMP default now()
-);
-
-ALTER TABLE acc_trans ALTER COLUMN chart_id SET NOT NULL;

Added: trunk/sql/Pg-upgrade-2.6.12-2.6.17.sql
===================================================================
--- trunk/sql/Pg-upgrade-2.6.12-2.6.17.sql	                        (rev 0)
+++ trunk/sql/Pg-upgrade-2.6.12-2.6.17.sql	2006-09-06 01:35:12 UTC (rev 27)
@@ -0,0 +1,19 @@
+CREATE SEQUENCE session_session_id_seq;
+
+CREATE TABLE session(
+session_id INTEGER PRIMARY KEY DEFAULT nextval('session_session_id_seq'),
+sl_login VARCHAR(50),
+token CHAR(32),
+last_used TIMESTAMP default now()
+);
+
+-- LOCK TABLE acc_trans;
+ALTER TABLE acc_trans ALTER COLUMN chart_id SET NOT NULL;
+
+-- For older versions pre 8.0.3
+ALTER TABLE acc_trans ADD COLUMN amount2 NUMERIC;
+UPDATE acc_trans set amount2 = amount;
+ALTER TABLE acc_trans DROP COLUMN amount;
+ALTER TABLE acc_trans RENAME column amount2 TO amount;
+
+UPDATE defaults SET version = '2.6.17';


Property changes on: trunk/sql/Pg-upgrade-2.6.12-2.6.17.sql
___________________________________________________________________
Name: svn:executable
   + *


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