Bug 5343: Increment version number
[koha.git] / installer / data / mysql / updatedatabase.pl
index 1aaab3a..a01be2b 100755 (executable)
@@ -6637,7 +6637,7 @@ if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
               ('19', 'report', 'Use report plugins'),
               ('19', 'configure', 'Configure plugins')
             ");
-    $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('UseKohaPlugins','1','Enable or disable the ability to use Koha Plugins.','','YesNo')");
+    $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('UseKohaPlugins','0','Enable or disable the ability to use Koha Plugins.','','YesNo')");
 
     $dbh->do("
         CREATE TABLE IF NOT EXISTS plugin_data (
@@ -6984,6 +6984,17 @@ if ( CheckVersion($DBversion) ) {
     SetVersion ($DBversion);
 }
 
+$DBversion = "3.11.00.116";
+if ( CheckVersion($DBversion) ) {
+    $dbh->do(q{ALTER TABLE aqorders DROP COLUMN serialid;});
+    $dbh->do(q{ALTER TABLE aqorders DROP COLUMN subscription;});
+    $dbh->do(q{ALTER TABLE aqorders ADD COLUMN subscriptionid INT(11) DEFAULT NULL;});
+    $dbh->do(q{ALTER TABLE aqorders ADD CONSTRAINT aqorders_subscriptionid FOREIGN KEY (subscriptionid) REFERENCES subscription (subscriptionid) ON DELETE CASCADE ON UPDATE CASCADE;});
+    $dbh->do(q{ALTER TABLE subscription ADD COLUMN reneweddate DATE DEFAULT NULL;});
+    print "Upgrade to $DBversion done (Bug 5343: table aqorders: DROP serialid and subscription fields and ADD subscriptionid, table subscription: ADD reneweddate)\n";
+    SetVersion ($DBversion);
+}
+
 =head1 FUNCTIONS
 
 =head2 TableExists($table)