Skip to content

Commit

Permalink
devel: bump db version using date from filename (we dont need repeata…
Browse files Browse the repository at this point in the history
…ble work to be done in upgradedb.php), also use transactions for all upgrade scripts
  • Loading branch information
interduo committed Sep 9, 2022
1 parent 06c0367 commit 110a563
Show file tree
Hide file tree
Showing 1,237 changed files with 45 additions and 5,753 deletions.
2 changes: 1 addition & 1 deletion devel/dbinfo_version_bump.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ sed -i -e "s/^define('DBVERSION', '\([0-9]\+\)');/define('DBVERSION', '$1');/g"

for dbdriver in mysql postgres; do
if [ ! -f "${LMSDIR}/lib/upgradedb/${dbdriver}.$1.php" ]; then
sed -e "s/%version%/$1/g" ${CWD}/upgradedb-template.php >${LMSDIR}/lib/upgradedb/${dbdriver}.$1.php
cp ${CWD}/upgradedb-template.php ${LMSDIR}/lib/upgradedb/${dbdriver}.$1.php
fi
done
7 changes: 1 addition & 6 deletions devel/upgradedb-template.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/*
* LMS version 1.11-git
*
* (C) Copyright 2001-2021 LMS Developers
* (C) Copyright 2001-2022 LMS Developers
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License Version 2 as
Expand All @@ -21,8 +21,3 @@
*
*/

$this->BeginTrans();

$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('%version%', 'dbversion'));

$this->CommitTrans();
13 changes: 7 additions & 6 deletions lib/LMSDB_common.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -773,12 +773,13 @@ public function UpgradeDb($dbver = DBVERSION, $pluginclass = null, $libdir = nul
if (!empty($pendingupgrades)) {
sort($pendingupgrades);
foreach ($pendingupgrades as $upgrade) {
include($libdir . DIRECTORY_SEPARATOR . 'upgradedb' . DIRECTORY_SEPARATOR . $filename_prefix . '.' . $upgrade . '.php');
if (empty($this->errors)) {
$lastupgrade = $upgrade;
} else {
break;
}
$this->BeginTrans();
include($libdir . DIRECTORY_SEPARATOR . 'upgradedb'
. DIRECTORY_SEPARATOR . $filename_prefix . '.' . $upgrade . '.php');
$this->Execute('UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?',
array($upgrade, 'dbversion')
);
$this->CommitTrans();
}
}

Expand Down
2 changes: 0 additions & 2 deletions lib/upgradedb/mysql.2004030800.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,5 +64,3 @@
body mediumtext NOT NULL default '',
PRIMARY KEY (id) ) ENGINE=MyISAM
");

$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2004030800', 'dbversion'));
1 change: 0 additions & 1 deletion lib/upgradedb/mysql.2004031000.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,3 @@

$this->Execute("ALTER TABLE users ADD message TEXT DEFAULT '' NOT NULL");
$this->Execute("ALTER TABLE nodes ADD warning BOOL DEFAULT '0' NOT NULL");
$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2004031000', 'dbversion'));
2 changes: 0 additions & 2 deletions lib/upgradedb/mysql.2004031100.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,3 @@
$this->Execute("ALTER TABLE rtmessages ADD createtime INT(11) DEFAULT 0 NOT NULL");

$this->Execute("CREATE TABLE rtattachments (messageid INT DEFAULT 0 NOT NULL, filename VARCHAR(255) NOT NULL, contenttype VARCHAR(255) NOT NULL)");

$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2004031100', 'dbversion'));
1 change: 0 additions & 1 deletion lib/upgradedb/mysql.2004031400.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,3 @@
$this->Execute("ALTER TABLE users DROP tariff, DROP payday");
$this->Execute("ALTER TABLE users CHANGE message message TEXT NOT NULL");
$this->Execute("ALTER TABLE invoicecontents CHANGE value value DECIMAL(9, 2) NOT NULL, CHANGE taxvalue taxvalue DECIMAL(9, 2) NOT NULL, CHANGE count count DECIMAL(9, 2) NOT NULL ");
$this->Execute("UPDATE dbinfo SET keyvalue='2004031400' WHERE keytype='dbversion'");
1 change: 0 additions & 1 deletion lib/upgradedb/mysql.2004031401.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,3 @@
$this->Execute("ALTER TABLE networks ADD UNIQUE (name)");
$this->Execute("ALTER TABLE networks ADD UNIQUE (address)");
$this->Execute("ALTER TABLE rtqueues ADD UNIQUE (email)");
$this->Execute("UPDATE dbinfo SET keyvalue='2004031401' WHERE keytype='dbversion'");
1 change: 0 additions & 1 deletion lib/upgradedb/mysql.2004031402.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,3 @@
*/

$this->Execute("ALTER TABLE assignments ADD datefrom INT NOT NULL, ADD dateto INT NOT NULL");
$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2004031402', 'dbversion'));
1 change: 0 additions & 1 deletion lib/upgradedb/mysql.2004040701.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,3 @@

$this->Execute("ALTER TABLE tariffs CHANGE taxvalue taxvalue DECIMAL(9,2) NULL DEFAULT 0.00");
$this->Execute("ALTER TABLE invoicecontents CHANGE taxvalue taxvalue DECIMAL(9,2) NULL DEFAULT 0.00");
$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2004040701', 'dbversion'));
1 change: 0 additions & 1 deletion lib/upgradedb/mysql.2004040800.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,3 @@
*/

$this->Execute("ALTER TABLE cash ADD taxvalue DECIMAL(9,2) DEFAULT 0.00");
$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2004040800', 'dbversion'));
1 change: 0 additions & 1 deletion lib/upgradedb/mysql.2004041600.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,3 @@
UNIQUE KEY userassignment (usergroupid, userid)
)
");
$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2004041600', 'dbversion'));
1 change: 0 additions & 1 deletion lib/upgradedb/mysql.2004042000.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,3 @@
*/

$this->Execute('ALTER TABLE nodes DROP INDEX mac');
$this->Execute('UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?', array('2004042000', 'dbversion'));
1 change: 0 additions & 1 deletion lib/upgradedb/mysql.2004042300.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,3 @@
*/

$this->Execute("ALTER TABLE admins ADD deleted tinyint(1) DEFAULT '0' NOT NULL");
$this->Execute('UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?', array('2004042300', 'dbversion'));
2 changes: 0 additions & 2 deletions lib/upgradedb/mysql.2004061900.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,3 @@
$this->Execute("ALTER TABLE tariffs ADD climit int(11) DEFAULT '0' NOT NULL");
$this->Execute("ALTER TABLE tariffs ADD plimit int(11) DEFAULT '0' NOT NULL");
$this->Execute("UPDATE tariffs SET upceil=uprate, downceil=downrate");

$this->Execute('UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?', array('2004061900', 'dbversion'));
2 changes: 0 additions & 2 deletions lib/upgradedb/mysql.2004070100.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,3 @@
)
");
$this->Execute("ALTER TABLE rtqueues ADD description TEXT DEFAULT '' NOT NULL");

$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2004070100', 'dbversion'));
2 changes: 0 additions & 2 deletions lib/upgradedb/mysql.2004070800.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,3 @@
*/

$this->Execute("ALTER TABLE rttickets ADD userid INT(11) DEFAULT 0 NOT NULL");

$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2004070800', 'dbversion'));
2 changes: 0 additions & 2 deletions lib/upgradedb/mysql.2004071200.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,3 @@
$this->Execute("ALTER TABLE rtmessages ADD userid INT(11) DEFAULT '0' NOT NULL");
$this->Execute("ALTER TABLE rtmessages CHANGE sender adminid INT(11) DEFAULT '0' NOT NULL");
$this->Execute("ALTER TABLE rtqueues DROP INDEX email");

$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2004071200', 'dbversion'));
2 changes: 0 additions & 2 deletions lib/upgradedb/mysql.2004071400.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,3 @@

$this->Execute("ALTER TABLE stats CHANGE upload upload BIGINT DEFAULT '0'");
$this->Execute("ALTER TABLE stats CHANGE download download BIGINT DEFAULT '0'");

$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2004071400', 'dbversion'));
2 changes: 0 additions & 2 deletions lib/upgradedb/mysql.2004072100.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,3 @@
*/

$this->Execute("ALTER TABLE users ADD serviceaddr text DEFAULT '' NOT NULL");

$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2004072100', 'dbversion'));
2 changes: 0 additions & 2 deletions lib/upgradedb/mysql.2004072700.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,3 @@

$this->Execute("ALTER TABLE rttickets ADD resolvetime INT(11) NOT NULL DEFAULT '0'");
$this->Execute("UPDATE rttickets SET resolvetime=createtime WHERE state=2");

$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2004072700', 'dbversion'));
2 changes: 0 additions & 2 deletions lib/upgradedb/mysql.2004081400.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,3 @@
*/

$this->Execute("ALTER TABLE nodes ADD lastonline INT(11) NOT NULL DEFAULT '0'");

$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2004081400', 'dbversion'));
2 changes: 0 additions & 2 deletions lib/upgradedb/mysql.2004081700.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,3 @@
*
* $Id$
*/

$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2004081700', 'dbversion'));
2 changes: 0 additions & 2 deletions lib/upgradedb/mysql.2004081800.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,3 @@
*/

$this->Execute("ALTER TABLE assignments ADD suspended TINYINT(1) NOT NULL DEFAULT '0'");

$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2004081800', 'dbversion'));
2 changes: 0 additions & 2 deletions lib/upgradedb/mysql.2004090700.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,3 @@
*/

$this->Execute("ALTER TABLE cash ADD INDEX (userid)");

$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2004090700', 'dbversion'));
2 changes: 0 additions & 2 deletions lib/upgradedb/mysql.2004090800.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,3 @@

$this->Execute("ALTER TABLE users ADD COLUMN pin INT(6) NOT NULL DEFAULT '0'");
$this->Execute("UPDATE users SET pin=RAND()*10 + RAND()*100 + RAND()*1000 + RAND()*10000 + RAND()*100000-1");

$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2004090800', 'dbversion'));
2 changes: 0 additions & 2 deletions lib/upgradedb/mysql.2004101800.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,3 @@

$this->Execute("ALTER TABLE netlinks ADD COLUMN type TINYINT(1) NOT NULL DEFAULT '0'");
$this->Execute("ALTER TABLE nodes ADD COLUMN linktype TINYINT(1) NOT NULL DEFAULT '0'");

$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2004101800', 'dbversion'));
2 changes: 0 additions & 2 deletions lib/upgradedb/mysql.2004102900.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,3 @@
*/

$this->Execute("ALTER TABLE nodes ADD COLUMN info text NOT NULL DEFAULT ''");

$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2004102900', 'dbversion'));
2 changes: 0 additions & 2 deletions lib/upgradedb/mysql.2004111300.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,3 @@
PRIMARY KEY (id)
) ENGINE=MyISAM
");

$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2004111300', 'dbversion'));
2 changes: 0 additions & 2 deletions lib/upgradedb/mysql.2004111700.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,3 @@
$this->Execute("UPDATE passwd SET ll=UNIX_TIMESTAMP(lastlogin)");
$this->Execute("ALTER TABLE passwd DROP lastlogin");
$this->Execute("ALTER TABLE passwd CHANGE ll lastlogin INT(11) NOT NULL DEFAULT '0'");

$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2004111700', 'dbversion'));
2 changes: 0 additions & 2 deletions lib/upgradedb/mysql.2004112100.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,3 @@
$this->Execute("ALTER TABLE passwd ADD domain VARCHAR(255) NOT NULL DEFAULT ''");
$this->Execute("UPDATE passwd SET type = 32767");
$this->Execute("ALTER TABLE passwd ADD UNIQUE (login)");

$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2004112100', 'dbversion'));
2 changes: 0 additions & 2 deletions lib/upgradedb/mysql.2004112400.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,3 @@
*/

$this->Execute("ALTER TABLE passwd CHANGE home home varchar(255) NOT NULL DEFAULT ''");

$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2004112400', 'dbversion'));
2 changes: 0 additions & 2 deletions lib/upgradedb/mysql.2004112600.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,3 @@
PRIMARY KEY (id)
) ENGINE=MyISAM
");

$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2004112600', 'dbversion'));
1 change: 0 additions & 1 deletion lib/upgradedb/mysql.2004112700.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,3 @@
*/

//$this->Execute("ALTER TABLE uiconfig ADD UNIQUE (section, var)");
$this->Execute("UPDATE dbinfo SET keyvalue='2004112700' WHERE keytype='dbversion'");
4 changes: 0 additions & 4 deletions lib/upgradedb/mysql.2004120300.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
* $Id$
*/

$this->BeginTrans();
$this->Execute("
CREATE TABLE domains (
id int(11) NOT NULL auto_increment,
Expand All @@ -41,6 +40,3 @@
}
}
$this->Execute('ALTER TABLE passwd DROP domain');

$this->Execute("UPDATE dbinfo SET keyvalue = '2004120300' WHERE keytype = 'dbversion'");
$this->CommitTrans();
3 changes: 0 additions & 3 deletions lib/upgradedb/mysql.2004120400.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
* $Id$
*/

$this->BeginTrans();
$this->Execute("
CREATE TABLE aliases (
id int(11) NOT NULL auto_increment,
Expand All @@ -34,5 +33,3 @@
UNIQUE KEY (login)
) ENGINE=MyISAM
");
$this->Execute("UPDATE dbinfo SET keyvalue = '2004120400' WHERE keytype = 'dbversion'");
$this->CommitTrans();
3 changes: 0 additions & 3 deletions lib/upgradedb/mysql.2004120600.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,5 @@
* $Id$
*/

$this->BeginTrans();
$this->Execute("ALTER TABLE aliases DROP INDEX login");
$this->Execute("ALTER TABLE aliases ADD UNIQUE KEY (login, accountid)");
$this->Execute("UPDATE dbinfo SET keyvalue = '2004120600' WHERE keytype = 'dbversion'");
$this->CommitTrans();
3 changes: 0 additions & 3 deletions lib/upgradedb/mysql.2004121000.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@
* $Id$
*/

$this->BeginTrans();
$this->Execute("ALTER TABLE uiconfig CHANGE section section VARCHAR(64) NOT NULL DEFAULT ''");
$this->Execute("ALTER TABLE uiconfig CHANGE var var VARCHAR(64) NOT NULL DEFAULT ''");
$this->Execute("ALTER TABLE uiconfig ADD UNIQUE (section, var)");
$this->Execute("UPDATE dbinfo SET keyvalue = '2004121000' WHERE keytype = 'dbversion'");
$this->CommitTrans();
2 changes: 0 additions & 2 deletions lib/upgradedb/mysql.2005012600.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,3 @@
");

$this->Execute("CREATE INDEX events_date_idx ON events(date)");

$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2005012600', 'dbversion'));
2 changes: 0 additions & 2 deletions lib/upgradedb/mysql.2005012700.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,3 @@
*/

$this->Execute("ALTER TABLE users CHANGE zip zip VARCHAR(10) NOT NULL DEFAULT ''");

$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2005012700', 'dbversion'));
5 changes: 0 additions & 5 deletions lib/upgradedb/mysql.2005013000.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
* $Id$
*/

$this->BeginTrans();

$this->Execute("ALTER TABLE invoicecontents ADD itemid smallint;");
$this->Execute("UPDATE invoicecontents set itemid = 0 where itemid is NULL;");
Expand All @@ -33,7 +32,3 @@
$this->Execute("ALTER TABLE cash add itemid smallint;");
$this->Execute("UPDATE cash set itemid=0 where itemid is NULL;");
$this->Execute("ALTER TABLE cash CHANGE itemid itemid smallint NOT NULL DEFAULT 0;");

$this->Execute("UPDATE dbinfo SET keyvalue = '2005013000' WHERE keytype = 'dbversion'");

$this->CommitTrans();
5 changes: 0 additions & 5 deletions lib/upgradedb/mysql.2005020600.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,5 @@
* $Id$
*/

$this->BeginTrans();

$this->Execute("CREATE INDEX invoiceid ON cash(invoiceid)");

$this->Execute("UPDATE dbinfo SET keyvalue = '2005020600' WHERE keytype = 'dbversion'");

$this->CommitTrans();
2 changes: 0 additions & 2 deletions lib/upgradedb/mysql.2005021500.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,3 @@
*/

$this->Execute("ALTER TABLE invoices CHANGE zip zip VARCHAR(10) NOT NULL DEFAULT ''");

$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2005021500', 'dbversion'));
2 changes: 0 additions & 2 deletions lib/upgradedb/mysql.2005022300.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,3 @@
closed tinyint(1) NOT NULL default '0',
PRIMARY KEY (id)) ENGINE=MyISAM
");

$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2005022300', 'dbversion'));
5 changes: 0 additions & 5 deletions lib/upgradedb/mysql.2005022500.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,5 @@
* $Id$
*/

$this->BeginTrans();

$this->Execute("CREATE INDEX tariffid ON assignments(tariffid)");

$this->Execute("UPDATE dbinfo SET keyvalue = '2005022500' WHERE keytype = 'dbversion'");

$this->CommitTrans();
6 changes: 0 additions & 6 deletions lib/upgradedb/mysql.2005030100.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,3 @@
*
* $Id$
*/

$this->BeginTrans();

$this->Execute("UPDATE dbinfo SET keyvalue = '2005030100' WHERE keytype = 'dbversion'");

$this->CommitTrans();
5 changes: 0 additions & 5 deletions lib/upgradedb/mysql.2005030200.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,10 @@
* $Id$
*/

$this->BeginTrans();

$this->Execute("CREATE INDEX netdev ON nodes(netdev)");
$this->Execute("CREATE INDEX queueid ON rttickets(queueid)");
$this->Execute("CREATE INDEX time ON cash(time)");
$this->Execute("CREATE INDEX cdate ON invoices(cdate)");
$this->Execute("CREATE INDEX invoiceid ON invoicecontents(invoiceid)");
$this->Execute("CREATE INDEX hash ON cashimport(hash)");

$this->Execute("UPDATE dbinfo SET keyvalue = '2005030200' WHERE keytype = 'dbversion'");

$this->CommitTrans();
2 changes: 0 additions & 2 deletions lib/upgradedb/mysql.2005030800.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,3 @@
*/

$this->Execute("ALTER TABLE nodes ADD passwd VARCHAR(32) NOT NULL DEFAULT ''");

$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2005030800', 'dbversion'));
2 changes: 0 additions & 2 deletions lib/upgradedb/mysql.2005031000.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,3 @@
*/

$this->Execute("CREATE TABLE sessions (id varchar(50) NOT NULL default '', ctime int(11) NOT NULL default 0, mtime int(11) NOT NULL default 0, atime int(11) NOT NULL default 0, vdata text NOT NULL, content text NOT NULL, PRIMARY KEY (id)) ENGINE=MyISAM");

$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2005031000', 'dbversion'));
2 changes: 0 additions & 2 deletions lib/upgradedb/mysql.2005033000.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,3 @@
*/

$this->Execute("ALTER TABLE assignments ADD discount decimal(4,2) NOT NULL DEFAULT '0'");

$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2005033000', 'dbversion'));
1 change: 0 additions & 1 deletion lib/upgradedb/mysql.2005033100.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,3 @@
*/

$this->Execute("ALTER TABLE passwd ADD quota_sh INT DEFAULT '0' NOT NULL , ADD quota_mail INT DEFAULT '0' NOT NULL , ADD quota_www INT DEFAULT '0' NOT NULL , ADD quota_ftp INT DEFAULT '0' NOT NULL");
$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2005033100', 'dbversion'));
1 change: 0 additions & 1 deletion lib/upgradedb/mysql.2005033101.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,3 @@
*/

$this->Execute("ALTER TABLE passwd ADD realname VARCHAR(255) DEFAULT '' NOT NULL");
$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2005033101', 'dbversion'));
1 change: 0 additions & 1 deletion lib/upgradedb/mysql.2005033102.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,3 @@
*/

$this->Execute("ALTER TABLE passwd ADD createtime INT DEFAULT 0 NOT NULL");
$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2005033102', 'dbversion'));
2 changes: 0 additions & 2 deletions lib/upgradedb/mysql.2005033103.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,3 @@
PRIMARY KEY (id),
UNIQUE KEY instanceid (instanceid, var))
");

$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2005033103', 'dbversion'));
Loading

0 comments on commit 110a563

Please sign in to comment.