Bugfix: 4046 Misc SQL Syntax Errors
authorChris Nighswonger <cnighswonger@foundations.edu>
Fri, 15 Jan 2010 04:03:02 +0000 (23:03 -0500)
committerHenri-Damien LAURENT <henridamien.laurent@biblibre.com>
Fri, 15 Jan 2010 09:24:55 +0000 (10:24 +0100)
This patch fixes several SQL syntax errors with the ALTER TABLE pragma

installer/data/mysql/updatedatabase.pl

index a60a6f2..9c4940a 100755 (executable)
@@ -2758,8 +2758,8 @@ $DBversion = "3.01.00.068";
 if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
        $dbh->do("ALTER TABLE issuingrules ADD 
                        COLUMN `finedays` int(11) default NULL AFTER `fine`,
-                       COLUMN `renewalsallowed` smallint(6) default NULL, 
-                       COLUMN `reservesallowed` smallint(6) default NULL,
+                       ADD COLUMN `renewalsallowed` smallint(6) default NULL, 
+                       ADD COLUMN `reservesallowed` smallint(6) default NULL;
                        ");
        my $sth = $dbh->prepare("SELECT itemtype, renewalsallowed FROM itemtypes");
     $sth->execute();