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

SF.net SVN: ledger-smb:[5245] trunk



Revision: 5245
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=5245&view=rev
Author:   einhverfr
Date:     2012-11-23 05:03:18 +0000 (Fri, 23 Nov 2012)
Log Message:
-----------
Correcting errors causing errors on 1.2-1.4 upgrade.  Upgrade still not working, but at least it runs to completion without immediate errors.

Modified Paths:
--------------
    trunk/LedgerSMB/Scripts/setup.pm
    trunk/sql/Pg-database.sql

Modified: trunk/LedgerSMB/Scripts/setup.pm
===================================================================
--- trunk/LedgerSMB/Scripts/setup.pm	2012-11-23 04:15:28 UTC (rev 5244)
+++ trunk/LedgerSMB/Scripts/setup.pm	2012-11-23 05:03:18 UTC (rev 5245)
@@ -798,7 +798,8 @@
     my $dbinfo = $database->get_info();
     $dbh->do('ALTER SCHEMA public RENAME TO lsmb12');
     $dbh->do('CREATE SCHEMA PUBLIC');
-
+    $database->exec_script({script => "$database->{source_dir}sql/Pg-database.sql",
+                            log    => "$temp/dblog"});
     $database->load_modules('LOADORDER');
     $database->process_roles('Roles.sql');
     my $dbtemplate = LedgerSMB::Template->new(

Modified: trunk/sql/Pg-database.sql
===================================================================
--- trunk/sql/Pg-database.sql	2012-11-23 04:15:28 UTC (rev 5244)
+++ trunk/sql/Pg-database.sql	2012-11-23 05:03:18 UTC (rev 5245)
@@ -1231,13 +1231,6 @@
     primary key (id)
 );
 
-CREATE TABLE business_unit_jl (
-    entry_id int references journal_line(id),
-    bu_class int references business_unit_class(id),
-    bu_id int references business_unit(id) NOT NULL,
-    PRIMARY KEY(entry_id, bu_class)
-);
-
 COMMENT ON TABLE journal_line IS
 $$ Replaces acc_trans as the main account transaction line table.$$;
 
@@ -1978,6 +1971,13 @@
   completed numeric default 0
 );
 
+CREATE TABLE business_unit_jl (
+    entry_id int references journal_line(id),
+    bu_class int references business_unit_class(id),
+    bu_id int references business_unit(id) NOT NULL,
+    PRIMARY KEY(entry_id, bu_class)
+);
+
 CREATE TABLE business_unit_ac (
   entry_id int references acc_trans(entry_id),
   class_id int references business_unit_class(id),

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