Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

devel: bump db version using date from filename (we dont need repeata… #2313

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
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
interduo marked this conversation as resolved.
Show resolved Hide resolved
done
6 changes: 0 additions & 6 deletions devel/upgradedb-template.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,3 @@
* USA.
*
*/

$this->BeginTrans();

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

$this->CommitTrans();
8 changes: 7 additions & 1 deletion devel/upgradedb.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,11 +160,17 @@
// force database auto update as we require it here
$CONFIG['database']['auto_update'] = true;

echo 'DB Type: ' . $CONFIG['database']['type'] . PHP_EOL;

foreach ($facilities as $facility) {
switch ($facility) {
case 'core':
$dbversion = $DB->GetOne("SELECT keyvalue FROM dbinfo WHERE keytype='dbversion'");
echo 'DB Current schema version: ' . $dbversion . PHP_EOL;
$schema_version = $DB->UpgradeDb();
echo 'DB schema version bumped to ' . $schema_version . PHP_EOL;
if ($dbversion < $schema_version) {
echo 'DB schema version bumped from ' . $dbversion . ' to ' . $schema_version . PHP_EOL;
}
break;
case 'plugins':
$plugin_manager = new LMSPluginManager();
Expand Down
24 changes: 19 additions & 5 deletions lib/LMSDB_common.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -786,14 +786,28 @@ public function UpgradeDb($dbver = DBVERSION, $pluginclass = null, $libdir = nul
}
}

if (!empty($pendingupgrades)) {
if (empty($pendingupgrades)) {
echo 'No pending upgrades' . PHP_EOL;
} else {
sort($pendingupgrades);
foreach ($pendingupgrades as $upgrade) {
include($libdir . DIRECTORY_SEPARATOR . 'upgradedb' . DIRECTORY_SEPARATOR . $filename_prefix . '.' . $upgrade . '.php');
if (empty($this->errors)) {
$lastupgrade = $upgrade;
} else {
$fname = $libdir . DIRECTORY_SEPARATOR . 'upgradedb'
. DIRECTORY_SEPARATOR . $filename_prefix . '.' . $upgrade . '.php';
$this->BeginTrans();
include($fname);
if ($this->errors) {
print 'Error in DB schema upgrade: ' . $fname . PHP_EOL;
$this->RollbackTrans();
break;
} else {
$this->Execute(
'UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?',
array($upgrade, 'dbversion')
);
$this->CommitTrans();
print 'Timestamp: ' . time() . ', DB version is now: '
. $upgrade . PHP_EOL;
$lastupgrade = $upgrade;
}
}
}
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'));
Loading