delay dropping of aqbookfund
authorColin Campbell <colin.campbell@ptfs-europe.com>
Mon, 25 Jan 2010 14:20:09 +0000 (14:20 +0000)
committerColin Campbell <colin.campbell@ptfs-europe.com>
Mon, 25 Jan 2010 14:24:03 +0000 (14:24 +0000)
aqbookfund cannot be dropped before aqorderbreakdown
due to fk cobstraints
remove drop of column bookfundid from aqbudget
column no longer exists at this point

installer/data/mysql/updatedatabase.pl

index 8d65a4b..41dfa3f 100755 (executable)
@@ -2966,11 +2966,9 @@ BUDGETCONSTRAINTS
     $dbh->do(<<BUDGETDROPDATES);
 ALTER TABLE `aqbudgets`
    DROP startdate,
-   DROP enddate,
-   DROP bookfundid
+   DROP enddate
 BUDGETDROPDATES
 
-    $dbh->do("DROP TABLE aqbookfund ");
 
     $dbh->do("DROP TABLE IF EXISTS `aqbudgets_planning` ");
     $dbh->do("CREATE TABLE  `aqbudgets_planning` (
@@ -2991,6 +2989,8 @@ BUDGETDROPDATES
                     ADD COLUMN  `sort1_authcat` varchar(10) default NULL,
                     ADD COLUMN  `sort2_authcat` varchar(10) default NULL" );
 
+                # cannot do until aqorderbreakdown removed
+#    $dbh->do("DROP TABLE aqbookfund ");
 
 
 
@@ -3074,6 +3074,7 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
     );
 
     $dbh->do(qq| DROP TABLE aqorderbreakdown |);
+    $dbh->do('DROP TABLE aqbookfund');
     print "Upgrade to $DBversion done (New aqorders_items table for acqui)\n";
     SetVersion ($DBversion);
 }