diff --git a/devel/dbinfo_version_bump.sh b/devel/dbinfo_version_bump.sh index cf50fd93e9..4bd00c1929 100755 --- a/devel/dbinfo_version_bump.sh +++ b/devel/dbinfo_version_bump.sh @@ -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 diff --git a/devel/upgradedb-template.php b/devel/upgradedb-template.php index 3a189677ec..a4595fc303 100644 --- a/devel/upgradedb-template.php +++ b/devel/upgradedb-template.php @@ -20,9 +20,3 @@ * USA. * */ - -$this->BeginTrans(); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('%version%', 'dbversion')); - -$this->CommitTrans(); diff --git a/devel/upgradedb.php b/devel/upgradedb.php index 9eb4f6c9e8..98b698c88a 100755 --- a/devel/upgradedb.php +++ b/devel/upgradedb.php @@ -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(); diff --git a/lib/LMSDB_common.class.php b/lib/LMSDB_common.class.php index 58783e3786..ecc5e0b04b 100644 --- a/lib/LMSDB_common.class.php +++ b/lib/LMSDB_common.class.php @@ -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; } } } diff --git a/lib/upgradedb/mysql.2004030800.php b/lib/upgradedb/mysql.2004030800.php index 3c4c6e5663..2f57e97673 100644 --- a/lib/upgradedb/mysql.2004030800.php +++ b/lib/upgradedb/mysql.2004030800.php @@ -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')); diff --git a/lib/upgradedb/mysql.2004031000.php b/lib/upgradedb/mysql.2004031000.php index 45d7384916..ed98cba8db 100644 --- a/lib/upgradedb/mysql.2004031000.php +++ b/lib/upgradedb/mysql.2004031000.php @@ -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')); diff --git a/lib/upgradedb/mysql.2004031100.php b/lib/upgradedb/mysql.2004031100.php index f157c7884d..ea5722bb5e 100644 --- a/lib/upgradedb/mysql.2004031100.php +++ b/lib/upgradedb/mysql.2004031100.php @@ -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')); diff --git a/lib/upgradedb/mysql.2004031400.php b/lib/upgradedb/mysql.2004031400.php index bbb5728780..ff930e30bd 100644 --- a/lib/upgradedb/mysql.2004031400.php +++ b/lib/upgradedb/mysql.2004031400.php @@ -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'"); diff --git a/lib/upgradedb/mysql.2004031401.php b/lib/upgradedb/mysql.2004031401.php index 93bf979fe0..b044d3fda2 100644 --- a/lib/upgradedb/mysql.2004031401.php +++ b/lib/upgradedb/mysql.2004031401.php @@ -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'"); diff --git a/lib/upgradedb/mysql.2004031402.php b/lib/upgradedb/mysql.2004031402.php index 9206725e9b..4188f60844 100644 --- a/lib/upgradedb/mysql.2004031402.php +++ b/lib/upgradedb/mysql.2004031402.php @@ -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')); diff --git a/lib/upgradedb/mysql.2004040701.php b/lib/upgradedb/mysql.2004040701.php index d22bd34139..8a8b620298 100644 --- a/lib/upgradedb/mysql.2004040701.php +++ b/lib/upgradedb/mysql.2004040701.php @@ -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')); diff --git a/lib/upgradedb/mysql.2004040800.php b/lib/upgradedb/mysql.2004040800.php index 141df532f8..ef8d2cd36d 100644 --- a/lib/upgradedb/mysql.2004040800.php +++ b/lib/upgradedb/mysql.2004040800.php @@ -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')); diff --git a/lib/upgradedb/mysql.2004041600.php b/lib/upgradedb/mysql.2004041600.php index 36b8dc81e5..45519f8ed9 100644 --- a/lib/upgradedb/mysql.2004041600.php +++ b/lib/upgradedb/mysql.2004041600.php @@ -42,4 +42,3 @@ UNIQUE KEY userassignment (usergroupid, userid) ) "); -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2004041600', 'dbversion')); diff --git a/lib/upgradedb/mysql.2004042000.php b/lib/upgradedb/mysql.2004042000.php index 50f67d1b01..56be455126 100644 --- a/lib/upgradedb/mysql.2004042000.php +++ b/lib/upgradedb/mysql.2004042000.php @@ -25,4 +25,3 @@ */ $this->Execute('ALTER TABLE nodes DROP INDEX mac'); -$this->Execute('UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?', array('2004042000', 'dbversion')); diff --git a/lib/upgradedb/mysql.2004042300.php b/lib/upgradedb/mysql.2004042300.php index 30d10a76f8..86dc5f3f65 100644 --- a/lib/upgradedb/mysql.2004042300.php +++ b/lib/upgradedb/mysql.2004042300.php @@ -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')); diff --git a/lib/upgradedb/mysql.2004061900.php b/lib/upgradedb/mysql.2004061900.php index 6e3824fbac..75716db458 100644 --- a/lib/upgradedb/mysql.2004061900.php +++ b/lib/upgradedb/mysql.2004061900.php @@ -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')); diff --git a/lib/upgradedb/mysql.2004070100.php b/lib/upgradedb/mysql.2004070100.php index aa1279eaf2..2fb33a4868 100644 --- a/lib/upgradedb/mysql.2004070100.php +++ b/lib/upgradedb/mysql.2004070100.php @@ -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')); diff --git a/lib/upgradedb/mysql.2004070800.php b/lib/upgradedb/mysql.2004070800.php index d26e5e8fa7..994f5df9bc 100644 --- a/lib/upgradedb/mysql.2004070800.php +++ b/lib/upgradedb/mysql.2004070800.php @@ -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')); diff --git a/lib/upgradedb/mysql.2004071200.php b/lib/upgradedb/mysql.2004071200.php index 407ea3a26c..58ea54f51c 100644 --- a/lib/upgradedb/mysql.2004071200.php +++ b/lib/upgradedb/mysql.2004071200.php @@ -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')); diff --git a/lib/upgradedb/mysql.2004071400.php b/lib/upgradedb/mysql.2004071400.php index 7177fc8b35..fdd1754b6b 100644 --- a/lib/upgradedb/mysql.2004071400.php +++ b/lib/upgradedb/mysql.2004071400.php @@ -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')); diff --git a/lib/upgradedb/mysql.2004072100.php b/lib/upgradedb/mysql.2004072100.php index aa194c565d..81aba6c7fa 100644 --- a/lib/upgradedb/mysql.2004072100.php +++ b/lib/upgradedb/mysql.2004072100.php @@ -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')); diff --git a/lib/upgradedb/mysql.2004072700.php b/lib/upgradedb/mysql.2004072700.php index 9002462b13..5abe380d0b 100644 --- a/lib/upgradedb/mysql.2004072700.php +++ b/lib/upgradedb/mysql.2004072700.php @@ -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')); diff --git a/lib/upgradedb/mysql.2004081400.php b/lib/upgradedb/mysql.2004081400.php index 2777ead876..d8b6e3292a 100644 --- a/lib/upgradedb/mysql.2004081400.php +++ b/lib/upgradedb/mysql.2004081400.php @@ -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')); diff --git a/lib/upgradedb/mysql.2004081700.php b/lib/upgradedb/mysql.2004081700.php index 6d04307265..133af120ce 100644 --- a/lib/upgradedb/mysql.2004081700.php +++ b/lib/upgradedb/mysql.2004081700.php @@ -23,5 +23,3 @@ * * $Id$ */ - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2004081700', 'dbversion')); diff --git a/lib/upgradedb/mysql.2004081800.php b/lib/upgradedb/mysql.2004081800.php index 221dc65f8a..98638f8315 100644 --- a/lib/upgradedb/mysql.2004081800.php +++ b/lib/upgradedb/mysql.2004081800.php @@ -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')); diff --git a/lib/upgradedb/mysql.2004090700.php b/lib/upgradedb/mysql.2004090700.php index be5123ba5a..ca11c54e42 100644 --- a/lib/upgradedb/mysql.2004090700.php +++ b/lib/upgradedb/mysql.2004090700.php @@ -25,5 +25,3 @@ */ $this->Execute("ALTER TABLE cash ADD INDEX (userid)"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2004090700', 'dbversion')); diff --git a/lib/upgradedb/mysql.2004090800.php b/lib/upgradedb/mysql.2004090800.php index 5e1f683ac6..83c00b786e 100644 --- a/lib/upgradedb/mysql.2004090800.php +++ b/lib/upgradedb/mysql.2004090800.php @@ -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')); diff --git a/lib/upgradedb/mysql.2004101800.php b/lib/upgradedb/mysql.2004101800.php index bfa457e8a4..d995aba3c9 100644 --- a/lib/upgradedb/mysql.2004101800.php +++ b/lib/upgradedb/mysql.2004101800.php @@ -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')); diff --git a/lib/upgradedb/mysql.2004102900.php b/lib/upgradedb/mysql.2004102900.php index f8a75bd8ba..72b8dbb5f7 100644 --- a/lib/upgradedb/mysql.2004102900.php +++ b/lib/upgradedb/mysql.2004102900.php @@ -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')); diff --git a/lib/upgradedb/mysql.2004111300.php b/lib/upgradedb/mysql.2004111300.php index 9898e44858..7344feb932 100644 --- a/lib/upgradedb/mysql.2004111300.php +++ b/lib/upgradedb/mysql.2004111300.php @@ -36,5 +36,3 @@ PRIMARY KEY (id) ) ENGINE=MyISAM "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2004111300', 'dbversion')); diff --git a/lib/upgradedb/mysql.2004111700.php b/lib/upgradedb/mysql.2004111700.php index f2be9c05f7..e64d66c9bd 100644 --- a/lib/upgradedb/mysql.2004111700.php +++ b/lib/upgradedb/mysql.2004111700.php @@ -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')); diff --git a/lib/upgradedb/mysql.2004112100.php b/lib/upgradedb/mysql.2004112100.php index 70c1204bba..8828571564 100644 --- a/lib/upgradedb/mysql.2004112100.php +++ b/lib/upgradedb/mysql.2004112100.php @@ -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')); diff --git a/lib/upgradedb/mysql.2004112400.php b/lib/upgradedb/mysql.2004112400.php index 6130badbdc..e804026db7 100644 --- a/lib/upgradedb/mysql.2004112400.php +++ b/lib/upgradedb/mysql.2004112400.php @@ -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')); diff --git a/lib/upgradedb/mysql.2004112600.php b/lib/upgradedb/mysql.2004112600.php index e8b605e361..83711acc45 100644 --- a/lib/upgradedb/mysql.2004112600.php +++ b/lib/upgradedb/mysql.2004112600.php @@ -35,5 +35,3 @@ PRIMARY KEY (id) ) ENGINE=MyISAM "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2004112600', 'dbversion')); diff --git a/lib/upgradedb/mysql.2004112700.php b/lib/upgradedb/mysql.2004112700.php index 75cb2684c6..afdd752839 100644 --- a/lib/upgradedb/mysql.2004112700.php +++ b/lib/upgradedb/mysql.2004112700.php @@ -25,4 +25,3 @@ */ //$this->Execute("ALTER TABLE uiconfig ADD UNIQUE (section, var)"); -$this->Execute("UPDATE dbinfo SET keyvalue='2004112700' WHERE keytype='dbversion'"); diff --git a/lib/upgradedb/mysql.2004120300.php b/lib/upgradedb/mysql.2004120300.php index d3fe3aac61..d3aad39f48 100644 --- a/lib/upgradedb/mysql.2004120300.php +++ b/lib/upgradedb/mysql.2004120300.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" CREATE TABLE domains ( id int(11) NOT NULL auto_increment, @@ -41,6 +40,3 @@ } } $this->Execute('ALTER TABLE passwd DROP domain'); - -$this->Execute("UPDATE dbinfo SET keyvalue = '2004120300' WHERE keytype = 'dbversion'"); -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2004120400.php b/lib/upgradedb/mysql.2004120400.php index 7381488dae..1596a6739c 100644 --- a/lib/upgradedb/mysql.2004120400.php +++ b/lib/upgradedb/mysql.2004120400.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" CREATE TABLE aliases ( id int(11) NOT NULL auto_increment, @@ -34,5 +33,3 @@ UNIQUE KEY (login) ) ENGINE=MyISAM "); -$this->Execute("UPDATE dbinfo SET keyvalue = '2004120400' WHERE keytype = 'dbversion'"); -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2004120600.php b/lib/upgradedb/mysql.2004120600.php index 0990051db2..589ef974b2 100644 --- a/lib/upgradedb/mysql.2004120600.php +++ b/lib/upgradedb/mysql.2004120600.php @@ -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(); diff --git a/lib/upgradedb/mysql.2004121000.php b/lib/upgradedb/mysql.2004121000.php index 81d5684bb9..941ee230be 100644 --- a/lib/upgradedb/mysql.2004121000.php +++ b/lib/upgradedb/mysql.2004121000.php @@ -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(); diff --git a/lib/upgradedb/mysql.2005012600.php b/lib/upgradedb/mysql.2005012600.php index d6c68e6064..3665183ee8 100644 --- a/lib/upgradedb/mysql.2005012600.php +++ b/lib/upgradedb/mysql.2005012600.php @@ -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')); diff --git a/lib/upgradedb/mysql.2005012700.php b/lib/upgradedb/mysql.2005012700.php index ca67dc4615..c78025ddf3 100644 --- a/lib/upgradedb/mysql.2005012700.php +++ b/lib/upgradedb/mysql.2005012700.php @@ -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')); diff --git a/lib/upgradedb/mysql.2005013000.php b/lib/upgradedb/mysql.2005013000.php index fffc20486b..4f45bc9f4e 100644 --- a/lib/upgradedb/mysql.2005013000.php +++ b/lib/upgradedb/mysql.2005013000.php @@ -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;"); @@ -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(); diff --git a/lib/upgradedb/mysql.2005020600.php b/lib/upgradedb/mysql.2005020600.php index 87c98619cc..ca6941e541 100644 --- a/lib/upgradedb/mysql.2005020600.php +++ b/lib/upgradedb/mysql.2005020600.php @@ -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(); diff --git a/lib/upgradedb/mysql.2005021500.php b/lib/upgradedb/mysql.2005021500.php index dd621045cd..f2e306b08c 100644 --- a/lib/upgradedb/mysql.2005021500.php +++ b/lib/upgradedb/mysql.2005021500.php @@ -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')); diff --git a/lib/upgradedb/mysql.2005022300.php b/lib/upgradedb/mysql.2005022300.php index 1e0d1f06c2..d8e2023ddb 100644 --- a/lib/upgradedb/mysql.2005022300.php +++ b/lib/upgradedb/mysql.2005022300.php @@ -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')); diff --git a/lib/upgradedb/mysql.2005022500.php b/lib/upgradedb/mysql.2005022500.php index d8458fc5a3..7d9950de2f 100644 --- a/lib/upgradedb/mysql.2005022500.php +++ b/lib/upgradedb/mysql.2005022500.php @@ -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(); diff --git a/lib/upgradedb/mysql.2005030100.php b/lib/upgradedb/mysql.2005030100.php index e8a909a466..133af120ce 100644 --- a/lib/upgradedb/mysql.2005030100.php +++ b/lib/upgradedb/mysql.2005030100.php @@ -23,9 +23,3 @@ * * $Id$ */ - -$this->BeginTrans(); - -$this->Execute("UPDATE dbinfo SET keyvalue = '2005030100' WHERE keytype = 'dbversion'"); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2005030200.php b/lib/upgradedb/mysql.2005030200.php index 268e3f7071..4f921d2cd4 100644 --- a/lib/upgradedb/mysql.2005030200.php +++ b/lib/upgradedb/mysql.2005030200.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("CREATE INDEX netdev ON nodes(netdev)"); $this->Execute("CREATE INDEX queueid ON rttickets(queueid)"); @@ -32,7 +31,3 @@ $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(); diff --git a/lib/upgradedb/mysql.2005030800.php b/lib/upgradedb/mysql.2005030800.php index dff501ec6f..0e8dbe2023 100644 --- a/lib/upgradedb/mysql.2005030800.php +++ b/lib/upgradedb/mysql.2005030800.php @@ -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')); diff --git a/lib/upgradedb/mysql.2005031000.php b/lib/upgradedb/mysql.2005031000.php index 896fdc411d..4af22352bd 100644 --- a/lib/upgradedb/mysql.2005031000.php +++ b/lib/upgradedb/mysql.2005031000.php @@ -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')); diff --git a/lib/upgradedb/mysql.2005033000.php b/lib/upgradedb/mysql.2005033000.php index 04223cc093..d2c8c15db6 100644 --- a/lib/upgradedb/mysql.2005033000.php +++ b/lib/upgradedb/mysql.2005033000.php @@ -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')); diff --git a/lib/upgradedb/mysql.2005033100.php b/lib/upgradedb/mysql.2005033100.php index 960c37c550..0c0eb35959 100644 --- a/lib/upgradedb/mysql.2005033100.php +++ b/lib/upgradedb/mysql.2005033100.php @@ -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')); diff --git a/lib/upgradedb/mysql.2005033101.php b/lib/upgradedb/mysql.2005033101.php index daa93fa29d..27e256255f 100644 --- a/lib/upgradedb/mysql.2005033101.php +++ b/lib/upgradedb/mysql.2005033101.php @@ -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')); diff --git a/lib/upgradedb/mysql.2005033102.php b/lib/upgradedb/mysql.2005033102.php index 2fe2297608..a4e5dfa2de 100644 --- a/lib/upgradedb/mysql.2005033102.php +++ b/lib/upgradedb/mysql.2005033102.php @@ -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')); diff --git a/lib/upgradedb/mysql.2005033103.php b/lib/upgradedb/mysql.2005033103.php index 07f8b27c63..b6000d3ef5 100644 --- a/lib/upgradedb/mysql.2005033103.php +++ b/lib/upgradedb/mysql.2005033103.php @@ -57,5 +57,3 @@ PRIMARY KEY (id), UNIQUE KEY instanceid (instanceid, var)) "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2005033103', 'dbversion')); diff --git a/lib/upgradedb/mysql.2005042100.php b/lib/upgradedb/mysql.2005042100.php index 389982f2a1..fb1ff41127 100644 --- a/lib/upgradedb/mysql.2005042100.php +++ b/lib/upgradedb/mysql.2005042100.php @@ -25,4 +25,3 @@ */ $this->Execute("ALTER TABLE admins ADD hosts varchar(255) DEFAULT '' NOT NULL"); -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2005042100', 'dbversion')); diff --git a/lib/upgradedb/mysql.2005042400.php b/lib/upgradedb/mysql.2005042400.php index c648a3845b..743614c26c 100644 --- a/lib/upgradedb/mysql.2005042400.php +++ b/lib/upgradedb/mysql.2005042400.php @@ -25,4 +25,3 @@ */ $this->Execute("ALTER TABLE nodes ADD ipaddr_pub int(16) unsigned DEFAULT '0' NOT NULL"); -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2005042400', 'dbversion')); diff --git a/lib/upgradedb/mysql.2005052300.php b/lib/upgradedb/mysql.2005052300.php index f405b32468..174feeb618 100644 --- a/lib/upgradedb/mysql.2005052300.php +++ b/lib/upgradedb/mysql.2005052300.php @@ -34,5 +34,3 @@ $this->Execute("ALTER TABLE userassignments CHANGE userid customerid INT(11) DEFAULT '0' NOT NULL"); $this->Execute("ALTER TABLE userassignments DROP INDEX userassignment"); $this->Execute("ALTER TABLE userassignments ADD UNIQUE (usergroupid, customerid)"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2005052300', 'dbversion')); diff --git a/lib/upgradedb/mysql.2005052600.php b/lib/upgradedb/mysql.2005052600.php index 1927c9fa07..3cae1a5473 100644 --- a/lib/upgradedb/mysql.2005052600.php +++ b/lib/upgradedb/mysql.2005052600.php @@ -31,5 +31,3 @@ $this->Execute("RENAME TABLE usergroups TO customergroups"); $this->Execute("RENAME TABLE users TO customers"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2005052600', 'dbversion')); diff --git a/lib/upgradedb/mysql.2005052700.php b/lib/upgradedb/mysql.2005052700.php index f8a7262fd4..90a2ce8ecb 100644 --- a/lib/upgradedb/mysql.2005052700.php +++ b/lib/upgradedb/mysql.2005052700.php @@ -37,5 +37,3 @@ $this->Execute("ALTER TABLE eventassignments ADD UNIQUE (eventid, userid)"); $this->Execute("RENAME TABLE admins TO users"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2005052700', 'dbversion')); diff --git a/lib/upgradedb/mysql.2005052800.php b/lib/upgradedb/mysql.2005052800.php index 7353146bfe..133af120ce 100644 --- a/lib/upgradedb/mysql.2005052800.php +++ b/lib/upgradedb/mysql.2005052800.php @@ -23,5 +23,3 @@ * * $Id$ */ - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2005052800', 'dbversion')); diff --git a/lib/upgradedb/mysql.2005060300.php b/lib/upgradedb/mysql.2005060300.php index 77279e14cf..cf85937723 100644 --- a/lib/upgradedb/mysql.2005060300.php +++ b/lib/upgradedb/mysql.2005060300.php @@ -67,5 +67,3 @@ description varchar(255) NOT NULL DEFAULT '', INDEX docid (docid)) "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2005060300', 'dbversion')); diff --git a/lib/upgradedb/mysql.2005060400.php b/lib/upgradedb/mysql.2005060400.php index cd34cb17f6..6e20a47e16 100644 --- a/lib/upgradedb/mysql.2005060400.php +++ b/lib/upgradedb/mysql.2005060400.php @@ -26,5 +26,3 @@ $this->Execute("ALTER TABLE cash ADD reference INT(11) DEFAULT '0' NOT NULL"); $this->Execute("ALTER TABLE cash ADD INDEX reference (reference)"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2005060400', 'dbversion')); diff --git a/lib/upgradedb/mysql.2005061200.php b/lib/upgradedb/mysql.2005061200.php index be66bd3d6c..6549f6a528 100644 --- a/lib/upgradedb/mysql.2005061200.php +++ b/lib/upgradedb/mysql.2005061200.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" CREATE TABLE taxes ( @@ -69,7 +68,3 @@ $this->Execute("ALTER TABLE cash DROP taxvalue"); $this->Execute("ALTER TABLE tariffs DROP taxvalue"); $this->Execute("ALTER TABLE invoicecontents DROP taxvalue"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2005061200', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2005062100.php b/lib/upgradedb/mysql.2005062100.php index 8a09eca0ce..7ebb14d168 100644 --- a/lib/upgradedb/mysql.2005062100.php +++ b/lib/upgradedb/mysql.2005062100.php @@ -26,5 +26,3 @@ $this->Execute("ALTER TABLE tariffs CHANGE pkwiu prodid varchar(255) DEFAULT '' NOT NULL"); $this->Execute("ALTER TABLE invoicecontents CHANGE pkwiu prodid varchar(255) DEFAULT '' NOT NULL"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2005062100', 'dbversion')); diff --git a/lib/upgradedb/mysql.2005062600.php b/lib/upgradedb/mysql.2005062600.php index 789245358f..8eeff3707c 100644 --- a/lib/upgradedb/mysql.2005062600.php +++ b/lib/upgradedb/mysql.2005062600.php @@ -25,5 +25,3 @@ */ $this->Execute("ALTER TABLE customers CHANGE gguin im int(11) DEFAULT '0' NOT NULL"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2005062600', 'dbversion')); diff --git a/lib/upgradedb/mysql.2005072000.php b/lib/upgradedb/mysql.2005072000.php index fde91c0de4..7cc11f0b2b 100644 --- a/lib/upgradedb/mysql.2005072000.php +++ b/lib/upgradedb/mysql.2005072000.php @@ -37,5 +37,3 @@ INDEX md5sum (md5sum), UNIQUE KEY docid (docid)) "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2005072000', 'dbversion')); diff --git a/lib/upgradedb/mysql.2005072300.php b/lib/upgradedb/mysql.2005072300.php index 5c65f994d7..f0b346e29b 100644 --- a/lib/upgradedb/mysql.2005072300.php +++ b/lib/upgradedb/mysql.2005072300.php @@ -31,5 +31,3 @@ $this->Execute("ALTER TABLE payments CHANGE at at smallint DEFAULT '0' NOT NULL"); $this->Execute("ALTER TABLE payments CHANGE period period smallint DEFAULT '0' NOT NULL"); $this->Execute("UPDATE payments SET period = period + 2"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2005072300', 'dbversion')); diff --git a/lib/upgradedb/mysql.2005080300.php b/lib/upgradedb/mysql.2005080300.php index 1573b4c785..b4279dc244 100644 --- a/lib/upgradedb/mysql.2005080300.php +++ b/lib/upgradedb/mysql.2005080300.php @@ -41,7 +41,6 @@ array('receipts', 'monthly_numbering', 0) ); -$this->BeginTrans(); $this->Execute(" CREATE TABLE numberplans ( @@ -67,7 +66,3 @@ $this->Execute("UPDATE documents SET numberplanid = 1 WHERE type = 1"); $this->Execute("UPDATE documents SET numberplanid = 2 WHERE type = 2"); $this->Execute("ALTER TABLE documents ADD INDEX numberplanid (numberplanid)"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2005080300', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2005082700.php b/lib/upgradedb/mysql.2005082700.php index bdaf8c0fdd..9e9f940c04 100644 --- a/lib/upgradedb/mysql.2005082700.php +++ b/lib/upgradedb/mysql.2005082700.php @@ -26,5 +26,3 @@ $this->Execute("ALTER TABLE documents ADD closed tinyint(1) DEFAULT '0' NOT NULL"); $this->Execute("ALTER TABLE cash DROP reference"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2005082700', 'dbversion')); diff --git a/lib/upgradedb/mysql.2005082900.php b/lib/upgradedb/mysql.2005082900.php index 8c5164a546..222cdc4382 100644 --- a/lib/upgradedb/mysql.2005082900.php +++ b/lib/upgradedb/mysql.2005082900.php @@ -35,5 +35,3 @@ ) ENGINE=MyISAM"); $this->Execute("INSERT INTO hosts (id, name, description, lastreload, reload) SELECT id, name, description, lastreload, reload FROM daemonhosts"); $this->Execute("DROP TABLE daemonhosts"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2005082900', 'dbversion')); diff --git a/lib/upgradedb/mysql.2005090700.php b/lib/upgradedb/mysql.2005090700.php index 764419b4c0..a5e15df4e1 100644 --- a/lib/upgradedb/mysql.2005090700.php +++ b/lib/upgradedb/mysql.2005090700.php @@ -25,5 +25,3 @@ */ $this->Execute("ALTER TABLE documents ADD reference int(11) DEFAULT '0' NOT NULL"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2005090700', 'dbversion')); diff --git a/lib/upgradedb/mysql.2005101700.php b/lib/upgradedb/mysql.2005101700.php index 6eec80d5f6..651220fe0e 100644 --- a/lib/upgradedb/mysql.2005101700.php +++ b/lib/upgradedb/mysql.2005101700.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $lastupgrade = $this->GetOne("SELECT keyvalue FROM dbinfo where keytype='dbversion'"); @@ -44,7 +43,3 @@ // "type" values after change: // 1 - cash operations // 0 - non-cash operations - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2005101700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2005110600.php b/lib/upgradedb/mysql.2005110600.php index 1aec67b550..9acd4b279a 100644 --- a/lib/upgradedb/mysql.2005110600.php +++ b/lib/upgradedb/mysql.2005110600.php @@ -36,5 +36,3 @@ PRIMARY KEY (id) ) ENGINE=MyISAM "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2005110600', 'dbversion')); diff --git a/lib/upgradedb/mysql.2005122800.php b/lib/upgradedb/mysql.2005122800.php index 8aecd3907a..88d315511c 100644 --- a/lib/upgradedb/mysql.2005122800.php +++ b/lib/upgradedb/mysql.2005122800.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $create_reg = $this->GetOne('SELECT docid FROM receiptcontents LIMIT 1'); @@ -56,7 +55,3 @@ if ($create_reg) { $this->Execute("INSERT INTO cashregs (name) VALUES ('default')"); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2005122800', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2005123000.php b/lib/upgradedb/mysql.2005123000.php index 78b09810e1..81e0ba8c14 100644 --- a/lib/upgradedb/mysql.2005123000.php +++ b/lib/upgradedb/mysql.2005123000.php @@ -24,9 +24,5 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("ALTER TABLE cashregs ADD COLUMN disabled tinyint(1) NOT NULL DEFAULT '0'"); -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2005123000', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2006011200.php b/lib/upgradedb/mysql.2006011200.php index b966b22b99..cb1133992f 100644 --- a/lib/upgradedb/mysql.2006011200.php +++ b/lib/upgradedb/mysql.2006011200.php @@ -24,9 +24,5 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("ALTER TABLE documents ADD COLUMN extnumber varchar(255) NOT NULL DEFAULT ''"); -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2006011200', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2006011300.php b/lib/upgradedb/mysql.2006011300.php index ab7c943ffa..568125d78f 100644 --- a/lib/upgradedb/mysql.2006011300.php +++ b/lib/upgradedb/mysql.2006011300.php @@ -24,9 +24,5 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("ALTER TABLE assignments ADD COLUMN settlement tinyint(1) NOT NULL DEFAULT '0'"); -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2006011300', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2006020500.php b/lib/upgradedb/mysql.2006020500.php index f754eebdcd..fe5eafa674 100644 --- a/lib/upgradedb/mysql.2006020500.php +++ b/lib/upgradedb/mysql.2006020500.php @@ -24,9 +24,5 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("ALTER TABLE invoicecontents ADD COLUMN discount decimal(4,2) NOT NULL default '0.00'"); -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2006020500', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2006061200.php b/lib/upgradedb/mysql.2006061200.php index 5100db134a..f92c739cba 100644 --- a/lib/upgradedb/mysql.2006061200.php +++ b/lib/upgradedb/mysql.2006061200.php @@ -24,14 +24,9 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("ALTER TABLE passwd ADD COLUMN quota_sql int(11) NOT NULL default '0'"); $this->Execute("ALTER TABLE domains ADD COLUMN ownerid int(11) NOT NULL default '0'"); $this->Execute("ALTER TABLE passwd ADD INDEX ownerid (ownerid)"); $this->Execute("ALTER TABLE domains ADD INDEX ownerid (ownerid)"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2006061200', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2006081000.php b/lib/upgradedb/mysql.2006081000.php index 5fca30aec0..58e90ca1ea 100644 --- a/lib/upgradedb/mysql.2006081000.php +++ b/lib/upgradedb/mysql.2006081000.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); // REGON (Business Registration Number) $this->Execute("ALTER TABLE customers ADD COLUMN regon varchar(255) NOT NULL DEFAULT ''"); @@ -39,7 +38,3 @@ // Account names (logins) will be unique only in one domain context $this->Execute("ALTER TABLE passwd DROP KEY login"); $this->Execute("ALTER TABLE passwd ADD UNIQUE KEY (login, domainid)"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2006081000', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2006082300.php b/lib/upgradedb/mysql.2006082300.php index 42e7615deb..c7409be6b3 100644 --- a/lib/upgradedb/mysql.2006082300.php +++ b/lib/upgradedb/mysql.2006082300.php @@ -24,12 +24,7 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("ALTER TABLE assignments ADD COLUMN nodeid int(11) NOT NULL DEFAULT '0'"); $this->Execute("ALTER TABLE assignments ADD INDEX nodeid (nodeid)"); $this->Execute("ALTER TABLE assignments ADD INDEX customerid (customerid)"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2006082300', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2006082700.php b/lib/upgradedb/mysql.2006082700.php index b045274651..eb0389d1b0 100644 --- a/lib/upgradedb/mysql.2006082700.php +++ b/lib/upgradedb/mysql.2006082700.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); /* tariffs with nodes many-to-many assignments */ @@ -47,7 +46,3 @@ } $this->Execute("ALTER TABLE assignments DROP COLUMN nodeid"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2006082700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2006092400.php b/lib/upgradedb/mysql.2006092400.php index 7dc6554349..10f0ea06d0 100644 --- a/lib/upgradedb/mysql.2006092400.php +++ b/lib/upgradedb/mysql.2006092400.php @@ -24,10 +24,5 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("ALTER TABLE customers ADD notes text NOT NULL DEFAULT ''"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2006092400', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2006100700.php b/lib/upgradedb/mysql.2006100700.php index 01edc01137..1d406d4c31 100644 --- a/lib/upgradedb/mysql.2006100700.php +++ b/lib/upgradedb/mysql.2006100700.php @@ -24,10 +24,5 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("ALTER TABLE nodes ADD chkmac tinyint(1) NOT NULL DEFAULT '1'"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2006100700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2006110700.php b/lib/upgradedb/mysql.2006110700.php index 9cba7d9e64..a7dc35d3cd 100644 --- a/lib/upgradedb/mysql.2006110700.php +++ b/lib/upgradedb/mysql.2006110700.php @@ -24,10 +24,5 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("ALTER TABLE rttickets ADD cause tinyint(4) NOT NULL DEFAULT '0'"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2006110700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2006111100.php b/lib/upgradedb/mysql.2006111100.php index e88661a124..3abdad9f9d 100644 --- a/lib/upgradedb/mysql.2006111100.php +++ b/lib/upgradedb/mysql.2006111100.php @@ -24,11 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("ALTER TABLE rttickets ADD INDEX createtime (createtime)"); $this->Execute("ALTER TABLE rttickets ADD INDEX customerid (customerid)"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2006111100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2007011200.php b/lib/upgradedb/mysql.2007011200.php index 47f808e42f..568d6573d8 100644 --- a/lib/upgradedb/mysql.2007011200.php +++ b/lib/upgradedb/mysql.2007011200.php @@ -24,11 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("ALTER TABLE nodes ADD INDEX ownerid (ownerid)"); $this->Execute("ALTER TABLE nodes ADD INDEX ipaddr_pub (ipaddr_pub)"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2007011200', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2007012500.php b/lib/upgradedb/mysql.2007012500.php index 8efb4ed93c..489c6ccb94 100644 --- a/lib/upgradedb/mysql.2007012500.php +++ b/lib/upgradedb/mysql.2007012500.php @@ -24,11 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("ALTER TABLE nodes ADD halfduplex tinyint(1) NOT NULL DEFAULT '0'"); $this->Execute("ALTER TABLE tariffs ADD dlimit int(11) NOT NULL DEFAULT '0'"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2007012500', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2007021500.php b/lib/upgradedb/mysql.2007021500.php index 2bd11c74df..2dd7fecbf8 100644 --- a/lib/upgradedb/mysql.2007021500.php +++ b/lib/upgradedb/mysql.2007021500.php @@ -24,13 +24,8 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("UPDATE documents SET closed = 1 WHERE type = 2"); $this->Execute("UPDATE cashrights SET rights = 63 WHERE rights = 2"); $this->Execute("UPDATE cashrights SET rights = 319 WHERE rights = 3"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2007021500', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2007022100.php b/lib/upgradedb/mysql.2007022100.php index 4583acc5cb..8d9da84315 100644 --- a/lib/upgradedb/mysql.2007022100.php +++ b/lib/upgradedb/mysql.2007022100.php @@ -24,11 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("UPDATE rtrights SET rights = 7 WHERE rights = 2"); $this->Execute("UPDATE rtrights SET rights = 15 WHERE rights = 3"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2007022100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2007022200.php b/lib/upgradedb/mysql.2007022200.php index 540534d864..25880b38be 100644 --- a/lib/upgradedb/mysql.2007022200.php +++ b/lib/upgradedb/mysql.2007022200.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("ALTER TABLE rtmessages ADD INDEX ticketid (ticketid)"); $this->Execute(" @@ -38,7 +37,3 @@ INDEX ticketid (ticketid) ) ENGINE=MyISAM; "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2007022200', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2007022600.php b/lib/upgradedb/mysql.2007022600.php index 9e0800aaa9..f9c0d6285e 100644 --- a/lib/upgradedb/mysql.2007022600.php +++ b/lib/upgradedb/mysql.2007022600.php @@ -24,10 +24,5 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("ALTER TABLE documents ADD INDEX customerid (customerid)"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2007022600', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2007030800.php b/lib/upgradedb/mysql.2007030800.php index 1d164270fd..b602ab3234 100644 --- a/lib/upgradedb/mysql.2007030800.php +++ b/lib/upgradedb/mysql.2007030800.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" CREATE TABLE ewx_stm_nodes ( @@ -66,7 +65,3 @@ UNIQUE KEY nodeid (nodeid) ) ENGINE=MyISAM "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2007030800', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2007032600.php b/lib/upgradedb/mysql.2007032600.php index 5e57cea774..b1038a8d0e 100644 --- a/lib/upgradedb/mysql.2007032600.php +++ b/lib/upgradedb/mysql.2007032600.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" @@ -39,7 +38,3 @@ UNIQUE KEY regid (regid, time) ); "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2007032600', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2007033100.php b/lib/upgradedb/mysql.2007033100.php index c961be202c..aad576586b 100644 --- a/lib/upgradedb/mysql.2007033100.php +++ b/lib/upgradedb/mysql.2007033100.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" CREATE TABLE imessengers ( @@ -41,7 +40,3 @@ SELECT id, im FROM customers WHERE im > 0"); $this->Execute("ALTER TABLE customers DROP im"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2007033100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2007041200.php b/lib/upgradedb/mysql.2007041200.php index 3dedb4daac..834f1a0f24 100644 --- a/lib/upgradedb/mysql.2007041200.php +++ b/lib/upgradedb/mysql.2007041200.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("ALTER TABLE cashreglog ADD snapshot decimal(9,2) NOT NULL DEFAULT '0'"); @@ -45,7 +44,3 @@ ); } } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2007041200', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2007053100.php b/lib/upgradedb/mysql.2007053100.php index f068d56117..6ab7a7841a 100644 --- a/lib/upgradedb/mysql.2007053100.php +++ b/lib/upgradedb/mysql.2007053100.php @@ -24,10 +24,5 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("ALTER TABLE documents ADD reason varchar(255) NOT NULL DEFAULT ''"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2007053100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2007062100.php b/lib/upgradedb/mysql.2007062100.php index 653c773f47..5451cea69d 100644 --- a/lib/upgradedb/mysql.2007062100.php +++ b/lib/upgradedb/mysql.2007062100.php @@ -24,10 +24,5 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("DROP TABLE timestamps"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2007062100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2007062200.php b/lib/upgradedb/mysql.2007062200.php index 1af7225bfe..6aeaba76a7 100644 --- a/lib/upgradedb/mysql.2007062200.php +++ b/lib/upgradedb/mysql.2007062200.php @@ -24,10 +24,5 @@ * $Id$ */ -$this->BeginTrans(); /* postgresql fix */ - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2007062200', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2007070400.php b/lib/upgradedb/mysql.2007070400.php index 34533f853b..1f4c57513b 100644 --- a/lib/upgradedb/mysql.2007070400.php +++ b/lib/upgradedb/mysql.2007070400.php @@ -24,11 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("ALTER TABLE documentcontents ADD INDEX fromdate (fromdate)"); $this->Execute("ALTER TABLE documentcontents ADD INDEX todate (todate)"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2007070400', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2007071100.php b/lib/upgradedb/mysql.2007071100.php index 00897b3c7c..f201228691 100644 --- a/lib/upgradedb/mysql.2007071100.php +++ b/lib/upgradedb/mysql.2007071100.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" CREATE TABLE customercontacts ( @@ -58,7 +57,3 @@ $this->Execute('ALTER TABLE customers DROP phone1'); $this->Execute('ALTER TABLE customers DROP phone2'); $this->Execute('ALTER TABLE customers DROP phone3'); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2007071100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2007071600.php b/lib/upgradedb/mysql.2007071600.php index b191e36050..e1034c88d7 100644 --- a/lib/upgradedb/mysql.2007071600.php +++ b/lib/upgradedb/mysql.2007071600.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" CREATE TABLE excludedgroups ( @@ -49,7 +48,3 @@ JOIN excludedgroups e ON (a.customergroupid = e.customergroupid) WHERE e.userid = lms_current_user() AND a.customerid = c.id) "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2007071600', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2007080100.php b/lib/upgradedb/mysql.2007080100.php index bdc5cf0839..133af120ce 100644 --- a/lib/upgradedb/mysql.2007080100.php +++ b/lib/upgradedb/mysql.2007080100.php @@ -23,9 +23,3 @@ * * $Id$ */ - -$this->BeginTrans(); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2007080100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2007101000.php b/lib/upgradedb/mysql.2007101000.php index 4b0eb31ba8..e9c22b1433 100644 --- a/lib/upgradedb/mysql.2007101000.php +++ b/lib/upgradedb/mysql.2007101000.php @@ -24,10 +24,5 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("ALTER TABLE nodes CHANGE name name varchar(32)"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2007101000', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2007101700.php b/lib/upgradedb/mysql.2007101700.php index bb933b7e1e..578d2276f1 100644 --- a/lib/upgradedb/mysql.2007101700.php +++ b/lib/upgradedb/mysql.2007101700.php @@ -24,11 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("ALTER TABLE nodes CHANGE name name varchar(32) NOT NULL DEFAULT ''"); $this->Execute("ALTER TABLE users ADD position varchar(255) NOT NULL DEFAULT ''"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2007101700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2007102600.php b/lib/upgradedb/mysql.2007102600.php index 43fc872432..0feaa67b46 100644 --- a/lib/upgradedb/mysql.2007102600.php +++ b/lib/upgradedb/mysql.2007102600.php @@ -24,10 +24,5 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("ALTER TABLE netdevices ADD purchasetime INT(11) NOT NULL DEFAULT '0', ADD guaranteeperiod TINYINT UNSIGNED DEFAULT '0'"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2007102600', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2007110600.php b/lib/upgradedb/mysql.2007110600.php index 89f49d1556..c1e9c94c9c 100644 --- a/lib/upgradedb/mysql.2007110600.php +++ b/lib/upgradedb/mysql.2007110600.php @@ -24,11 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("ALTER TABLE rttickets ADD creatorid int(11) NOT NULL DEFAULT '0'"); $this->Execute("ALTER TABLE rttickets ADD INDEX creatorid (creatorid)"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2007110600', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2007111400.php b/lib/upgradedb/mysql.2007111400.php index acfdf1e0cd..a70c8d14f1 100644 --- a/lib/upgradedb/mysql.2007111400.php +++ b/lib/upgradedb/mysql.2007111400.php @@ -24,12 +24,7 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("ALTER TABLE tariffs ADD type tinyint NOT NULL DEFAULT '1'"); $this->Execute("UPDATE tariffs SET type=1"); $this->Execute("ALTER TABLE tariffs ADD INDEX type (type)"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2007111400', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2007120300.php b/lib/upgradedb/mysql.2007120300.php index e88f400497..3330c89b3e 100644 --- a/lib/upgradedb/mysql.2007120300.php +++ b/lib/upgradedb/mysql.2007120300.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("ALTER TABLE customers ADD cutoffstop int(11) NOT NULL DEFAULT '0'"); @@ -35,7 +34,3 @@ SELECT 1 FROM customerassignments a JOIN excludedgroups e ON (a.customergroupid = e.customergroupid) WHERE e.userid = lms_current_user() AND a.customerid = c.id)"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2007120300', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2008010400.php b/lib/upgradedb/mysql.2008010400.php index c2e60a331c..2c18da8919 100644 --- a/lib/upgradedb/mysql.2008010400.php +++ b/lib/upgradedb/mysql.2008010400.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" CREATE TABLE nodegroups ( @@ -44,7 +43,3 @@ UNIQUE KEY nodeid (nodeid, nodegroupid) ); "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2008010400', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2008010700.php b/lib/upgradedb/mysql.2008010700.php index afd87f95b1..f34d0a6275 100644 --- a/lib/upgradedb/mysql.2008010700.php +++ b/lib/upgradedb/mysql.2008010700.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("ALTER TABLE nodegroups ADD prio int(11) NOT NULL DEFAULT '0'"); @@ -40,7 +39,3 @@ $prio++; } } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2008010700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2008011800.php b/lib/upgradedb/mysql.2008011800.php index 1b005cc74c..df3314e860 100644 --- a/lib/upgradedb/mysql.2008011800.php +++ b/lib/upgradedb/mysql.2008011800.php @@ -24,12 +24,7 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("ALTER TABLE nodes ADD port smallint NOT NULL DEFAULT '0'"); $this->Execute("ALTER TABLE netlinks ADD srcport smallint NOT NULL DEFAULT '0'"); $this->Execute("ALTER TABLE netlinks ADD dstport smallint NOT NULL DEFAULT '0'"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2008011800', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2008012200.php b/lib/upgradedb/mysql.2008012200.php index d3853c3daa..b753a5fa51 100644 --- a/lib/upgradedb/mysql.2008012200.php +++ b/lib/upgradedb/mysql.2008012200.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" CREATE FUNCTION mask2prefix(mask bigint) RETURNS smallint DETERMINISTIC @@ -35,7 +34,3 @@ CREATE FUNCTION broadcast(address bigint, mask bigint) RETURNS bigint DETERMINISTIC RETURN address + (pow(2, (32-mask2prefix(mask)))-1); "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2008012200', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2008020900.php b/lib/upgradedb/mysql.2008020900.php index 359033ce8b..5b5d1914f0 100644 --- a/lib/upgradedb/mysql.2008020900.php +++ b/lib/upgradedb/mysql.2008020900.php @@ -24,14 +24,9 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("DROP FUNCTION IF EXISTS int2txt"); $this->Execute(" CREATE FUNCTION int2txt(num bigint) RETURNS char(20) DETERMINISTIC RETURN CAST(num AS char(20)); "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2008020900', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2008021500.php b/lib/upgradedb/mysql.2008021500.php index 7a91414c47..1fc285a5c1 100644 --- a/lib/upgradedb/mysql.2008021500.php +++ b/lib/upgradedb/mysql.2008021500.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" CREATE TABLE aliasassignments ( @@ -44,7 +43,3 @@ $this->Execute("ALTER TABLE aliases DROP accountid"); $this->Execute("ALTER TABLE aliases ADD UNIQUE KEY (login, domainid)"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2008021500', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2008021900.php b/lib/upgradedb/mysql.2008021900.php index 7895d90ee3..9e58f1a7f2 100644 --- a/lib/upgradedb/mysql.2008021900.php +++ b/lib/upgradedb/mysql.2008021900.php @@ -24,10 +24,5 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("ALTER TABLE passwd ADD mail_forward varchar(255) NOT NULL DEFAULT ''"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2008021900', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2008022000.php b/lib/upgradedb/mysql.2008022000.php index 440d0b0c6f..44bf49685a 100644 --- a/lib/upgradedb/mysql.2008022000.php +++ b/lib/upgradedb/mysql.2008022000.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("ALTER TABLE tariffs ADD sh_limit int(11) DEFAULT NULL"); $this->Execute("ALTER TABLE tariffs ADD mail_limit int(11) DEFAULT NULL"); @@ -46,7 +45,3 @@ quota_ftp_limit=0, quota_mail_limit=0, quota_sql_limit=0"); $this->Execute("ALTER TABLE passwd ADD description text NOT NULL DEFAULT ''"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2008022000', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2008032100.php b/lib/upgradedb/mysql.2008032100.php index 5ff70d74c3..ccfee62661 100644 --- a/lib/upgradedb/mysql.2008032100.php +++ b/lib/upgradedb/mysql.2008032100.php @@ -24,10 +24,5 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("ALTER TABLE documents ADD INDEX closed (closed)"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2008032100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2008032700.php b/lib/upgradedb/mysql.2008032700.php index 5571203d8f..4245a1ba98 100644 --- a/lib/upgradedb/mysql.2008032700.php +++ b/lib/upgradedb/mysql.2008032700.php @@ -24,10 +24,5 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("ALTER TABLE passwd ADD mail_bcc varchar(255) NOT NULL DEFAULT ''"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2008032700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2008042400.php b/lib/upgradedb/mysql.2008042400.php index f6335fee75..cf8ff8b3a0 100644 --- a/lib/upgradedb/mysql.2008042400.php +++ b/lib/upgradedb/mysql.2008042400.php @@ -24,10 +24,5 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("ALTER TABLE networks ADD disabled tinyint(1) NOT NULL DEFAULT '0'"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2008042400', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2008052300.php b/lib/upgradedb/mysql.2008052300.php index 000c19d5d5..4cbd41d71c 100644 --- a/lib/upgradedb/mysql.2008052300.php +++ b/lib/upgradedb/mysql.2008052300.php @@ -24,10 +24,5 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("ALTER TABLE networks CHANGE interface interface varchar(16)"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2008052300', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2008061300.php b/lib/upgradedb/mysql.2008061300.php index 3b7b545d6a..506ea0d164 100644 --- a/lib/upgradedb/mysql.2008061300.php +++ b/lib/upgradedb/mysql.2008061300.php @@ -142,4 +142,3 @@ } $this->Execute("DELETE FROM dbinfo WHERE keytype ?LIKE? 'up_%'"); -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2008061300', 'dbversion')); diff --git a/lib/upgradedb/mysql.2008062400.php b/lib/upgradedb/mysql.2008062400.php index 32924ec452..31e826f335 100644 --- a/lib/upgradedb/mysql.2008062400.php +++ b/lib/upgradedb/mysql.2008062400.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("ALTER TABLE customers ADD consentdate int(11) NOT NULL DEFAULT '0'"); $this->Execute("DROP VIEW customersview"); @@ -35,7 +34,3 @@ JOIN excludedgroups e ON (a.customergroupid = e.customergroupid) WHERE e.userid = lms_current_user() AND a.customerid = c.id) "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2008062400', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2008070100.php b/lib/upgradedb/mysql.2008070100.php index d47ca5de90..e4f48265e1 100644 --- a/lib/upgradedb/mysql.2008070100.php +++ b/lib/upgradedb/mysql.2008070100.php @@ -25,5 +25,3 @@ */ $this->Execute("INSERT INTO uiconfig (section, var) VALUES ('userpanel', 'data_consent_text')"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2008070100', 'dbversion')); diff --git a/lib/upgradedb/mysql.2008071700.php b/lib/upgradedb/mysql.2008071700.php index 50de74990e..2519fd689f 100644 --- a/lib/upgradedb/mysql.2008071700.php +++ b/lib/upgradedb/mysql.2008071700.php @@ -36,5 +36,3 @@ JOIN excludedgroups e ON (a.customergroupid = e.customergroupid) WHERE e.userid = lms_current_user() AND a.customerid = c.id); "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2008071700', 'dbversion')); diff --git a/lib/upgradedb/mysql.2008080800.php b/lib/upgradedb/mysql.2008080800.php index cad520b34f..59dc91a753 100644 --- a/lib/upgradedb/mysql.2008080800.php +++ b/lib/upgradedb/mysql.2008080800.php @@ -69,5 +69,3 @@ $this->Execute("INSERT INTO states (name) VALUES ('wielkopolskie')"); $this->Execute("INSERT INTO states (name) VALUES ('zachodniopomorskie')"); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2008080800', 'dbversion')); diff --git a/lib/upgradedb/mysql.2008102000.php b/lib/upgradedb/mysql.2008102000.php index 10a784354c..bee2e0d804 100644 --- a/lib/upgradedb/mysql.2008102000.php +++ b/lib/upgradedb/mysql.2008102000.php @@ -113,5 +113,3 @@ !empty($account) ? $account : '', ) ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2008102000', 'dbversion')); diff --git a/lib/upgradedb/mysql.2008102700.php b/lib/upgradedb/mysql.2008102700.php index b8f93acd38..d33f2be112 100644 --- a/lib/upgradedb/mysql.2008102700.php +++ b/lib/upgradedb/mysql.2008102700.php @@ -24,11 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("ALTER TABLE divisions ADD ten varchar(16) NOT NULL DEFAULT ''"); $this->Execute("ALTER TABLE divisions ADD regon varchar(255) NOT NULL DEFAULT ''"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2008102700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2008110100.php b/lib/upgradedb/mysql.2008110100.php index 3df85db29a..7158b4bb60 100644 --- a/lib/upgradedb/mysql.2008110100.php +++ b/lib/upgradedb/mysql.2008110100.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("ALTER TABLE customers ADD paytime tinyint NOT NULL DEFAULT -1"); $this->Execute("UPDATE customers SET paytime = -1"); @@ -37,7 +36,3 @@ JOIN excludedgroups e ON (a.customergroupid = e.customergroupid) WHERE e.userid = lms_current_user() AND a.customerid = c.id); "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2008110100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2008111900.php b/lib/upgradedb/mysql.2008111900.php index 2dff91b0a2..7ecc742b04 100644 --- a/lib/upgradedb/mysql.2008111900.php +++ b/lib/upgradedb/mysql.2008111900.php @@ -38,5 +38,3 @@ PRIMARY KEY (id) ) ENGINE=MyISAM; "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2008111900', 'dbversion')); diff --git a/lib/upgradedb/mysql.2008112400.php b/lib/upgradedb/mysql.2008112400.php index ab2bc4cdf0..9e60d64559 100644 --- a/lib/upgradedb/mysql.2008112400.php +++ b/lib/upgradedb/mysql.2008112400.php @@ -50,5 +50,3 @@ $this->Execute("INSERT INTO countries (name) VALUES ('Romania')"); $this->Execute("INSERT INTO countries (name) VALUES ('Slovakia')"); $this->Execute("INSERT INTO countries (name) VALUES ('USA')"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2008112400', 'dbversion')); diff --git a/lib/upgradedb/mysql.2008122900.php b/lib/upgradedb/mysql.2008122900.php index 13c89ad328..fff3931553 100644 --- a/lib/upgradedb/mysql.2008122900.php +++ b/lib/upgradedb/mysql.2008122900.php @@ -41,5 +41,3 @@ SELECT id, ? FROM numberplans', array($div['id'])); } } - -$this->Execute('UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?', array('2008122900', 'dbversion')); diff --git a/lib/upgradedb/mysql.2009021600.php b/lib/upgradedb/mysql.2009021600.php index b5f3bec702..e119b3b5f9 100644 --- a/lib/upgradedb/mysql.2009021600.php +++ b/lib/upgradedb/mysql.2009021600.php @@ -24,10 +24,5 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("ALTER TABLE ewx_pt_config CHANGE name name varchar(32) NOT NULL DEFAULT ''"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2009021600', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2009031300.php b/lib/upgradedb/mysql.2009031300.php index a3c9c47bda..d2c5c631fe 100644 --- a/lib/upgradedb/mysql.2009031300.php +++ b/lib/upgradedb/mysql.2009031300.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("CREATE TABLE messages ( id int(11) NOT NULL auto_increment, @@ -51,7 +50,3 @@ INDEX messageid (messageid), INDEX customerid (customerid) ) ENGINE=MyISAM"); - -$this->Execute('UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?', array('2009031300', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2009031700.php b/lib/upgradedb/mysql.2009031700.php index 0bb0b68bd3..cd0e1dbe7a 100644 --- a/lib/upgradedb/mysql.2009031700.php +++ b/lib/upgradedb/mysql.2009031700.php @@ -24,12 +24,7 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("UPDATE uiconfig SET section = 'mail' WHERE section = 'phpui' AND var IN ('debug_email', 'smtp_port', 'smtp_host', 'smtp_username', 'smtp_password', 'smtp_auth_type') "); - -$this->Execute('UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?', array('2009031700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2009040200.php b/lib/upgradedb/mysql.2009040200.php index b1cb1de30f..8c0d02d0c0 100644 --- a/lib/upgradedb/mysql.2009040200.php +++ b/lib/upgradedb/mysql.2009040200.php @@ -59,5 +59,3 @@ $this->Execute("INSERT INTO nastypes (name) VALUES ('tc')"); $this->Execute("INSERT INTO nastypes (name) VALUES ('usrhiper')"); $this->Execute("INSERT INTO nastypes (name) VALUES ('other')"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2009040200', 'dbversion')); diff --git a/lib/upgradedb/mysql.2009051200.php b/lib/upgradedb/mysql.2009051200.php index 0b3cbfd43c..bede857dcf 100644 --- a/lib/upgradedb/mysql.2009051200.php +++ b/lib/upgradedb/mysql.2009051200.php @@ -49,5 +49,3 @@ 8 - edit 16 - delete */ - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2009051200', 'dbversion')); diff --git a/lib/upgradedb/mysql.2009060200.php b/lib/upgradedb/mysql.2009060200.php index 2da2bdf9e5..4d280a72bf 100644 --- a/lib/upgradedb/mysql.2009060200.php +++ b/lib/upgradedb/mysql.2009060200.php @@ -42,5 +42,3 @@ $this->Execute("ALTER TABLE cashimport ADD sourceid int(11) DEFAULT NULL"); $this->Execute("ALTER TABLE cash ADD INDEX importid (importid)"); $this->Execute("ALTER TABLE cash ADD INDEX sourceid (sourceid)"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2009060200', 'dbversion')); diff --git a/lib/upgradedb/mysql.2009062300.php b/lib/upgradedb/mysql.2009062300.php index e245360e92..cdd171c3cb 100644 --- a/lib/upgradedb/mysql.2009062300.php +++ b/lib/upgradedb/mysql.2009062300.php @@ -35,5 +35,3 @@ UNIQUE KEY docid (docid, itemid) ) ENGINE=MyISAM; "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2009062300', 'dbversion')); diff --git a/lib/upgradedb/mysql.2009082500.php b/lib/upgradedb/mysql.2009082500.php index d3d80a3977..24b2a8cc5c 100644 --- a/lib/upgradedb/mysql.2009082500.php +++ b/lib/upgradedb/mysql.2009082500.php @@ -37,5 +37,3 @@ JOIN excludedgroups e ON (a.customergroupid = e.customergroupid) WHERE e.userid = lms_current_user() AND a.customerid = c.id); "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2009082500', 'dbversion')); diff --git a/lib/upgradedb/mysql.2009090900.php b/lib/upgradedb/mysql.2009090900.php index f15ddbd8a2..a6c7969fe9 100644 --- a/lib/upgradedb/mysql.2009090900.php +++ b/lib/upgradedb/mysql.2009090900.php @@ -25,5 +25,3 @@ */ $this->Execute("ALTER TABLE networks ADD notes text DEFAULT '' NOT NULL;"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2009090900', 'dbversion')); diff --git a/lib/upgradedb/mysql.2009091000.php b/lib/upgradedb/mysql.2009091000.php index f35f38c2b1..fe99f19b14 100644 --- a/lib/upgradedb/mysql.2009091000.php +++ b/lib/upgradedb/mysql.2009091000.php @@ -34,5 +34,3 @@ FROM nodes n JOIN netdevices d ON (n.netdev = d.id) WHERE n.nas = 1"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2009091000', 'dbversion')); diff --git a/lib/upgradedb/mysql.2009091001.php b/lib/upgradedb/mysql.2009091001.php index 0064489ab2..e36bda7047 100644 --- a/lib/upgradedb/mysql.2009091001.php +++ b/lib/upgradedb/mysql.2009091001.php @@ -33,5 +33,3 @@ JOIN excludedgroups e ON (a.customergroupid = e.customergroupid) WHERE e.userid = lms_current_user() AND a.customerid = c.id); "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2009091001', 'dbversion')); diff --git a/lib/upgradedb/mysql.2009091600.php b/lib/upgradedb/mysql.2009091600.php index 3b681792a2..dd548e674c 100644 --- a/lib/upgradedb/mysql.2009091600.php +++ b/lib/upgradedb/mysql.2009091600.php @@ -27,5 +27,3 @@ $this->Execute("ALTER TABLE aliasassignments ADD mail_forward varchar(255) DEFAULT '' NOT NULL"); $this->Execute("ALTER TABLE aliasassignments DROP KEY aliasid"); $this->Execute("ALTER TABLE aliasassignments ADD UNIQUE KEY aliasid (aliasid, accountid, mail_forward)"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2009091600', 'dbversion')); diff --git a/lib/upgradedb/mysql.2009101600.php b/lib/upgradedb/mysql.2009101600.php index 2faba42836..e6a01afcce 100644 --- a/lib/upgradedb/mysql.2009101600.php +++ b/lib/upgradedb/mysql.2009101600.php @@ -30,5 +30,3 @@ $this->Execute("ALTER TABLE tariffs ADD downceil_n int(11) DEFAULT NULL"); $this->Execute("ALTER TABLE tariffs ADD climit_n int(11) DEFAULT NULL"); $this->Execute("ALTER TABLE tariffs ADD plimit_n int(11) DEFAULT NULL"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2009101600', 'dbversion')); diff --git a/lib/upgradedb/mysql.2009103000.php b/lib/upgradedb/mysql.2009103000.php index fefd37e35b..92a981d101 100644 --- a/lib/upgradedb/mysql.2009103000.php +++ b/lib/upgradedb/mysql.2009103000.php @@ -49,5 +49,3 @@ account VARCHAR(40) DEFAULT NULL, PRIMARY KEY (id) )"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2009103000', 'dbversion')); diff --git a/lib/upgradedb/mysql.2009111000.php b/lib/upgradedb/mysql.2009111000.php index db8df47058..5adb3070dc 100644 --- a/lib/upgradedb/mysql.2009111000.php +++ b/lib/upgradedb/mysql.2009111000.php @@ -27,5 +27,3 @@ foreach ($allTables as $table) { $this->Execute("ALTER TABLE $table engine=innodb"); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2009111000', 'dbversion')); diff --git a/lib/upgradedb/mysql.2009111001.php b/lib/upgradedb/mysql.2009111001.php index 8da6eac049..9d86c9eddf 100644 --- a/lib/upgradedb/mysql.2009111001.php +++ b/lib/upgradedb/mysql.2009111001.php @@ -24,5 +24,3 @@ $this->Execute("ALTER TABLE records ADD CONSTRAINT records_ibfk_1 FOREIGN KEY (domain_id) REFERENCES domains (id) ON DELETE CASCADE ON UPDATE CASCADE"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2009111001', 'dbversion')); diff --git a/lib/upgradedb/mysql.2009111700.php b/lib/upgradedb/mysql.2009111700.php index f3d990d47f..d4eaa2709c 100644 --- a/lib/upgradedb/mysql.2009111700.php +++ b/lib/upgradedb/mysql.2009111700.php @@ -27,5 +27,3 @@ $this->Execute("ALTER TABLE invoicecontents CHANGE description description text DEFAULT '' NOT NULL"); $this->Execute("ALTER TABLE receiptcontents CHANGE description description text DEFAULT '' NOT NULL"); $this->Execute("ALTER TABLE cash CHANGE comment comment text DEFAULT '' NOT NULL"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2009111700', 'dbversion')); diff --git a/lib/upgradedb/mysql.2010011300.php b/lib/upgradedb/mysql.2010011300.php index 1031febdb9..3973668c23 100644 --- a/lib/upgradedb/mysql.2010011300.php +++ b/lib/upgradedb/mysql.2010011300.php @@ -34,5 +34,3 @@ REFERENCES nodes (id) ON DELETE CASCADE ON UPDATE CASCADE"); $this->Execute("ALTER TABLE nodeassignments ADD FOREIGN KEY (assignmentid) REFERENCES assignments (id) ON DELETE CASCADE ON UPDATE CASCADE"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2010011300', 'dbversion')); diff --git a/lib/upgradedb/mysql.2010020700.php b/lib/upgradedb/mysql.2010020700.php index 4c1404981b..3988071494 100644 --- a/lib/upgradedb/mysql.2010020700.php +++ b/lib/upgradedb/mysql.2010020700.php @@ -38,5 +38,3 @@ $this->Execute("ALTER TABLE netdevices ADD channelid int(11) DEFAULT NULL"); $this->Execute("ALTER TABLE netdevices ADD INDEX channelid (channelid)"); $this->Execute("ALTER TABLE netdevices ADD FOREIGN KEY (channelid) REFERENCES ewx_channels (id) ON DELETE SET NULL ON UPDATE CASCADE"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2010020700', 'dbversion')); diff --git a/lib/upgradedb/mysql.2010031100.php b/lib/upgradedb/mysql.2010031100.php index 3dab036ed5..f9f984be58 100644 --- a/lib/upgradedb/mysql.2010031100.php +++ b/lib/upgradedb/mysql.2010031100.php @@ -25,5 +25,3 @@ $this->Execute("ALTER TABLE ewx_stm_channels CHANGE customerid cid int(11) DEFAULT '0' NOT NULL"); $this->Execute("ALTER TABLE ewx_stm_channels DROP KEY customerid"); $this->Execute("ALTER TABLE ewx_stm_channels ADD UNIQUE KEY cid (cid)"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2010031100', 'dbversion')); diff --git a/lib/upgradedb/mysql.2010050600.php b/lib/upgradedb/mysql.2010050600.php index 190a327bc4..bce1801d80 100644 --- a/lib/upgradedb/mysql.2010050600.php +++ b/lib/upgradedb/mysql.2010050600.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" CREATE TABLE macs ( @@ -40,7 +39,3 @@ $this->Execute("INSERT INTO macs (mac, nodeid) SELECT mac, id FROM nodes"); $this->Execute("ALTER TABLE nodes DROP mac"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2010050600', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2010051400.php b/lib/upgradedb/mysql.2010051400.php index c8a7a28565..00d41a40d0 100644 --- a/lib/upgradedb/mysql.2010051400.php +++ b/lib/upgradedb/mysql.2010051400.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" CREATE VIEW vnodes_mac AS @@ -37,7 +36,3 @@ FROM nodes n LEFT JOIN vnodes_mac m ON (n.id = m.nodeid) "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2010051400', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2010061100.php b/lib/upgradedb/mysql.2010061100.php index 02d6feba01..3595b1fdc3 100644 --- a/lib/upgradedb/mysql.2010061100.php +++ b/lib/upgradedb/mysql.2010061100.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" CREATE VIEW vmacs AS @@ -32,7 +31,3 @@ FROM nodes n JOIN macs m ON (n.id = m.nodeid) "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2010061100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2010061800.php b/lib/upgradedb/mysql.2010061800.php index a0b4f9dbf8..bcb5ee52d4 100644 --- a/lib/upgradedb/mysql.2010061800.php +++ b/lib/upgradedb/mysql.2010061800.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $tables = array( 'documents' => 'paytype', @@ -83,7 +82,3 @@ } } } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2010061800', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2010062200.php b/lib/upgradedb/mysql.2010062200.php index bec060a2fe..d03478aecf 100644 --- a/lib/upgradedb/mysql.2010062200.php +++ b/lib/upgradedb/mysql.2010062200.php @@ -24,13 +24,8 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("ALTER TABLE assignments ADD paytype smallint DEFAULT NULL"); $this->Execute("ALTER TABLE assignments ADD numberplanid int(11) DEFAULT NULL"); $this->Execute("ALTER TABLE assignments ADD INDEX numberplanid (numberplanid)"); $this->Execute("ALTER TABLE assignments ADD FOREIGN KEY (numberplanid) REFERENCES numberplans (id) ON DELETE SET NULL ON UPDATE CASCADE"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2010062200', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2010062800.php b/lib/upgradedb/mysql.2010062800.php index 3d4ac229a8..6ae37ec653 100644 --- a/lib/upgradedb/mysql.2010062800.php +++ b/lib/upgradedb/mysql.2010062800.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("DELETE FROM rtattachments WHERE messageid NOT IN (SELECT id FROM rtmessages)"); $this->Execute("ALTER TABLE rtattachments ALTER messageid DROP DEFAULT"); @@ -59,7 +58,3 @@ $this->Execute("ALTER TABLE rtrights ADD FOREIGN KEY (userid) REFERENCES users (id) ON DELETE CASCADE ON UPDATE CASCADE"); $this->Execute("ALTER TABLE rtrights ALTER userid DROP DEFAULT"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2010062800', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2010081700.php b/lib/upgradedb/mysql.2010081700.php index ad9fc20580..62a5856e46 100644 --- a/lib/upgradedb/mysql.2010081700.php +++ b/lib/upgradedb/mysql.2010081700.php @@ -20,9 +20,3 @@ * USA. * */ - -$this->BeginTrans(); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2010081700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2010121000.php b/lib/upgradedb/mysql.2010121000.php index 4076eddb3f..d0bd767304 100644 --- a/lib/upgradedb/mysql.2010121000.php +++ b/lib/upgradedb/mysql.2010121000.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->EXECUTE("DROP VIEW customersview"); @@ -57,7 +56,3 @@ $this->EXECUTE("ALTER TABLE excludedgroups ADD INDEX customergroupid (customergroupid)"); $this->EXECUTE("ALTER TABLE excludedgroups ADD FOREIGN KEY (customergroupid) REFERENCES customergroups (id) ON DELETE CASCADE ON UPDATE CASCADE"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2010121000', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2010121400.php b/lib/upgradedb/mysql.2010121400.php index edf355ca82..ef4b78c4e0 100644 --- a/lib/upgradedb/mysql.2010121400.php +++ b/lib/upgradedb/mysql.2010121400.php @@ -23,7 +23,6 @@ $lang = $this->GetOne("SELECT value FROM uiconfig WHERE section = ? AND var = ? AND disabled = ?", array('phpui', 'lang', 0)); -$this->BeginTrans(); $this->Execute("DELETE FROM customercontacts WHERE customerid NOT IN (SELECT id FROM customers)"); $this->Execute("ALTER TABLE customercontacts ADD FOREIGN KEY (customerid) @@ -42,7 +41,3 @@ $this->Execute("UPDATE customercontacts SET type = COALESCE(type, 0) + 1 WHERE REPLACE(REPLACE(phone, '-', ''), ' ', '') REGEXP '^(\\\\+?[0-9]{2}|0)?(88[0-9]|5[01][0-9]|6[069][0-9]|7[2789][0-9])[0-9]{6}$'"); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2010121400', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2010121600.php b/lib/upgradedb/mysql.2010121600.php index 176b70d307..4a1b560c93 100644 --- a/lib/upgradedb/mysql.2010121600.php +++ b/lib/upgradedb/mysql.2010121600.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("DROP VIEW customersview"); $this->Execute("DROP VIEW vnodes"); @@ -106,7 +105,3 @@ function parse_address_tmp($addr) SELECT n.*, m.mac, m.id AS macid FROM nodes n JOIN macs m ON (n.id = m.nodeid)"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2010121600', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2010122000.php b/lib/upgradedb/mysql.2010122000.php index 3565eb05e6..3b8de1e3fc 100644 --- a/lib/upgradedb/mysql.2010122000.php +++ b/lib/upgradedb/mysql.2010122000.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" CREATE TABLE sourcefiles ( @@ -51,7 +50,3 @@ $this->Execute("ALTER TABLE cashimport ADD INDEX sourceid (sourceid)"); $this->Execute("ALTER TABLE cashimport ADD FOREIGN KEY (sourceid) REFERENCES cashsources (id) ON DELETE SET NULL ON UPDATE CASCADE"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2010122000', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2010122700.php b/lib/upgradedb/mysql.2010122700.php index 52c5805865..94e996fe50 100644 --- a/lib/upgradedb/mysql.2010122700.php +++ b/lib/upgradedb/mysql.2010122700.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE tariffs ADD period smallint DEFAULT NULL"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2010122700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2011021700.php b/lib/upgradedb/mysql.2011021700.php index f65f0c9c80..768259bf6e 100644 --- a/lib/upgradedb/mysql.2011021700.php +++ b/lib/upgradedb/mysql.2011021700.php @@ -21,11 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE tariffs DROP KEY name"); $this->Execute("ALTER TABLE tariffs ADD UNIQUE KEY name (name, value)"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2011021700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2011022000.php b/lib/upgradedb/mysql.2011022000.php index a637b700f8..c5aad1dbdb 100644 --- a/lib/upgradedb/mysql.2011022000.php +++ b/lib/upgradedb/mysql.2011022000.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" CREATE TABLE promotions ( @@ -61,7 +60,3 @@ $this->Execute("ALTER TABLE tariffs DROP KEY name"); $this->Execute("ALTER TABLE tariffs ADD UNIQUE KEY name (name, value, period)"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2011022000', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2011030700.php b/lib/upgradedb/mysql.2011030700.php index 119e92e5a1..ad1cc9228e 100644 --- a/lib/upgradedb/mysql.2011030700.php +++ b/lib/upgradedb/mysql.2011030700.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $s_arr = array(); $schemas = $this->GetAll("SELECT * FROM promotionschemas"); @@ -65,7 +64,3 @@ $this->Execute("ALTER TABLE promotionschemas ADD INDEX ctariffid (ctariffid)"); $this->Execute("ALTER TABLE promotionschemas ADD continuation tinyint(1) DEFAULT NULL"); $this->Execute("UPDATE promotionschemas SET continuation = 1"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2011030700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2011031000.php b/lib/upgradedb/mysql.2011031000.php index 5cb32f5c00..2e4ff2a4f9 100644 --- a/lib/upgradedb/mysql.2011031000.php +++ b/lib/upgradedb/mysql.2011031000.php @@ -21,12 +21,7 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE users ADD phone varchar(32) DEFAULT NULL"); $this->Execute("ALTER TABLE users ADD ntype smallint DEFAULT NULL"); $this->Execute("UPDATE users SET ntype = 1"); // MSG_MAIL - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2011031000', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2011032400.php b/lib/upgradedb/mysql.2011032400.php index 606980ba38..1e0eec5440 100644 --- a/lib/upgradedb/mysql.2011032400.php +++ b/lib/upgradedb/mysql.2011032400.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("DROP VIEW customersview"); @@ -35,7 +34,3 @@ SELECT 1 FROM customerassignments a JOIN excludedgroups e ON (a.customergroupid = e.customergroupid) WHERE e.userid = lms_current_user() AND a.customerid = c.id)"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2011032400', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2011032500.php b/lib/upgradedb/mysql.2011032500.php index 2003a1262a..1b69d559ff 100644 --- a/lib/upgradedb/mysql.2011032500.php +++ b/lib/upgradedb/mysql.2011032500.php @@ -21,14 +21,9 @@ * */ -$this->BeginTrans(); if (!$this->ResourceExists('documents.sdate', LMSDB::RESOURCE_TYPE_COLUMN)) { $this->Execute("ALTER TABLE documents ADD sdate int(11) DEFAULT '0' NOT NULL"); } $this->Execute("UPDATE documents SET sdate = cdate WHERE type IN (1, 3)"); // DOC_INVOICE/DOC_CNOTE - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2011032500', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2011041500.php b/lib/upgradedb/mysql.2011041500.php index e227ca9a8a..f2c68cd44f 100644 --- a/lib/upgradedb/mysql.2011041500.php +++ b/lib/upgradedb/mysql.2011041500.php @@ -21,11 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE ewx_channels ADD halfduplex tinyint(1) DEFAULT NULL"); $this->Execute("ALTER TABLE ewx_stm_channels ADD halfduplex tinyint(1) DEFAULT NULL"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2011041500', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2011082800.php b/lib/upgradedb/mysql.2011082800.php index 434840a6f4..98130e51b8 100644 --- a/lib/upgradedb/mysql.2011082800.php +++ b/lib/upgradedb/mysql.2011082800.php @@ -23,7 +23,6 @@ // TERYT -$this->BeginTrans(); $this->Execute("DROP VIEW vnodes"); @@ -179,7 +178,3 @@ FROM nodes n LEFT JOIN vnodes_mac m ON (n.id = m.nodeid); "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2011082800', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2011091100.php b/lib/upgradedb/mysql.2011091100.php index f3c7347b5d..411c044863 100644 --- a/lib/upgradedb/mysql.2011091100.php +++ b/lib/upgradedb/mysql.2011091100.php @@ -24,9 +24,5 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("ALTER TABLE voipaccounts ADD COLUMN access tinyint(1) NOT NULL DEFAULT '1'"); -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2011091100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2011091600.php b/lib/upgradedb/mysql.2011091600.php index c232ee9557..bb5f696309 100644 --- a/lib/upgradedb/mysql.2011091600.php +++ b/lib/upgradedb/mysql.2011091600.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" CREATE TABLE rtcategories ( @@ -65,7 +64,3 @@ ); $this->Execute("INSERT INTO uiconfig (section, var, value) VALUES ('userpanel', 'default_categories', ?)", array($default_catid)); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2011091600', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2011110800.php b/lib/upgradedb/mysql.2011110800.php index 0e792459af..da3084dd14 100644 --- a/lib/upgradedb/mysql.2011110800.php +++ b/lib/upgradedb/mysql.2011110800.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("DROP VIEW vnodes"); $this->Execute("DROP VIEW vmacs"); @@ -43,7 +42,3 @@ $this->Execute("ALTER TABLE netdevices ADD longitude decimal(10, 6) DEFAULT NULL"); $this->Execute("ALTER TABLE netdevices ADD latitude decimal(10, 6) DEFAULT NULL"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2011110800', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2011113000.php b/lib/upgradedb/mysql.2011113000.php index 4e1d30a419..44ef171cb8 100644 --- a/lib/upgradedb/mysql.2011113000.php +++ b/lib/upgradedb/mysql.2011113000.php @@ -24,13 +24,8 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("ALTER TABLE assignments CHANGE discount pdiscount decimal(4,2) NOT NULL DEFAULT '0'"); $this->Execute("ALTER TABLE invoicecontents CHANGE discount pdiscount decimal(4,2) NOT NULL DEFAULT '0'"); $this->Execute("ALTER TABLE assignments ADD vdiscount decimal(9, 2) NOT NULL DEFAULT '0'"); $this->Execute("ALTER TABLE invoicecontents ADD vdiscount decimal(9, 2) NOT NULL DEFAULT '0'"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2011113000', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2012011800.php b/lib/upgradedb/mysql.2012011800.php index b88a833790..bffb1cbaa1 100644 --- a/lib/upgradedb/mysql.2012011800.php +++ b/lib/upgradedb/mysql.2012011800.php @@ -24,10 +24,5 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("ALTER TABLE sessions CHANGE content content mediumtext NOT NULL"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2012011800', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2012021400.php b/lib/upgradedb/mysql.2012021400.php index 6d6d534100..6b5c9eef5f 100644 --- a/lib/upgradedb/mysql.2012021400.php +++ b/lib/upgradedb/mysql.2012021400.php @@ -23,5 +23,3 @@ */ $this->Execute("ALTER TABLE domains ADD mxbackup tinyint(1) DEFAULT '0' NOT NULL"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2012021400', 'dbversion')); diff --git a/lib/upgradedb/mysql.2012021800.php b/lib/upgradedb/mysql.2012021800.php index 7611a0a2de..47d0510d29 100644 --- a/lib/upgradedb/mysql.2012021800.php +++ b/lib/upgradedb/mysql.2012021800.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" CREATE TABLE assignmentlocks ( @@ -33,7 +32,3 @@ tosec int(11) DEFAULT 0 NOT NULL, PRIMARY KEY (id) ) ENGINE=INNODB"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2012021800', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2012030801.php b/lib/upgradedb/mysql.2012030801.php index b21e771cbb..d79bafbd39 100644 --- a/lib/upgradedb/mysql.2012030801.php +++ b/lib/upgradedb/mysql.2012030801.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); // name2 support for teryt location_street $this->Execute("DROP VIEW teryt_ulic"); @@ -55,8 +54,3 @@ SELECT n.*, m.mac, m.id AS macid FROM nodes n JOIN macs m ON (n.id = m.nodeid)"); - - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2012030801', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2012032900.php b/lib/upgradedb/mysql.2012032900.php index a0b3ec6ff2..93ccba59f3 100644 --- a/lib/upgradedb/mysql.2012032900.php +++ b/lib/upgradedb/mysql.2012032900.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" CREATE TABLE pna ( @@ -37,7 +36,3 @@ PRIMARY KEY (id), UNIQUE (zip, cityid, streetid, fromhouse, tohouse, parity) ) ENGINE=INNODB"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2012032900', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2012040700.php b/lib/upgradedb/mysql.2012040700.php index 004e8e0b55..7a91867acd 100644 --- a/lib/upgradedb/mysql.2012040700.php +++ b/lib/upgradedb/mysql.2012040700.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" CREATE TABLE nodelocks ( @@ -39,7 +38,3 @@ LEFT JOIN assignments a ON a.id = al.assignmentid LEFT JOIN nodeassignments na ON na.assignmentid = a.id)"); $this->Execute("DROP TABLE assignmentlocks"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2012040700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2012041100.php b/lib/upgradedb/mysql.2012041100.php index 73a17d1a02..66e7ee3b83 100644 --- a/lib/upgradedb/mysql.2012041100.php +++ b/lib/upgradedb/mysql.2012041100.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("DROP VIEW IF EXISTS customersview"); @@ -35,7 +34,3 @@ WHERE e.userid = lms_current_user() AND a.customerid = c.id)"); $this->Execute("UPDATE customers SET pin = CONCAT('0', pin) WHERE LENGTH(pin) < 4"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2012041100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2012041101.php b/lib/upgradedb/mysql.2012041101.php index f97d612a95..ee0d653488 100644 --- a/lib/upgradedb/mysql.2012041101.php +++ b/lib/upgradedb/mysql.2012041101.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" CREATE TABLE managementurls ( @@ -32,7 +31,3 @@ comment varchar(100) DEFAULT NULL, PRIMARY KEY (id) ) ENGINE=INNODB"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2012041101', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2012041102.php b/lib/upgradedb/mysql.2012041102.php index f6f8063e3a..ca83896647 100644 --- a/lib/upgradedb/mysql.2012041102.php +++ b/lib/upgradedb/mysql.2012041102.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); //$this->Execute("INSERT INTO uiconfig (section, var, value, description, disabled) VALUES ('phpui', 'default_assignment_invoice', '0', '', '0')"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2012041102', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2012042300.php b/lib/upgradedb/mysql.2012042300.php index 4983a263b9..51213b5722 100644 --- a/lib/upgradedb/mysql.2012042300.php +++ b/lib/upgradedb/mysql.2012042300.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" CREATE TABLE nodesessions ( @@ -43,7 +42,3 @@ "); $this->Execute("ALTER TABLE stats ADD nodesessionid int(11) NOT NULL DEFAULT '0'"); $this->Execute("CREATE INDEX nodesessionid ON stats(nodesessionid)"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2012042300', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2012042500.php b/lib/upgradedb/mysql.2012042500.php index dcd362126e..2bcd2555c3 100644 --- a/lib/upgradedb/mysql.2012042500.php +++ b/lib/upgradedb/mysql.2012042500.php @@ -21,11 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE users ADD passwdexpiration int(11) NOT NULL DEFAULT '0'"); $this->Execute("ALTER TABLE users ADD passwdlastchange int(11) NOT NULL DEFAULT '0'"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2012042500', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2012050200.php b/lib/upgradedb/mysql.2012050200.php index 733a2b3c68..1c75a98eca 100644 --- a/lib/upgradedb/mysql.2012050200.php +++ b/lib/upgradedb/mysql.2012050200.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("INSERT INTO uiconfig (section, var, value, description, disabled) VALUES ('zones', 'default_spf', '', '', '0')"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2012050200', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2012092000.php b/lib/upgradedb/mysql.2012092000.php index 31776fbdef..54d9faaf70 100644 --- a/lib/upgradedb/mysql.2012092000.php +++ b/lib/upgradedb/mysql.2012092000.php @@ -21,12 +21,7 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE users ADD access TINYINT( 1 ) NOT NULL DEFAULT '1';"); $this->Execute("ALTER TABLE users ADD accessfrom INT NOT NULL DEFAULT '0';"); $this->Execute("ALTER TABLE users ADD accessto INT NOT NULL DEFAULT '0';"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2012092000', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2012092500.php b/lib/upgradedb/mysql.2012092500.php index 52c55554d6..75170f2850 100644 --- a/lib/upgradedb/mysql.2012092500.php +++ b/lib/upgradedb/mysql.2012092500.php @@ -21,11 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE events ADD moddate INT NOT NULL DEFAULT '0';"); $this->Execute("ALTER TABLE events ADD moduserid INT NOT NULL DEFAULT '0';"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2012092500', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2012111100.php b/lib/upgradedb/mysql.2012111100.php index 86ebc7fa37..e68c19c64d 100644 --- a/lib/upgradedb/mysql.2012111100.php +++ b/lib/upgradedb/mysql.2012111100.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("DROP VIEW IF EXISTS customersview"); @@ -36,7 +35,3 @@ $this->Execute("CREATE VIEW contractorview AS SELECT c.* FROM customers c WHERE c.type = ? ;", array(2)); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2012111100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2013031400.php b/lib/upgradedb/mysql.2013031400.php index ed5a2c3bdc..4ceb955d03 100644 --- a/lib/upgradedb/mysql.2013031400.php +++ b/lib/upgradedb/mysql.2013031400.php @@ -21,8 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute('ALTER TABLE tariffs ADD column disabled tinyint(1) NOT NULL DEFAULT "0"'); -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2013031400', 'dbversion')); -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2013031800.php b/lib/upgradedb/mysql.2013031800.php index a4ec63d4b7..76c0cd6e10 100644 --- a/lib/upgradedb/mysql.2013031800.php +++ b/lib/upgradedb/mysql.2013031800.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("DELETE FROM assignments WHERE customerid NOT IN (SELECT id FROM customers)"); $this->Execute("UPDATE assignments SET numberplanid = NULL WHERE numberplanid IS NOT NULL AND NOT EXISTS (SELECT 1 FROM numberplans WHERE id = numberplanid)"); @@ -97,6 +96,3 @@ $this->Execute("ALTER TABLE excludedgroups ADD FOREIGN KEY (customergroupid) REFERENCES customergroups (id) ON DELETE CASCADE ON UPDATE CASCADE"); $this->Execute("DELETE FROM managementurls WHERE netdevid NOT IN (SELECT id FROM netdevices)"); $this->Execute("ALTER TABLE managementurls ADD FOREIGN KEY (netdevid) REFERENCES netdevices (id) ON DELETE CASCADE ON UPDATE CASCADE"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2013031800', 'dbversion')); -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2013032100.php b/lib/upgradedb/mysql.2013032100.php index 3be15dd913..5259d25c09 100644 --- a/lib/upgradedb/mysql.2013032100.php +++ b/lib/upgradedb/mysql.2013032100.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE networks ADD COLUMN hostid int(11) NULL, @@ -29,7 +28,3 @@ $this->Execute("ALTER TABLE networks DROP INDEX address, ADD UNIQUE address(address, hostid)"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2013032100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2013040200.php b/lib/upgradedb/mysql.2013040200.php index a77eecc8bd..83dc2c8978 100644 --- a/lib/upgradedb/mysql.2013040200.php +++ b/lib/upgradedb/mysql.2013040200.php @@ -21,13 +21,8 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE users ADD COLUMN swekey_id varchar(32) NULL DEFAULT NULL AFTER accessto, DROP INDEX login, ADD UNIQUE INDEX login (login, swekey_id)"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2013040200', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2013042600.php b/lib/upgradedb/mysql.2013042600.php index 95dc448103..2e17c49c92 100644 --- a/lib/upgradedb/mysql.2013042600.php +++ b/lib/upgradedb/mysql.2013042600.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" CREATE TABLE logtransactions ( @@ -68,7 +67,3 @@ FOREIGN KEY (logmessageid) REFERENCES logmessages (id) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2013042600', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2013050700.php b/lib/upgradedb/mysql.2013050700.php index 121a3b59e4..79ad65e586 100644 --- a/lib/upgradedb/mysql.2013050700.php +++ b/lib/upgradedb/mysql.2013050700.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("DROP VIEW IF EXISTS vnodes"); $this->Execute("DROP VIEW IF EXISTS vmacs"); @@ -53,7 +52,3 @@ SELECT n.*, m.mac, m.id AS macid FROM nodes n JOIN macs m ON (n.id = m.nodeid)"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2013050700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2013051700.php b/lib/upgradedb/mysql.2013051700.php index 91b47ebbc0..a8a2a0f152 100644 --- a/lib/upgradedb/mysql.2013051700.php +++ b/lib/upgradedb/mysql.2013051700.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" CREATE TABLE templates ( @@ -33,7 +32,3 @@ UNIQUE KEY name (type, name) ) ENGINE=InnoDB; "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2013051700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2013101400.php b/lib/upgradedb/mysql.2013101400.php index 6b3b45f65c..0159069197 100644 --- a/lib/upgradedb/mysql.2013101400.php +++ b/lib/upgradedb/mysql.2013101400.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE documents ADD div_name TEXT NOT NULL DEFAULT ''"); // pełna nazwa firmy $this->Execute("ALTER TABLE documents ADD div_address VARCHAR (255) NOT NULL DEFAULT ''"); // adres firmy @@ -67,7 +66,3 @@ ); } } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2013101400', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2013110500.php b/lib/upgradedb/mysql.2013110500.php index 001bbb1ac1..35f136b33d 100644 --- a/lib/upgradedb/mysql.2013110500.php +++ b/lib/upgradedb/mysql.2013110500.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("DROP VIEW IF EXISTS customersview"); @@ -32,7 +31,3 @@ JOIN excludedgroups e ON (a.customergroupid = e.customergroupid) WHERE e.userid = lms_current_user() AND a.customerid = c.id) AND c.type < ?", array(2)); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2013110500', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2013111900.php b/lib/upgradedb/mysql.2013111900.php index 652da5b1b5..016692a605 100644 --- a/lib/upgradedb/mysql.2013111900.php +++ b/lib/upgradedb/mysql.2013111900.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE customers CHANGE paytime paytime smallint NOT NULL DEFAULT '-1'"); @@ -37,7 +36,3 @@ $this->Execute("ALTER TABLE documents CHANGE paytime paytime smallint NOT NULL DEFAULT '0'"); $this->Execute("ALTER TABLE divisions CHANGE inv_paytime inv_paytime smallint DEFAULT NULL"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2013111900', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2014012700.php b/lib/upgradedb/mysql.2014012700.php index babbef1d40..0ae2f54e31 100644 --- a/lib/upgradedb/mysql.2014012700.php +++ b/lib/upgradedb/mysql.2014012700.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE documents ADD INDEX reference (reference)"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2014012700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2014013100.php b/lib/upgradedb/mysql.2014013100.php index df41d52697..13e188d42a 100644 --- a/lib/upgradedb/mysql.2014013100.php +++ b/lib/upgradedb/mysql.2014013100.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); if ($id = $this->GetOne("SELECT id FROM uiconfig WHERE section = ? AND var = ?", array('userpanel', 'default_queue'))) { $this->Execute("UPDATE uiconfig SET var = ? WHERE id = ?", array('queues', $id)); @@ -31,7 +30,3 @@ array('userpanel', 'queues', '1') ); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2014013100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2014020400.php b/lib/upgradedb/mysql.2014020400.php index 18e1618734..6b15a82bcb 100644 --- a/lib/upgradedb/mysql.2014020400.php +++ b/lib/upgradedb/mysql.2014020400.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE rtqueues ADD COLUMN newticketsubject varchar(255) NOT NULL DEFAULT ''"); $this->Execute("ALTER TABLE rtqueues ADD COLUMN newticketbody text NOT NULL DEFAULT ''"); @@ -29,7 +28,3 @@ $this->Execute("ALTER TABLE rtqueues ADD COLUMN newmessagebody text NOT NULL DEFAULT ''"); $this->Execute("ALTER TABLE rtqueues ADD COLUMN resolveticketsubject varchar(255) NOT NULL DEFAULT ''"); $this->Execute("ALTER TABLE rtqueues ADD COLUMN resolveticketbody text NOT NULL DEFAULT ''"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2014020400', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2014021400.php b/lib/upgradedb/mysql.2014021400.php index 063dea6ec5..aeeae86d66 100644 --- a/lib/upgradedb/mysql.2014021400.php +++ b/lib/upgradedb/mysql.2014021400.php @@ -21,13 +21,8 @@ * */ -$this->BeginTrans(); $this->Execute( "INSERT INTO uiconfig (section, var, value) VALUES(?, ?, ?)", array('userpanel', 'tickets_from_selected_queues', '0') ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2014021400', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2014021700.php b/lib/upgradedb/mysql.2014021700.php index 484eaeefe5..4f7b44a941 100644 --- a/lib/upgradedb/mysql.2014021700.php +++ b/lib/upgradedb/mysql.2014021700.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute( "INSERT INTO uiconfig (section, var, value) VALUES(?, ?, ?)", @@ -31,7 +30,3 @@ "INSERT INTO uiconfig (section, var, value) VALUES(?, ?, ?)", array('userpanel', 'limit_ticket_movements_to_selected_queues', '0') ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2014021700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2014032900.php b/lib/upgradedb/mysql.2014032900.php index d1f470771f..9220e22287 100644 --- a/lib/upgradedb/mysql.2014032900.php +++ b/lib/upgradedb/mysql.2014032900.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("DROP VIEW IF EXISTS vnodes"); $this->Execute("DROP VIEW IF EXISTS vmacs"); @@ -37,8 +36,3 @@ SELECT n.*, m.mac, m.id AS macid FROM nodes n JOIN macs m ON (n.id = m.nodeid)"); - - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2014032900', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2014040100.php b/lib/upgradedb/mysql.2014040100.php index 70e3e6ec26..b707390400 100644 --- a/lib/upgradedb/mysql.2014040100.php +++ b/lib/upgradedb/mysql.2014040100.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE documents ADD div_shortname TEXT NOT NULL DEFAULT ''"); @@ -35,6 +34,3 @@ $division['id'])); } } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2014040100', 'dbversion')); -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2014040400.php b/lib/upgradedb/mysql.2014040400.php index 9f87156ba0..bae7daf8d4 100644 --- a/lib/upgradedb/mysql.2014040400.php +++ b/lib/upgradedb/mysql.2014040400.php @@ -21,10 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("UPDATE docrights SET doctype = ? WHERE doctype = ?", array('-128', '-10')); $this->Execute("UPDATE documents SET type = ? WHERE type = ?", array('-128', '-10')); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2014040400', 'dbversion')); -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2014040700.php b/lib/upgradedb/mysql.2014040700.php index 74c78f393e..9ecd354f9b 100644 --- a/lib/upgradedb/mysql.2014040700.php +++ b/lib/upgradedb/mysql.2014040700.php @@ -21,11 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE promotionassignments ADD optional tinyint NOT NULL DEFAULT 0"); $this->Execute("ALTER TABLE promotionassignments ADD selectionid tinyint NOT NULL DEFAULT 0"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2014040700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2014061200.php b/lib/upgradedb/mysql.2014061200.php index 6952f93d6b..8598f5db0f 100644 --- a/lib/upgradedb/mysql.2014061200.php +++ b/lib/upgradedb/mysql.2014061200.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE templates ADD subject varchar(255) NOT NULL DEFAULT ''"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2014061200', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2014063000.php b/lib/upgradedb/mysql.2014063000.php index 9cd67b354a..9dde3881f3 100644 --- a/lib/upgradedb/mysql.2014063000.php +++ b/lib/upgradedb/mysql.2014063000.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $DEFAULTS = array( /* @@ -153,7 +152,3 @@ ); } } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2014063000', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2014072500.php b/lib/upgradedb/mysql.2014072500.php index c95d2449d2..11f9edb0f9 100644 --- a/lib/upgradedb/mysql.2014072500.php +++ b/lib/upgradedb/mysql.2014072500.php @@ -25,7 +25,6 @@ $numberplans = $this->GetAllByKey("SELECT * FROM numberplans ORDER BY id", 'id'); -$this->BeginTrans(); $this->Execute("ALTER TABLE documents ADD fullnumber varchar(50) DEFAULT NULL"); $this->Execute("ALTER TABLE documents ADD INDEX fullnumber (fullnumber)"); @@ -61,7 +60,3 @@ } while (!$stop); $this->UnLockTables("documents"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2014072500', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2014090200.php b/lib/upgradedb/mysql.2014090200.php index 204395f4e0..e82b065d65 100644 --- a/lib/upgradedb/mysql.2014090200.php +++ b/lib/upgradedb/mysql.2014090200.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE events ADD enddate int(11) DEFAULT '0' NOT NULL"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2014090200', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2014090600.php b/lib/upgradedb/mysql.2014090600.php index b42bc467fe..7e19e4ac9f 100644 --- a/lib/upgradedb/mysql.2014090600.php +++ b/lib/upgradedb/mysql.2014090600.php @@ -21,14 +21,9 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE managementurls CHANGE netdevid netdevid int(11) NULL DEFAULT NULL"); $this->Execute("ALTER TABLE managementurls ADD nodeid int(11) NULL DEFAULT NULL"); $this->Execute("ALTER TABLE managementurls ADD CONSTRAINT managementurls_nodeid_fkey FOREIGN KEY (nodeid) REFERENCES nodes (id) ON DELETE CASCADE ON UPDATE CASCADE"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2014090600', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2014111200.php b/lib/upgradedb/mysql.2014111200.php index 1068ed13d7..81ee0e2900 100644 --- a/lib/upgradedb/mysql.2014111200.php +++ b/lib/upgradedb/mysql.2014111200.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE messageitems ADD lastreaddate int(11) NOT NULL DEFAULT '0'"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2014111200', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2014111400.php b/lib/upgradedb/mysql.2014111400.php index 8844b64ded..75bb4af5ca 100644 --- a/lib/upgradedb/mysql.2014111400.php +++ b/lib/upgradedb/mysql.2014111400.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" CREATE TABLE invprojects ( @@ -77,7 +76,3 @@ SELECT n.*, m.mac, m.id AS macid FROM nodes n JOIN macs m ON (n.id = m.nodeid)"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2014111400', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2015020900.php b/lib/upgradedb/mysql.2015020900.php index 48754c5730..8b19e4865c 100644 --- a/lib/upgradedb/mysql.2015020900.php +++ b/lib/upgradedb/mysql.2015020900.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" CREATE TABLE netdeviceproducers ( @@ -382,7 +381,3 @@ $this->Execute("ALTER TABLE netdevices ADD COLUMN netdevicemodelid integer DEFAULT NULL"); $this->Execute("ALTER TABLE netdevices ADD FOREIGN KEY (netdevicemodelid) REFERENCES netdevicemodels (id) ON UPDATE CASCADE ON DELETE SET NULL"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2015020900', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2015030300.php b/lib/upgradedb/mysql.2015030300.php index 4b113d7d2a..4b4f5cf406 100644 --- a/lib/upgradedb/mysql.2015030300.php +++ b/lib/upgradedb/mysql.2015030300.php @@ -24,9 +24,5 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("ALTER TABLE assignments ADD attribute varchar(255) DEFAULT NULL"); -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2015030300', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2015031900.php b/lib/upgradedb/mysql.2015031900.php index f353473690..ea73e8fdda 100644 --- a/lib/upgradedb/mysql.2015031900.php +++ b/lib/upgradedb/mysql.2015031900.php @@ -24,9 +24,5 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("ALTER TABLE nodesessions ADD terminatecause varchar(32) DEFAULT '' NOT NULL"); -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2015031900', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2015033000.php b/lib/upgradedb/mysql.2015033000.php index 8a56e53c8f..96df086ef5 100644 --- a/lib/upgradedb/mysql.2015033000.php +++ b/lib/upgradedb/mysql.2015033000.php @@ -24,11 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("ALTER TABLE netnodes ADD FOREIGN KEY (location_city) REFERENCES location_cities(id) ON DELETE SET NULL ON UPDATE CASCADE"); $this->Execute("ALTER TABLE netnodes ADD FOREIGN KEY (location_street) REFERENCES location_streets(id) ON DELETE SET NULL ON UPDATE CASCADE"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2015033000', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2015040100.php b/lib/upgradedb/mysql.2015040100.php index 5347d03025..63236af801 100644 --- a/lib/upgradedb/mysql.2015040100.php +++ b/lib/upgradedb/mysql.2015040100.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("DROP VIEW IF EXISTS vnodes"); $this->Execute("DROP VIEW IF EXISTS vmacs"); @@ -42,7 +41,3 @@ $this->Execute("ALTER TABLE netdevices CHANGE location_flat location_flat varchar(32) DEFAULT NULL"); $this->Execute("ALTER TABLE netnodes CHANGE location_house location_house varchar(32) DEFAULT NULL"); $this->Execute("ALTER TABLE netnodes CHANGE location_flat location_flat varchar(32) DEFAULT NULL"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2015040100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2015040200.php b/lib/upgradedb/mysql.2015040200.php index c776e89ba4..3a600a09f6 100644 --- a/lib/upgradedb/mysql.2015040200.php +++ b/lib/upgradedb/mysql.2015040200.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("CREATE TABLE netradiosectors ( id int(11) NOT NULL auto_increment, @@ -53,7 +52,3 @@ SELECT n.*, m.mac, m.id AS macid FROM nodes n JOIN macs m ON (n.id = m.nodeid)"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2015040200', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2015040800.php b/lib/upgradedb/mysql.2015040800.php index 931537dfb4..9deed9bcc9 100644 --- a/lib/upgradedb/mysql.2015040800.php +++ b/lib/upgradedb/mysql.2015040800.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("ALTER TABLE netlinks ADD COLUMN srcradiosector int(11) DEFAULT NULL"); $this->Execute("ALTER TABLE netlinks ADD COLUMN dstradiosector int(11) DEFAULT NULL"); @@ -32,7 +31,3 @@ $this->Execute("ALTER TABLE netlinks ADD INDEX dstradiosector (dstradiosector)"); $this->Execute("ALTER TABLE netlinks ADD FOREIGN KEY (srcradiosector) REFERENCES netradiosectors (id) ON DELETE SET NULL ON UPDATE CASCADE"); $this->Execute("ALTER TABLE netlinks ADD FOREIGN KEY (dstradiosector) REFERENCES netradiosectors (id) ON DELETE SET NULL ON UPDATE CASCADE"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2015040800', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2015041000.php b/lib/upgradedb/mysql.2015041000.php index 3f2451153b..9e58d4553b 100644 --- a/lib/upgradedb/mysql.2015041000.php +++ b/lib/upgradedb/mysql.2015041000.php @@ -24,10 +24,5 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("ALTER TABLE netradiosectors ADD COLUMN license varchar(64) DEFAULT NULL"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2015041000', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2015041001.php b/lib/upgradedb/mysql.2015041001.php index 76d72c5916..0bc77be6a0 100644 --- a/lib/upgradedb/mysql.2015041001.php +++ b/lib/upgradedb/mysql.2015041001.php @@ -24,10 +24,5 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("ALTER TABLE netradiosectors ADD COLUMN frequency numeric(9,3) DEFAULT NULL"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2015041001', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2015041200.php b/lib/upgradedb/mysql.2015041200.php index 54c27659c2..b7154eb2e9 100644 --- a/lib/upgradedb/mysql.2015041200.php +++ b/lib/upgradedb/mysql.2015041200.php @@ -24,10 +24,5 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("ALTER TABLE netradiosectors CHANGE frequency frequency numeric(9,5) DEFAULT NULL"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2015041200', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2015041400.php b/lib/upgradedb/mysql.2015041400.php index dd658bac6a..df52f16617 100644 --- a/lib/upgradedb/mysql.2015041400.php +++ b/lib/upgradedb/mysql.2015041400.php @@ -24,11 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("ALTER TABLE netradiosectors CHANGE radius width decimal(9,2) DEFAULT 0 NOT NULL"); $this->Execute("ALTER TABLE netradiosectors ADD COLUMN technology int(11) DEFAULT 0 NOT NULL"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2015041400', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2015041500.php b/lib/upgradedb/mysql.2015041500.php index c8dce9c0cd..805de183dc 100644 --- a/lib/upgradedb/mysql.2015041500.php +++ b/lib/upgradedb/mysql.2015041500.php @@ -24,10 +24,5 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("ALTER TABLE netradiosectors ADD COLUMN bandwidth numeric(9,5) DEFAULT NULL"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2015041500', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2015042100.php b/lib/upgradedb/mysql.2015042100.php index dfa306d17a..9d06a163a0 100644 --- a/lib/upgradedb/mysql.2015042100.php +++ b/lib/upgradedb/mysql.2015042100.php @@ -24,10 +24,5 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("ALTER TABLE netradiosectors ADD COLUMN frequency2 numeric(9,5) DEFAULT NULL"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2015042100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2015042700.php b/lib/upgradedb/mysql.2015042700.php index 3d5d0f0e66..4d804e7803 100644 --- a/lib/upgradedb/mysql.2015042700.php +++ b/lib/upgradedb/mysql.2015042700.php @@ -24,13 +24,8 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("DROP VIEW IF EXISTS vnodes"); $this->Execute("ALTER TABLE nodes ADD COLUMN authtype tinyint DEFAULT 0 NOT NULL"); $this->Execute("CREATE INDEX authtype ON nodes(authtype)"); $this->Execute("CREATE VIEW vnodes AS SELECT n.*, m.mac FROM nodes n LEFT JOIN vnodes_mac m ON (n.id = m.nodeid)"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2015042700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2015072300.php b/lib/upgradedb/mysql.2015072300.php index 23b43b7ded..6f452f707b 100644 --- a/lib/upgradedb/mysql.2015072300.php +++ b/lib/upgradedb/mysql.2015072300.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("ALTER TABLE voipaccounts ADD COLUMN location varchar(255) DEFAULT NULL"); $this->Execute("ALTER TABLE voipaccounts ADD COLUMN location_city int(11)"); @@ -35,7 +34,3 @@ $this->Execute("ALTER TABLE voipaccounts ADD INDEX location_street (location_street)"); $this->Execute("ALTER TABLE voipaccounts ADD FOREIGN KEY (location_city) REFERENCES location_cities (id) ON DELETE SET NULL ON UPDATE CASCADE"); $this->Execute("ALTER TABLE voipaccounts ADD FOREIGN KEY (location_street) REFERENCES location_streets (id) ON DELETE SET NULL ON UPDATE CASCADE"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2015072300', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2015080500.php b/lib/upgradedb/mysql.2015080500.php index 8592480908..f1bcbe8c23 100644 --- a/lib/upgradedb/mysql.2015080500.php +++ b/lib/upgradedb/mysql.2015080500.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" CREATE TABLE plicbdlocalisation ( @@ -36,7 +35,3 @@ FOREIGN KEY (location_city) REFERENCES location_cities (id) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB; "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2015080500', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2015080700.php b/lib/upgradedb/mysql.2015080700.php index 78f27f2e2b..c77f2f12b5 100644 --- a/lib/upgradedb/mysql.2015080700.php +++ b/lib/upgradedb/mysql.2015080700.php @@ -30,7 +30,6 @@ $CONTACT_LANDLINE = 4; $CONTACT_EMAIL = 8; -$this->BeginTrans(); $this->Execute("ALTER TABLE customercontacts CHANGE phone contact varchar(255) NOT NULL DEFAULT ''"); $this->Execute( @@ -66,7 +65,3 @@ $this->Execute("CREATE VIEW contractorview AS SELECT c.* FROM customers c WHERE c.type = ?", array(2)); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2015080700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2015082700.php b/lib/upgradedb/mysql.2015082700.php index b796908428..1d3cf8716f 100644 --- a/lib/upgradedb/mysql.2015082700.php +++ b/lib/upgradedb/mysql.2015082700.php @@ -21,13 +21,8 @@ * */ -$this->BeginTrans(); $this->Execute( "INSERT INTO uiconfig (section, var, value) VALUES(?, ?, ?)", array('userpanel', 'auth_type', '1') ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2015082700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2015090200.php b/lib/upgradedb/mysql.2015090200.php index 76ec2a5a78..bde9e957bc 100644 --- a/lib/upgradedb/mysql.2015090200.php +++ b/lib/upgradedb/mysql.2015090200.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" CREATE TABLE plicbdoperators ( @@ -36,7 +35,3 @@ INDEX rpt (rpt) ) ENGINE=InnoDB; "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2015090200', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2015090300.php b/lib/upgradedb/mysql.2015090300.php index a5dff75214..49b87bdd89 100644 --- a/lib/upgradedb/mysql.2015090300.php +++ b/lib/upgradedb/mysql.2015090300.php @@ -26,7 +26,6 @@ $CONTACT_EMAIL = 8; -$this->BeginTrans(); $this->Execute(" CREATE VIEW customermailsview AS @@ -34,7 +33,3 @@ FROM customercontacts WHERE type = ? AND contact <> '' GROUP BY customerid", array($CONTACT_EMAIL)); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2015090300', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2015090400.php b/lib/upgradedb/mysql.2015090400.php index 1afc1628da..fabf444b19 100644 --- a/lib/upgradedb/mysql.2015090400.php +++ b/lib/upgradedb/mysql.2015090400.php @@ -24,11 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("ALTER TABLE plicbdoperators ADD CONSTRAINT plicbdoperators_pkey PRIMARY KEY (id)"); $this->Execute("ALTER TABLE plicbdoperators DROP INDEX id"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2015090400', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2015091300.php b/lib/upgradedb/mysql.2015091300.php index cc5a4520a8..af7017cef1 100644 --- a/lib/upgradedb/mysql.2015091300.php +++ b/lib/upgradedb/mysql.2015091300.php @@ -24,11 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("DROP TABLE plicbdlocalisation"); $this->Execute("DROP TABLE plicbdoperators"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2015091300', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2015100100.php b/lib/upgradedb/mysql.2015100100.php index 6d25fc8502..67c72dc1ef 100644 --- a/lib/upgradedb/mysql.2015100100.php +++ b/lib/upgradedb/mysql.2015100100.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE users CHANGE rights rights text NOT NULL DEFAULT ''"); @@ -83,7 +82,3 @@ $this->Execute("UPDATE users SET rights = ? WHERE id = ?", array(implode(',', $rights), $user['id'])); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2015100100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2015100101.php b/lib/upgradedb/mysql.2015100101.php index 2c4a98130f..91aeacc868 100644 --- a/lib/upgradedb/mysql.2015100101.php +++ b/lib/upgradedb/mysql.2015100101.php @@ -22,5 +22,3 @@ */ $this->Execute("ALTER TABLE messageitems ADD externalmsgid int(6) DEFAULT '0' NOT NULL"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2015100101', 'dbversion')); diff --git a/lib/upgradedb/mysql.2015110600.php b/lib/upgradedb/mysql.2015110600.php index e8f440de91..2682e30332 100644 --- a/lib/upgradedb/mysql.2015110600.php +++ b/lib/upgradedb/mysql.2015110600.php @@ -24,13 +24,8 @@ define('EMAIL', 8); define('EMAIL_INVOICE', 16); -$this->BeginTrans(); $this->Execute( "UPDATE customercontacts SET type = ? WHERE customerid IN (SELECT id FROM customers WHERE einvoice = 1 AND invoicenotice = 1) AND (type & ?) > 0", array(EMAIL | EMAIL_INVOICE, EMAIL) ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2015110600', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2015111300.php b/lib/upgradedb/mysql.2015111300.php index dd89089ae5..e0f7857ace 100644 --- a/lib/upgradedb/mysql.2015111300.php +++ b/lib/upgradedb/mysql.2015111300.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE records ADD COLUMN disabled tinyint(1) DEFAULT '0'"); $this->Execute("ALTER TABLE records ADD COLUMN auth tinyint(1) DEFAULT '1'"); @@ -35,7 +34,3 @@ INDEX domainmetadata (domain_id, kind), FOREIGN KEY (domain_id) REFERENCES domains (id) ON DELETE CASCADE ON UPDATE CASCADE ) Engine=InnoDB"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2015111300', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2015111800.php b/lib/upgradedb/mysql.2015111800.php index 13e3a41719..0cfd331e4a 100644 --- a/lib/upgradedb/mysql.2015111800.php +++ b/lib/upgradedb/mysql.2015111800.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE events ADD COLUMN type smallint NOT NULL DEFAULT 1"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2015111800', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2015111900.php b/lib/upgradedb/mysql.2015111900.php index ab99921f4e..af34e7b881 100644 --- a/lib/upgradedb/mysql.2015111900.php +++ b/lib/upgradedb/mysql.2015111900.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE nodesessions ADD COLUMN type smallint NOT NULL DEFAULT '0'"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2015111900', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2015112000.php b/lib/upgradedb/mysql.2015112000.php index 9e3e84ea4e..015d26e8aa 100644 --- a/lib/upgradedb/mysql.2015112000.php +++ b/lib/upgradedb/mysql.2015112000.php @@ -21,9 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE events ADD nodeid int(11) DEFAULT NULL"); $this->Execute("ALTER TABLE events ADD INDEX nodeid (nodeid)"); $this->Execute("ALTER TABLE events ADD FOREIGN KEY (nodeid) REFERENCES nodes (id) ON DELETE SET NULL ON UPDATE CASCADE"); -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2015112000', 'dbversion')); -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2015112001.php b/lib/upgradedb/mysql.2015112001.php index ce52dfc1da..57a8e1824d 100644 --- a/lib/upgradedb/mysql.2015112001.php +++ b/lib/upgradedb/mysql.2015112001.php @@ -21,7 +21,4 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE rtnotes ADD COLUMN type smallint NOT NULL DEFAULT 1"); -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2015112001', 'dbversion')); -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2015120200.php b/lib/upgradedb/mysql.2015120200.php index 4d6efa4526..1ad2cf0068 100644 --- a/lib/upgradedb/mysql.2015120200.php +++ b/lib/upgradedb/mysql.2015120200.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("DROP VIEW IF EXISTS vnodes"); $this->Execute("DROP VIEW IF EXISTS vmacs"); @@ -52,7 +51,3 @@ LEFT JOIN hosts h ON (h.id = ne.hostid) WHERE no.ipaddr = 0 AND no.ipaddr_pub = 0 "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2015120200', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2015120201.php b/lib/upgradedb/mysql.2015120201.php index ab141bb502..d1aedbe736 100644 --- a/lib/upgradedb/mysql.2015120201.php +++ b/lib/upgradedb/mysql.2015120201.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("DROP VIEW IF EXISTS vnodes"); $this->Execute("DROP VIEW IF EXISTS vmacs"); @@ -41,7 +40,3 @@ JOIN macs m ON (n.id = m.nodeid) WHERE n.ipaddr <> 0 OR n.ipaddr_pub <> 0 "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2015120201', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2015120202.php b/lib/upgradedb/mysql.2015120202.php index 066ac943b1..45127c1646 100644 --- a/lib/upgradedb/mysql.2015120202.php +++ b/lib/upgradedb/mysql.2015120202.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("DROP VIEW IF EXISTS vnetworks;"); $this->Execute(" @@ -33,7 +32,3 @@ LEFT JOIN hosts h ON (h.id = ne.hostid) WHERE no.ipaddr = 0 AND no.ipaddr_pub = 0; "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2015120202', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2015120800.php b/lib/upgradedb/mysql.2015120800.php index 6830706ebb..edfb3cd29a 100644 --- a/lib/upgradedb/mysql.2015120800.php +++ b/lib/upgradedb/mysql.2015120800.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("INSERT INTO uiconfig (section, var, value) VALUES(?, ?, ?)", array('phpui', 'event_max_userlist_size', '0')); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2015120800', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2015120900.php b/lib/upgradedb/mysql.2015120900.php index 5c3b13a594..dd38c90da0 100644 --- a/lib/upgradedb/mysql.2015120900.php +++ b/lib/upgradedb/mysql.2015120900.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("INSERT INTO uiconfig (section, var, value) VALUES(?, ?, ?)", array('invoices', 'customer_bankaccount', '0')); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2015120900', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2015120901.php b/lib/upgradedb/mysql.2015120901.php index a0fc717168..c070f6e488 100644 --- a/lib/upgradedb/mysql.2015120901.php +++ b/lib/upgradedb/mysql.2015120901.php @@ -23,7 +23,4 @@ /** * @author Maciej_Wawryk */ -$this->BeginTrans(); $this->Execute("ALTER TABLE documents ADD COLUMN cancelled smallint NOT NULL DEFAULT 0"); -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2015120901', 'dbversion')); -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2015121100.php b/lib/upgradedb/mysql.2015121100.php index fc6e1b49f1..8988a6201e 100644 --- a/lib/upgradedb/mysql.2015121100.php +++ b/lib/upgradedb/mysql.2015121100.php @@ -24,7 +24,4 @@ * @author Maciej_Wawryk */ -$this->BeginTrans(); $this->Execute("ALTER TABLE cashsources ADD COLUMN deleted smallint NOT NULL DEFAULT 0"); -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2015121100', 'dbversion')); -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2015121800.php b/lib/upgradedb/mysql.2015121800.php index 84f1a5e0a7..29518ca6f6 100644 --- a/lib/upgradedb/mysql.2015121800.php +++ b/lib/upgradedb/mysql.2015121800.php @@ -24,7 +24,6 @@ * @author Maciej_Wawryk */ -$this->BeginTrans(); $this->Execute("CREATE TABLE usergroups ( id int(11) NOT NULL auto_increment, name varchar(255) DEFAULT '' NOT NULL UNIQUE, @@ -40,5 +39,3 @@ FOREIGN KEY (userid) REFERENCES users (id) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT userassignments_usergroupid_key UNIQUE (usergroupid, userid) );"); -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2015121800', 'dbversion')); -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2015122200.php b/lib/upgradedb/mysql.2015122200.php index 1e505dc913..4abdc54557 100644 --- a/lib/upgradedb/mysql.2015122200.php +++ b/lib/upgradedb/mysql.2015122200.php @@ -44,7 +44,6 @@ function parse_address_2015122200($address) return $res; } -$this->BeginTrans(); $this->Execute("DROP VIEW IF EXISTS customersview"); $this->Execute("DROP VIEW IF EXISTS contractorview"); @@ -125,7 +124,3 @@ function parse_address_2015122200($address) FROM customers c WHERE c.type < 2; "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2015122200', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2015122300.php b/lib/upgradedb/mysql.2015122300.php index 15f3999adb..0d175db8df 100644 --- a/lib/upgradedb/mysql.2015122300.php +++ b/lib/upgradedb/mysql.2015122300.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("DROP VIEW IF EXISTS customerview"); $this->Execute("DROP VIEW IF EXISTS contractorview"); @@ -67,7 +66,3 @@ END) AS post_address FROM customers c WHERE c.type < 2"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2015122300', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2015122301.php b/lib/upgradedb/mysql.2015122301.php index f3708a2fd5..eddc547782 100644 --- a/lib/upgradedb/mysql.2015122301.php +++ b/lib/upgradedb/mysql.2015122301.php @@ -24,7 +24,6 @@ * @author Maciej_Wawryk */ -$this->BeginTrans(); $this->Execute(" CREATE TABLE passwdhistory ( @@ -37,7 +36,3 @@ "); $this->Execute("INSERT INTO uiconfig (section, var, value) VALUES(?, ?, ?)", array('phpui', 'passwordhistory', 6)); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2015122301', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2016011200.php b/lib/upgradedb/mysql.2016011200.php index 5476372a89..e7675ca099 100644 --- a/lib/upgradedb/mysql.2016011200.php +++ b/lib/upgradedb/mysql.2016011200.php @@ -21,13 +21,8 @@ * */ -$this->BeginTrans(); $this->Execute( "UPDATE customercontacts SET type = ((type & ?) | ?) WHERE (type & ?) > 0", array(~64, 16384, 64) ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016011200', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2016011800.php b/lib/upgradedb/mysql.2016011800.php index ed83e1e9d3..427056b1be 100644 --- a/lib/upgradedb/mysql.2016011800.php +++ b/lib/upgradedb/mysql.2016011800.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE uiconfig ADD COLUMN type smallint NOT NULL DEFAULT 0"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016011800', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2016011900.php b/lib/upgradedb/mysql.2016011900.php index 57616c9b11..bc2f585083 100644 --- a/lib/upgradedb/mysql.2016011900.php +++ b/lib/upgradedb/mysql.2016011900.php @@ -21,12 +21,7 @@ * */ -$this->BeginTrans(); define('CONFIG_TYPE_MARGINS_2016011900', 6); $this->Execute("INSERT INTO uiconfig (section, var, value, type) VALUES('phpui', 'document_margins', '10,5,15,5', ?)", array(CONFIG_TYPE_MARGINS_2016011900)); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016011900', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2016012500.php b/lib/upgradedb/mysql.2016012500.php index da9060e9aa..1778ee191f 100644 --- a/lib/upgradedb/mysql.2016012500.php +++ b/lib/upgradedb/mysql.2016012500.php @@ -25,14 +25,9 @@ * @author Maciej_Wawryk */ -$this->BeginTrans(); define('CONFIG_TYPE_MAIL_BACKEND_2016012500', 9); define('CONFIG_TYPE_MAIL_SECURE_2016012500', 10); $this->Execute("INSERT INTO uiconfig (section, var, value, type) VALUES('mail', 'backend', 'pear', ?)", array(CONFIG_TYPE_MAIL_BACKEND_2016012500)); $this->Execute("INSERT INTO uiconfig (section, var, value, type) VALUES('mail', 'smtp_secure', 'ssl', ?)", array(CONFIG_TYPE_MAIL_SECURE_2016012500)); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016012500', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2016012501.php b/lib/upgradedb/mysql.2016012501.php index 6b93a632a9..b61b4eae5c 100644 --- a/lib/upgradedb/mysql.2016012501.php +++ b/lib/upgradedb/mysql.2016012501.php @@ -21,12 +21,7 @@ * */ -$this->BeginTrans(); define('CONFIG_TYPE_DATE_FORMAT_2016012501', 11); $this->Execute("INSERT INTO uiconfig (section, var, value, type) VALUES('payments', 'date_format', '%Y/%m/%d', ?)", array(CONFIG_TYPE_DATE_FORMAT_2016012501)); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016012501', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2016012600.php b/lib/upgradedb/mysql.2016012600.php index 2525807d01..dc0243c1f8 100644 --- a/lib/upgradedb/mysql.2016012600.php +++ b/lib/upgradedb/mysql.2016012600.php @@ -21,12 +21,7 @@ * */ -$this->BeginTrans(); define('CONFIG_TYPE_POSITIVE_INTEGER_2016012600', 2); $this->Execute("INSERT INTO uiconfig (section, var, value, type) VALUES('phpui', 'quicksearch_limit', '15', ?)", array(CONFIG_TYPE_POSITIVE_INTEGER_2016012600)); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016012600', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2016012800.php b/lib/upgradedb/mysql.2016012800.php index cc115fdf12..21e8063c1b 100644 --- a/lib/upgradedb/mysql.2016012800.php +++ b/lib/upgradedb/mysql.2016012800.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE invoicecontents CHANGE value value decimal(12, 5) NOT NULL DEFAULT '0'"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016012800', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2016020200.php b/lib/upgradedb/mysql.2016020200.php index ccb6df36c7..8dbe0393cd 100644 --- a/lib/upgradedb/mysql.2016020200.php +++ b/lib/upgradedb/mysql.2016020200.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("INSERT INTO uiconfig (section, var, value) VALUES('payments', 'default_unit_name', ?)", array('pcs.')); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016020200', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2016020300.php b/lib/upgradedb/mysql.2016020300.php index 5a8d788eaa..025bed23d5 100644 --- a/lib/upgradedb/mysql.2016020300.php +++ b/lib/upgradedb/mysql.2016020300.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE users ADD COLUMN settings mediumtext NOT NULL DEFAULT ''"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016020300', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2016020500.php b/lib/upgradedb/mysql.2016020500.php index 8b11f73dc7..f8a59dda0b 100644 --- a/lib/upgradedb/mysql.2016020500.php +++ b/lib/upgradedb/mysql.2016020500.php @@ -21,12 +21,7 @@ * */ -$this->BeginTrans(); define('CONFIG_TYPE_BOOLEAN_2016020500', 1); $this->Execute("INSERT INTO uiconfig (section, var, value, type) VALUES('phpui', 'helpdesk_notify', 'false', ?)", array(CONFIG_TYPE_BOOLEAN_2016020500)); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016020500', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2016020501.php b/lib/upgradedb/mysql.2016020501.php index 6d9ad872fa..943ac58159 100644 --- a/lib/upgradedb/mysql.2016020501.php +++ b/lib/upgradedb/mysql.2016020501.php @@ -21,13 +21,8 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE invprojects ADD COLUMN divisionid int(11) NULL DEFAULT NULL"); $this->Execute("ALTER TABLE invprojects ADD FOREIGN KEY (divisionid) REFERENCES divisions (id) ON DELETE SET NULL ON UPDATE CASCADE"); $this->Execute("ALTER TABLE netnodes ADD COLUMN divisionid int(11) NULL DEFAULT NULL"); $this->Execute("ALTER TABLE netnodes ADD FOREIGN KEY (divisionid) REFERENCES divisions (id) ON DELETE SET NULL ON UPDATE CASCADE"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016020501', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2016030700.php b/lib/upgradedb/mysql.2016030700.php index 01054ccb9a..a056e912b3 100644 --- a/lib/upgradedb/mysql.2016030700.php +++ b/lib/upgradedb/mysql.2016030700.php @@ -26,12 +26,7 @@ */ -$this->BeginTrans(); define('CONFIG_TYPE_BOOLEAN_2016030700', 1); $this->Execute("INSERT INTO uiconfig (section, var, value, type) VALUES('phpui', 'cache_documents', 'false', ?)", array(CONFIG_TYPE_BOOLEAN_2016030700)); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016030700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2016031400.php b/lib/upgradedb/mysql.2016031400.php index 0337fd6bde..e5bb0569c3 100644 --- a/lib/upgradedb/mysql.2016031400.php +++ b/lib/upgradedb/mysql.2016031400.php @@ -21,11 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE tariffs ADD COLUMN numberplanid integer DEFAULT NULL"); $this->Execute("ALTER TABLE tariffs ADD FOREIGN KEY (numberplanid) REFERENCES numberplans (id) ON DELETE CASCADE ON UPDATE CASCADE"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016031400', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2016031800.php b/lib/upgradedb/mysql.2016031800.php index 9cba690ac5..d305f14d3a 100644 --- a/lib/upgradedb/mysql.2016031800.php +++ b/lib/upgradedb/mysql.2016031800.php @@ -21,11 +21,7 @@ * */ -$this->BeginTrans(); define('CONFIG_TYPE_BOOLEAN_2016031800', 1); $this->Execute("INSERT INTO uiconfig (section, var, value, type) VALUES('phpui', 'quicksearch_autosubmit', 'true', ?)", array(CONFIG_TYPE_BOOLEAN_2016031800)); -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016031800', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2016031900.php b/lib/upgradedb/mysql.2016031900.php index 222bb5a3f6..0b7c68c1c1 100644 --- a/lib/upgradedb/mysql.2016031900.php +++ b/lib/upgradedb/mysql.2016031900.php @@ -21,11 +21,7 @@ * */ -$this->BeginTrans(); define('CONFIG_TYPE_POSITIVE_INTEGER_2016031900', 2); $this->Execute("INSERT INTO uiconfig (section, var, value, type) VALUES('phpui', 'ping_type', '1', ?)", array(CONFIG_TYPE_POSITIVE_INTEGER_2016031900)); -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016031900', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2016032100.php b/lib/upgradedb/mysql.2016032100.php index 5356fdbc42..df82096595 100644 --- a/lib/upgradedb/mysql.2016032100.php +++ b/lib/upgradedb/mysql.2016032100.php @@ -21,11 +21,7 @@ * */ -$this->BeginTrans(); define('CONFIG_TYPE_NONE_2016032100', 7); $this->Execute("INSERT INTO uiconfig (section, var, value, type) VALUES('phpui', 'default_teryt_city', 'false', ?)", array(CONFIG_TYPE_NONE_2016032100)); -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016032100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2016032500.php b/lib/upgradedb/mysql.2016032500.php index 68242e27de..c056343fa1 100644 --- a/lib/upgradedb/mysql.2016032500.php +++ b/lib/upgradedb/mysql.2016032500.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); define('CONFIG_TYPE_NONE_2016032500', 7); define('CONFIG_TYPE_POSITIVE_INTEGER_2016032500', 2); @@ -29,7 +28,3 @@ $this->Execute("INSERT INTO uiconfig (section, var, value, type) VALUES('phpui', 'default_autosuggest_placement', 'bottom', ?)", array(CONFIG_TYPE_NONE_2016032500)); $this->Execute("INSERT INTO uiconfig (section, var, value, type) VALUES('phpui', 'autosuggest_max_length', '40', ?)", array(CONFIG_TYPE_POSITIVE_INTEGER_2016032500)); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016032500', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2016033100.php b/lib/upgradedb/mysql.2016033100.php index 36fc8af1b4..cd63f2b33e 100644 --- a/lib/upgradedb/mysql.2016033100.php +++ b/lib/upgradedb/mysql.2016033100.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("DROP VIEW IF EXISTS vnetworks"); @@ -34,7 +33,3 @@ LEFT JOIN networks ne ON (ne.id = no.netid) LEFT JOIN hosts h ON (h.id = ne.hostid) WHERE no.ipaddr = 0 AND no.ipaddr_pub = 0;"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016033100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2016040700.php b/lib/upgradedb/mysql.2016040700.php index ac37ee549f..6c5bc767c9 100644 --- a/lib/upgradedb/mysql.2016040700.php +++ b/lib/upgradedb/mysql.2016040700.php @@ -23,7 +23,6 @@ define('CONTACT_EMAIL', 8); -$this->BeginTrans(); $this->Execute("DROP VIEW IF EXISTS customermailsview"); $this->Execute("CREATE VIEW customermailsview AS @@ -31,6 +30,3 @@ FROM customercontacts WHERE (type & ?) > 0 AND contact <> '' GROUP BY customerid", array(CONTACT_EMAIL)); -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016040700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2016041900.php b/lib/upgradedb/mysql.2016041900.php index beb953b938..2611e5f655 100644 --- a/lib/upgradedb/mysql.2016041900.php +++ b/lib/upgradedb/mysql.2016041900.php @@ -23,12 +23,8 @@ define('CONFIG_TYPE_NONE_2016041900', 7); -$this->BeginTrans(); $this->Execute( "INSERT INTO uiconfig (section, var, value, type) VALUES('phpui', 'event_usergroup_selection_type', 'update', ?)", array(CONFIG_TYPE_NONE_2016041900) ); -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016041900', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2016051000.php b/lib/upgradedb/mysql.2016051000.php index 9d746a13e5..c7a86df660 100644 --- a/lib/upgradedb/mysql.2016051000.php +++ b/lib/upgradedb/mysql.2016051000.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE events ADD COLUMN creationdate int(11) DEFAULT '0' NOT NULL"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016051000', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2016053000.php b/lib/upgradedb/mysql.2016053000.php index 1c4f94652d..0d433240d8 100644 --- a/lib/upgradedb/mysql.2016053000.php +++ b/lib/upgradedb/mysql.2016053000.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("CREATE TABLE voip_prefixes ( id int(11) AUTO_INCREMENT, @@ -80,7 +79,3 @@ type smallint NOT NULL, voipaccountid int(11) NOT NULL, PRIMARY KEY (id));"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016053000', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2016060600.php b/lib/upgradedb/mysql.2016060600.php index d32a1506e2..4eb2718ba4 100644 --- a/lib/upgradedb/mysql.2016060600.php +++ b/lib/upgradedb/mysql.2016060600.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE voipaccounts ADD COLUMN balance decimal(12,5) NOT NULL DEFAULT 0"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016060600', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2016060800.php b/lib/upgradedb/mysql.2016060800.php index 296c8f6e11..b7dbfc6be2 100644 --- a/lib/upgradedb/mysql.2016060800.php +++ b/lib/upgradedb/mysql.2016060800.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE voip_cdr CHANGE status status smallint NOT NULL"); $this->Execute("ALTER TABLE voip_cdr CHANGE type type smallint NOT NULL"); @@ -69,7 +68,3 @@ define('CONFIG_TYPE_POSITIVE_INTEGER_2016060800', 2); $this->Execute("INSERT INTO uiconfig (section, var, value, type) VALUES('phpui', 'billinglist_pagelimit', '100', ?)", array(CONFIG_TYPE_POSITIVE_INTEGER_2016060800)); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016060800', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2016062300.php b/lib/upgradedb/mysql.2016062300.php index 05f502aeac..3107f6de45 100644 --- a/lib/upgradedb/mysql.2016062300.php +++ b/lib/upgradedb/mysql.2016062300.php @@ -21,11 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE voip_cdr CHANGE caller_prefix_group caller_prefix_group VARCHAR(100) NULL"); $this->Execute("ALTER TABLE voip_cdr CHANGE callee_prefix_group callee_prefix_group VARCHAR(100) NULL"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016062300', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2016062400.php b/lib/upgradedb/mysql.2016062400.php index 3df87a4788..1208617040 100644 --- a/lib/upgradedb/mysql.2016062400.php +++ b/lib/upgradedb/mysql.2016062400.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("CREATE TABLE voip_emergency_numbers ( location_borough int(11) NOT NULL, @@ -31,7 +30,3 @@ UNIQUE KEY number (location_borough, number), FOREIGN KEY (location_borough) REFERENCES location_boroughs (id) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016062400', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2016062401.php b/lib/upgradedb/mysql.2016062401.php index 19dfaab7f0..a85b593bee 100644 --- a/lib/upgradedb/mysql.2016062401.php +++ b/lib/upgradedb/mysql.2016062401.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("CREATE TABLE voip_rules ( id int(11) NOT NULL AUTO_INCREMENT, @@ -49,7 +48,3 @@ FOREIGN KEY (ruleid) REFERENCES voip_rules(id) ON DELETE CASCADE ON UPDATE CASCADE, PRIMARY KEY (id) ) ENGINE=InnoDB;"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016062401', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2016062800.php b/lib/upgradedb/mysql.2016062800.php index 3362111b89..3d84b5fcaf 100644 --- a/lib/upgradedb/mysql.2016062800.php +++ b/lib/upgradedb/mysql.2016062800.php @@ -21,11 +21,6 @@ * */ -$this->BeginTrans(); define('CONFIG_TYPE_POSITIVE_INTEGER_2016062800', 2); $this->Execute("INSERT INTO uiconfig (section, var, value, type) VALUES('voip', 'default_cost_limit', '200', ?)", array(CONFIG_TYPE_POSITIVE_INTEGER_2016062800)); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016062800', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2016070100.php b/lib/upgradedb/mysql.2016070100.php index 88af62d4a0..a9697f76fd 100644 --- a/lib/upgradedb/mysql.2016070100.php +++ b/lib/upgradedb/mysql.2016070100.php @@ -21,9 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE voipaccounts ADD COLUMN cost_limit decimal(12,2) NULL DEFAULT NULL"); -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016070100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2016070500.php b/lib/upgradedb/mysql.2016070500.php index 128891e4c2..8064397d99 100644 --- a/lib/upgradedb/mysql.2016070500.php +++ b/lib/upgradedb/mysql.2016070500.php @@ -21,9 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE voip_cdr ADD UNIQUE (uniqueid)"); -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016070500', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2016070700.php b/lib/upgradedb/mysql.2016070700.php index fc47b2842d..74b3026ca3 100644 --- a/lib/upgradedb/mysql.2016070700.php +++ b/lib/upgradedb/mysql.2016070700.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("CREATE TABLE tarifftags ( id int(11) NOT NULL AUTO_INCREMENT, @@ -41,7 +40,3 @@ CONSTRAINT tariffassignments_tariffid_key FOREIGN KEY (tariffid) REFERENCES tariffs (id) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT tariffassignments_tarifftagid_key FOREIGN KEY (tarifftagid) REFERENCES tarifftags (id) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB;"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016070700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2016071200.php b/lib/upgradedb/mysql.2016071200.php index 9dee0e0b5f..e3080606b0 100644 --- a/lib/upgradedb/mysql.2016071200.php +++ b/lib/upgradedb/mysql.2016071200.php @@ -21,11 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE events ADD closeduserid int(11) NOT NULL DEFAULT 0"); $this->Execute("ALTER TABLE events ADD closeddate int(11) NOT NULL DEFAULT 0"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016071200', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2016071500.php b/lib/upgradedb/mysql.2016071500.php index dd663cf821..bc13d71a44 100644 --- a/lib/upgradedb/mysql.2016071500.php +++ b/lib/upgradedb/mysql.2016071500.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("INSERT INTO uiconfig (section, var, value) VALUES ('phpui', 'settings_timeout', '28800')"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016071500', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2016071900.php b/lib/upgradedb/mysql.2016071900.php index 63b5a90dc6..052dd6fbe5 100644 --- a/lib/upgradedb/mysql.2016071900.php +++ b/lib/upgradedb/mysql.2016071900.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE cashimport CHANGE description description varchar(256) NOT NULL DEFAULT ''"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016071900', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2016072000.php b/lib/upgradedb/mysql.2016072000.php index 555bbab7cf..dcaefaccae 100644 --- a/lib/upgradedb/mysql.2016072000.php +++ b/lib/upgradedb/mysql.2016072000.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE cashimport CHANGE description description text NOT NULL DEFAULT ''"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016072000', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2016080500.php b/lib/upgradedb/mysql.2016080500.php index 1050d1bd79..6b12aecd6c 100644 --- a/lib/upgradedb/mysql.2016080500.php +++ b/lib/upgradedb/mysql.2016080500.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE tariffs ADD COLUMN voip_tariff_id int(11) DEFAULT NULL"); @@ -74,7 +73,3 @@ FOREIGN KEY (voip_account_id) REFERENCES voipaccounts (id) ON DELETE CASCADE ON UPDATE CASCADE, FOREIGN KEY (rule_id) REFERENCES voip_group_rule_assignments (id) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016080500', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2016080800.php b/lib/upgradedb/mysql.2016080800.php index d68c599eea..777f93344e 100644 --- a/lib/upgradedb/mysql.2016080800.php +++ b/lib/upgradedb/mysql.2016080800.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("RENAME TABLE voip_rules TO voip_rule_groups"); @@ -38,7 +37,3 @@ ADD CONSTRAINT voip_rules_ibfk_3 FOREIGN KEY (rule_group_id) REFERENCES voip_rule_groups(id)"); $this->Execute("ALTER TABLE voip_rules CHANGE rule_settings settings text NULL"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016080800', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2016080801.php b/lib/upgradedb/mysql.2016080801.php index 4b88319520..718247d9a0 100644 --- a/lib/upgradedb/mysql.2016080801.php +++ b/lib/upgradedb/mysql.2016080801.php @@ -20,9 +20,3 @@ * USA. * */ - -$this->BeginTrans(); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016080801', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2016082400.php b/lib/upgradedb/mysql.2016082400.php index eb9e83fd24..aa24a7d49c 100644 --- a/lib/upgradedb/mysql.2016082400.php +++ b/lib/upgradedb/mysql.2016082400.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE cashimport CHANGE customer customer text NOT NULL DEFAULT ''"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016082400', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2016082500.php b/lib/upgradedb/mysql.2016082500.php index 07e9a8afc3..a4ce0d2fb7 100644 --- a/lib/upgradedb/mysql.2016082500.php +++ b/lib/upgradedb/mysql.2016082500.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE rtmessages ADD COLUMN type smallint DEFAULT 0 NOT NULL"); @@ -37,7 +36,3 @@ } $this->Execute("DROP TABLE rtnotes"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016082500', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2016082600.php b/lib/upgradedb/mysql.2016082600.php index 08d2e0cd31..948c73f896 100644 --- a/lib/upgradedb/mysql.2016082600.php +++ b/lib/upgradedb/mysql.2016082600.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" CREATE TABLE documentattachments ( @@ -49,7 +48,3 @@ $this->Execute("ALTER TABLE documentcontents DROP COLUMN filename"); $this->Execute("ALTER TABLE documentcontents DROP COLUMN contenttype"); $this->Execute("ALTER TABLE documentcontents DROP COLUMN md5sum"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016082600', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2016082900.php b/lib/upgradedb/mysql.2016082900.php index 5b184b0a64..c838b10511 100644 --- a/lib/upgradedb/mysql.2016082900.php +++ b/lib/upgradedb/mysql.2016082900.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("CREATE TABLE voip_numbers ( id int(11) AUTO_INCREMENT, @@ -36,7 +35,3 @@ SELECT id, phone FROM voipaccounts;"); $this->Execute("ALTER TABLE voipaccounts DROP COLUMN phone;"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016082900', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2016090700.php b/lib/upgradedb/mysql.2016090700.php index 0dc01a61f3..0a00b43c37 100644 --- a/lib/upgradedb/mysql.2016090700.php +++ b/lib/upgradedb/mysql.2016090700.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("CREATE TABLE voip_pool_numbers ( id int(11) NOT NULL AUTO_INCREMENT, @@ -33,7 +32,3 @@ PRIMARY KEY (id), UNIQUE (name) ) ENGINE=InnoDB;"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016090700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2016091300.php b/lib/upgradedb/mysql.2016091300.php index 84ff6f0531..905703d2af 100644 --- a/lib/upgradedb/mysql.2016091300.php +++ b/lib/upgradedb/mysql.2016091300.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("DROP VIEW IF EXISTS vnetworks"); @@ -36,7 +35,3 @@ LEFT JOIN hosts h ON (h.id = ne.hostid) WHERE no.ipaddr = 0 AND no.ipaddr_pub = 0; "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016091300', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2016092100.php b/lib/upgradedb/mysql.2016092100.php index 5a5870dcca..2c2a301cdc 100644 --- a/lib/upgradedb/mysql.2016092100.php +++ b/lib/upgradedb/mysql.2016092100.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE users ADD COLUMN persistentsettings mediumtext NOT NULL DEFAULT ''"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016092100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2016092600.php b/lib/upgradedb/mysql.2016092600.php index f7a8f984c1..105d3716b9 100644 --- a/lib/upgradedb/mysql.2016092600.php +++ b/lib/upgradedb/mysql.2016092600.php @@ -21,13 +21,8 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE users DROP COLUMN swekey_id, DROP INDEX login, ADD UNIQUE INDEX login (login)"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016092600', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2016092900.php b/lib/upgradedb/mysql.2016092900.php index c6c3ac3334..b9903a8951 100644 --- a/lib/upgradedb/mysql.2016092900.php +++ b/lib/upgradedb/mysql.2016092900.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE documents ADD COLUMN published tinyint(1) NOT NULL DEFAULT 0"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016092900', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2016100500.php b/lib/upgradedb/mysql.2016100500.php index 62f88b1e0e..3ae4270890 100644 --- a/lib/upgradedb/mysql.2016100500.php +++ b/lib/upgradedb/mysql.2016100500.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE voip_numbers ADD COLUMN `index` smallint"); @@ -44,7 +43,3 @@ } $this->Execute("ALTER TABLE voip_numbers ADD CONSTRAINT vn_uniq_index UNIQUE (voip_account_id, `index`)"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016100500', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2016100600.php b/lib/upgradedb/mysql.2016100600.php index 84a4efc4d4..b4623ebb20 100644 --- a/lib/upgradedb/mysql.2016100600.php +++ b/lib/upgradedb/mysql.2016100600.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE voip_numbers CHANGE `index` number_index smallint;"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016100600', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2016101000.php b/lib/upgradedb/mysql.2016101000.php index 029924dc76..2bc374a243 100644 --- a/lib/upgradedb/mysql.2016101000.php +++ b/lib/upgradedb/mysql.2016101000.php @@ -30,7 +30,6 @@ define('CONTACT_IM_YAHOO', 1024); define('CONTACT_IM_SKYPE', 2048); -$this->BeginTrans(); $this->Execute("DROP VIEW IF EXISTS customermailsview"); @@ -64,7 +63,3 @@ } $this->Execute("DROP TABLE imessengers"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016101000', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2016101700.php b/lib/upgradedb/mysql.2016101700.php index e62825e4aa..7702ea74cf 100644 --- a/lib/upgradedb/mysql.2016101700.php +++ b/lib/upgradedb/mysql.2016101700.php @@ -21,11 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("INSERT INTO uiconfig (section, var, value) VALUES (?, ?, ?)", array('userpanel', 'show_confirmed_documents_only', 'false')); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016101700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2016101800.php b/lib/upgradedb/mysql.2016101800.php index 4b5f334ae2..6e289bdbc1 100644 --- a/lib/upgradedb/mysql.2016101800.php +++ b/lib/upgradedb/mysql.2016101800.php @@ -21,11 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("INSERT INTO uiconfig (section, var, value) VALUES (?, ?, ?)", array('userpanel', 'module_order', '')); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016101800', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2016102100.php b/lib/upgradedb/mysql.2016102100.php index 5cbd0eea76..c067fb5a64 100644 --- a/lib/upgradedb/mysql.2016102100.php +++ b/lib/upgradedb/mysql.2016102100.php @@ -21,13 +21,8 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE netdevices ADD COLUMN ownerid int(11) NULL"); $this->Execute("ALTER TABLE netdevices ADD CONSTRAINT ownerid_fk FOREIGN KEY (ownerid) REFERENCES customers (id) ON DELETE SET NULL ON UPDATE CASCADE"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016102100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2016102500.php b/lib/upgradedb/mysql.2016102500.php index 96844b94ea..93bcbb601a 100644 --- a/lib/upgradedb/mysql.2016102500.php +++ b/lib/upgradedb/mysql.2016102500.php @@ -38,7 +38,6 @@ function splitNameToFirstAndLastName($users_before) return $users; } -$this->BeginTrans(); $this->Execute("ALTER TABLE users ADD COLUMN firstname varchar(64) NOT NULL DEFAULT ''"); $this->Execute("ALTER TABLE users ADD COLUMN lastname varchar(64) NOT NULL DEFAULT ''"); @@ -55,7 +54,3 @@ function splitNameToFirstAndLastName($users_before) $this->Execute("ALTER TABLE users DROP COLUMN name"); $this->Execute("CREATE VIEW vusers AS SELECT *, " . $this->Concat('firstname', "' '", 'lastname') . " AS name, " . $this->Concat('lastname', "' '", 'firstname') . " AS rname FROM users"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016102500', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2016110800.php b/lib/upgradedb/mysql.2016110800.php index 59d67f233f..39e73414ca 100644 --- a/lib/upgradedb/mysql.2016110800.php +++ b/lib/upgradedb/mysql.2016110800.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE voip_pool_numbers ADD COLUMN type smallint NOT NULL DEFAULT 1"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016110800', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2016112500.php b/lib/upgradedb/mysql.2016112500.php index 9686275309..1ec68789ea 100644 --- a/lib/upgradedb/mysql.2016112500.php +++ b/lib/upgradedb/mysql.2016112500.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); // PostgreSQL fix only - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016112500', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2016112800.php b/lib/upgradedb/mysql.2016112800.php index ee91feb713..119f72ac04 100644 --- a/lib/upgradedb/mysql.2016112800.php +++ b/lib/upgradedb/mysql.2016112800.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("CREATE TABLE voip_number_assignments ( id int(11) NOT NULL auto_increment, @@ -31,7 +30,3 @@ FOREIGN KEY (number_id) REFERENCES voip_numbers (id) ON DELETE CASCADE ON UPDATE CASCADE, FOREIGN KEY (assignment_id) REFERENCES assignments (id) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB;"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016112800', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2016120600.php b/lib/upgradedb/mysql.2016120600.php index b72dccf2a6..2118614acc 100644 --- a/lib/upgradedb/mysql.2016120600.php +++ b/lib/upgradedb/mysql.2016120600.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE divisions ADD COLUMN location_city int(11) DEFAULT NULL, ADD FOREIGN KEY (location_city) REFERENCES location_cities (id) ON UPDATE CASCADE ON DELETE SET NULL"); @@ -30,7 +29,3 @@ $this->Execute("ALTER TABLE divisions ADD COLUMN location_house varchar(32) DEFAULT NULL"); $this->Execute("ALTER TABLE divisions ADD COLUMN location_flat varchar(32) DEFAULT NULL"); $this->Execute("ALTER TABLE divisions ADD COLUMN tax_office_code varchar(8) DEFAULT NULL"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016120600', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2016121200.php b/lib/upgradedb/mysql.2016121200.php index c1a2f0980e..cddc4144cc 100644 --- a/lib/upgradedb/mysql.2016121200.php +++ b/lib/upgradedb/mysql.2016121200.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE documents ADD COLUMN cuserid int(11) NOT NULL DEFAULT 0"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016121200', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2016121400.php b/lib/upgradedb/mysql.2016121400.php index 0373f79069..46b38289f1 100644 --- a/lib/upgradedb/mysql.2016121400.php +++ b/lib/upgradedb/mysql.2016121400.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("CREATE TABLE location_buildings ( id int(11) auto_increment, @@ -36,7 +35,3 @@ FOREIGN KEY (street_id) REFERENCES location_streets (id) ON DELETE SET NULL ON UPDATE CASCADE, INDEX location_cityid_index (city_id) ) ENGINE=InnoDB;"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016121400', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2016121401.php b/lib/upgradedb/mysql.2016121401.php index 08049230f8..f00df541cf 100644 --- a/lib/upgradedb/mysql.2016121401.php +++ b/lib/upgradedb/mysql.2016121401.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE location_buildings ADD COLUMN updated int(11) DEFAULT 0;"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016121401', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2016122100.php b/lib/upgradedb/mysql.2016122100.php index 9a23b517f2..720c72e405 100644 --- a/lib/upgradedb/mysql.2016122100.php +++ b/lib/upgradedb/mysql.2016122100.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE cashsources ADD COLUMN account varchar(48) NOT NULL DEFAULT ''"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016122100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2017010900.php b/lib/upgradedb/mysql.2017010900.php index 6c1a7600f7..8659b7551a 100644 --- a/lib/upgradedb/mysql.2017010900.php +++ b/lib/upgradedb/mysql.2017010900.php @@ -21,11 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE tariffs ADD COLUMN datefrom int(11) NOT NULL DEFAULT 0"); $this->Execute("ALTER TABLE tariffs ADD COLUMN dateto int(11) NOT NULL DEFAULT 0"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017010900', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2017010901.php b/lib/upgradedb/mysql.2017010901.php index 203532741f..3d56b8a8d9 100644 --- a/lib/upgradedb/mysql.2017010901.php +++ b/lib/upgradedb/mysql.2017010901.php @@ -21,11 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE promotions ADD COLUMN datefrom integer NOT NULL DEFAULT 0"); $this->Execute("ALTER TABLE promotions ADD COLUMN dateto integer NOT NULL DEFAULT 0"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017010901', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2017011300.php b/lib/upgradedb/mysql.2017011300.php index 8e2b3f6343..272520f8bd 100644 --- a/lib/upgradedb/mysql.2017011300.php +++ b/lib/upgradedb/mysql.2017011300.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("UPDATE uiconfig SET value = ? WHERE section = ? AND var = ?", array('tls', 'mail', 'smtp_secure')); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017011300', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2017012400.php b/lib/upgradedb/mysql.2017012400.php index 8659bebff0..d6b1209033 100644 --- a/lib/upgradedb/mysql.2017012400.php +++ b/lib/upgradedb/mysql.2017012400.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("DROP VIEW IF EXISTS customerview"); $this->Execute("DROP VIEW IF EXISTS contractorview"); @@ -77,7 +76,3 @@ $this->Execute("ALTER TABLE divisions ADD COLUMN rbe varchar(255) NOT NULL DEFAULT ''"); $this->Execute("ALTER TABLE divisions ADD COLUMN rbename varchar(255) NOT NULL DEFAULT ''"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017012400', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2017013100.php b/lib/upgradedb/mysql.2017013100.php index 9c62ed4367..d04e6a8380 100644 --- a/lib/upgradedb/mysql.2017013100.php +++ b/lib/upgradedb/mysql.2017013100.php @@ -110,7 +110,6 @@ function moveTableLocation($DB, $table) define('LOCATION_ADDRESS_2017013100', 2); define('DEFAULT_LOCATION_ADDRESS_2017013100', 3); -$this->BeginTrans(); $this->Execute("CREATE TABLE addresses ( id int(11) NOT NULL auto_increment, @@ -584,7 +583,3 @@ function moveTableLocation($DB, $table) $this->Execute("DROP INDEX location_street ON nodes;"); $this->Execute("DROP INDEX location_street ON netdevices;"); $this->Execute("DROP INDEX location_city ON netdevices;"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017013100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2017013101.php b/lib/upgradedb/mysql.2017013101.php index 27f3b0406e..1b08b1044b 100644 --- a/lib/upgradedb/mysql.2017013101.php +++ b/lib/upgradedb/mysql.2017013101.php @@ -154,7 +154,3 @@ LEFT JOIN vnodes_mac m ON (n.id = m.nodeid) LEFT JOIN addresses a ON n.address_id = a.id WHERE n.ipaddr <> 0 OR n.ipaddr_pub <> 0;"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017013101', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2017020100.php b/lib/upgradedb/mysql.2017020100.php index bc2b90076c..bdc52c4e9e 100644 --- a/lib/upgradedb/mysql.2017020100.php +++ b/lib/upgradedb/mysql.2017020100.php @@ -28,7 +28,3 @@ (CASE WHEN a.house IS NULL THEN a.street ELSE (CASE WHEN a.flat IS NULL THEN a.street || ' ' || a.house ELSE a.street || ' ' || a.house || '/' || a.flat END) END) as address FROM divisions d JOIN addresses a ON a.id = d.address_id;"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017020100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2017020600.php b/lib/upgradedb/mysql.2017020600.php index 9076209948..db1bb28138 100644 --- a/lib/upgradedb/mysql.2017020600.php +++ b/lib/upgradedb/mysql.2017020600.php @@ -24,7 +24,3 @@ $this->Execute("ALTER TABLE assignments ADD COLUMN address_id int, ADD FOREIGN KEY address_id_fk(address_id) REFERENCES addresses(id) ON DELETE SET NULL ON UPDATE CASCADE;"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017020600', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2017021400.php b/lib/upgradedb/mysql.2017021400.php index 6d25e74e7c..b1fd8bed0b 100644 --- a/lib/upgradedb/mysql.2017021400.php +++ b/lib/upgradedb/mysql.2017021400.php @@ -21,11 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE documents MODIFY zip varchar(10) NULL DEFAULT NULL;"); $this->Execute("ALTER TABLE documents MODIFY city varchar(32) NULL DEFAULT NULL;"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017021400', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2017022200.php b/lib/upgradedb/mysql.2017022200.php index 61fd598613..250a283172 100644 --- a/lib/upgradedb/mysql.2017022200.php +++ b/lib/upgradedb/mysql.2017022200.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("DROP VIEW IF EXISTS vdivisions;"); $this->Execute("DROP VIEW IF EXISTS vnodes;"); @@ -152,7 +151,3 @@ LEFT JOIN hosts h ON (h.id = ne.hostid) LEFT JOIN addresses a ON no.address_id = a.id WHERE no.ipaddr = 0 AND no.ipaddr_pub = 0;"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017022200', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2017022700.php b/lib/upgradedb/mysql.2017022700.php index ebd9919a73..18f969b79d 100644 --- a/lib/upgradedb/mysql.2017022700.php +++ b/lib/upgradedb/mysql.2017022700.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $DEFAULTS = array( 'phpui' => array( @@ -37,7 +36,3 @@ ); } } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017022700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2017030100.php b/lib/upgradedb/mysql.2017030100.php index 0d0968e865..2e0d83d47d 100644 --- a/lib/upgradedb/mysql.2017030100.php +++ b/lib/upgradedb/mysql.2017030100.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); if ($this->ResourceExists('assignments_ibfk_3', LMSDB::RESOURCE_TYPE_CONSTRAINT)) { $this->Execute("ALTER TABLE assignments DROP FOREIGN KEY assignments_ibfk_3"); @@ -42,7 +41,3 @@ $this->Execute("ALTER TABLE documents ADD COLUMN recipient_address_id int(11)"); $this->Execute("ALTER TABLE documents ADD CONSTRAINT recipient_address_id_fk FOREIGN KEY (recipient_address_id) REFERENCES addresses (id) ON DELETE SET NULL ON UPDATE CASCADE"); $this->Execute("ALTER TABLE location_buildings DROP COLUMN flats"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017030100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2017030101.php b/lib/upgradedb/mysql.2017030101.php index 2f88a2918d..ed0e6c91e8 100644 --- a/lib/upgradedb/mysql.2017030101.php +++ b/lib/upgradedb/mysql.2017030101.php @@ -21,11 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE voip_cdr CHANGE time_start_to_end totaltime int(11)"); $this->Execute("ALTER TABLE voip_cdr CHANGE time_answer_to_end billedtime int(11)"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017030101', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2017030300.php b/lib/upgradedb/mysql.2017030300.php index 70440a22c3..10da80e01b 100644 --- a/lib/upgradedb/mysql.2017030300.php +++ b/lib/upgradedb/mysql.2017030300.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE rtmessages ADD COLUMN phonefrom varchar(20) DEFAULT '' NOT NULL"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017030300', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2017030800.php b/lib/upgradedb/mysql.2017030800.php index 97aa2d7798..431ce187e7 100644 --- a/lib/upgradedb/mysql.2017030800.php +++ b/lib/upgradedb/mysql.2017030800.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" CREATE VIEW vaddresses AS @@ -137,7 +136,3 @@ LEFT JOIN vaddresses a ON no.address_id = a.id WHERE no.ipaddr = 0 AND no.ipaddr_pub = 0; "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017030800', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2017031000.php b/lib/upgradedb/mysql.2017031000.php index 69368c8873..48e2b4eaab 100644 --- a/lib/upgradedb/mysql.2017031000.php +++ b/lib/upgradedb/mysql.2017031000.php @@ -21,10 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE events ADD COLUMN ticketid int(11) DEFAULT NULL"); $this->Execute("ALTER TABLE events ADD CONSTRAINT event_ticketid_rttickets_id_fk FOREIGN KEY (ticketid) REFERENCES rttickets (id) ON DELETE SET NULL ON UPDATE CASCADE"); -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017031000', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2017031400.php b/lib/upgradedb/mysql.2017031400.php index 531fa2d05c..822b14f351 100644 --- a/lib/upgradedb/mysql.2017031400.php +++ b/lib/upgradedb/mysql.2017031400.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("DROP VIEW IF EXISTS vnetworks;"); $this->Execute("DROP VIEW IF EXISTS vmacs;"); @@ -140,7 +139,3 @@ LEFT JOIN vaddresses a ON no.address_id = a.id WHERE no.ipaddr = 0 AND no.ipaddr_pub = 0; "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017031400', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2017031500.php b/lib/upgradedb/mysql.2017031500.php index f8ea61091c..2920f72d0e 100644 --- a/lib/upgradedb/mysql.2017031500.php +++ b/lib/upgradedb/mysql.2017031500.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("DROP VIEW IF EXISTS customerview"); $this->Execute("DROP VIEW IF EXISTS contractorview"); @@ -150,7 +149,3 @@ LEFT JOIN vaddresses a ON no.address_id = a.id WHERE no.ipaddr = 0 AND no.ipaddr_pub = 0; "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017031500', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2017031600.php b/lib/upgradedb/mysql.2017031600.php index efadc89e04..a2a37fc28b 100644 --- a/lib/upgradedb/mysql.2017031600.php +++ b/lib/upgradedb/mysql.2017031600.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("DROP VIEW IF EXISTS vnetworks;"); $this->Execute("DROP VIEW IF EXISTS vmacs;"); @@ -145,7 +144,3 @@ LEFT JOIN vaddresses a ON n.address_id = a.id WHERE n.ipaddr <> 0 OR n.ipaddr_pub <> 0 "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017031600', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2017032000.php b/lib/upgradedb/mysql.2017032000.php index 8ba78f99a5..b2f4b42e04 100644 --- a/lib/upgradedb/mysql.2017032000.php +++ b/lib/upgradedb/mysql.2017032000.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("DROP VIEW IF EXISTS vnetworks;"); $this->Execute("DROP VIEW IF EXISTS vmacs;"); @@ -154,7 +153,3 @@ FROM divisions d JOIN addresses a ON a.id = d.address_id; "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017032000', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2017032200.php b/lib/upgradedb/mysql.2017032200.php index d8bb55d461..7eaed639bb 100644 --- a/lib/upgradedb/mysql.2017032200.php +++ b/lib/upgradedb/mysql.2017032200.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("DROP VIEW IF EXISTS contractorview;"); $this->Execute("DROP VIEW IF EXISTS customerview;"); @@ -77,7 +76,3 @@ LEFT JOIN vaddresses a2 ON ca2.address_id = a2.id WHERE c.type < 2 "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017032200', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2017040700.php b/lib/upgradedb/mysql.2017040700.php index e742781dde..7045199b83 100644 --- a/lib/upgradedb/mysql.2017040700.php +++ b/lib/upgradedb/mysql.2017040700.php @@ -20,9 +20,3 @@ * USA. * */ - -$this->BeginTrans(); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017040700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2017041800.php b/lib/upgradedb/mysql.2017041800.php index e113eea643..8d020edb5b 100644 --- a/lib/upgradedb/mysql.2017041800.php +++ b/lib/upgradedb/mysql.2017041800.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("DROP VIEW IF EXISTS customerview;"); $this->Execute("DROP VIEW IF EXISTS contractorview;"); @@ -149,7 +148,3 @@ FROM divisions d JOIN addresses a ON a.id = d.address_id; "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017041800', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2017041801.php b/lib/upgradedb/mysql.2017041801.php index 8abf568581..aa26dda2ff 100644 --- a/lib/upgradedb/mysql.2017041801.php +++ b/lib/upgradedb/mysql.2017041801.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("DROP VIEW IF EXISTS customerview;"); $this->Execute("DROP VIEW IF EXISTS contractorview;"); @@ -80,7 +79,3 @@ LEFT JOIN vaddresses a2 ON ca2.address_id = a2.id WHERE c.type < 2 "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017041800', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2017042700.php b/lib/upgradedb/mysql.2017042700.php index 719c6d90de..929b2d6d92 100644 --- a/lib/upgradedb/mysql.2017042700.php +++ b/lib/upgradedb/mysql.2017042700.php @@ -21,12 +21,7 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE tariffs ADD COLUMN cloud_limit int(11) DEFAULT NULL"); $this->Execute("ALTER TABLE tariffs ADD COLUMN quota_cloud_limit int(11) DEFAULT NULL"); $this->Execute("ALTER TABLE passwd ADD COLUMN quota_cloud int(11) DEFAULT 0 NOT NULL"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017042700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2017051200.php b/lib/upgradedb/mysql.2017051200.php index 95e4f359ae..e251c7e937 100644 --- a/lib/upgradedb/mysql.2017051200.php +++ b/lib/upgradedb/mysql.2017051200.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("DROP VIEW IF EXISTS customerview;"); $this->Execute("DROP VIEW IF EXISTS contractorview;"); @@ -152,7 +151,3 @@ FROM divisions d JOIN vaddresses a ON a.id = d.address_id; "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017051200', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2017051201.php b/lib/upgradedb/mysql.2017051201.php index d4100ec7cf..20f7f2388d 100644 --- a/lib/upgradedb/mysql.2017051201.php +++ b/lib/upgradedb/mysql.2017051201.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("DROP VIEW IF EXISTS customerview;"); $this->Execute("DROP VIEW IF EXISTS contractorview;"); @@ -86,7 +85,3 @@ LEFT JOIN vaddresses a2 ON ca2.address_id = a2.id WHERE c.type < 2 "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017051201', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2017061600.php b/lib/upgradedb/mysql.2017061600.php index d95a23934f..bde865f5f7 100644 --- a/lib/upgradedb/mysql.2017061600.php +++ b/lib/upgradedb/mysql.2017061600.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" CREATE TABLE rtqueuecategories ( @@ -33,7 +32,3 @@ FOREIGN KEY (categoryid) REFERENCES rtcategories (id) ON DELETE CASCADE ON UPDATE CASCADE ); "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017061600', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2017061900.php b/lib/upgradedb/mysql.2017061900.php index 9fbb18c5e0..153a0f63da 100644 --- a/lib/upgradedb/mysql.2017061900.php +++ b/lib/upgradedb/mysql.2017061900.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("DROP VIEW IF EXISTS customeraddressview"); @@ -43,7 +42,3 @@ LEFT JOIN vaddresses a2 ON ca2.address_id = a2.id WHERE c.type < 2 "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017061900', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2017062000.php b/lib/upgradedb/mysql.2017062000.php index fd8883560f..bd48171035 100644 --- a/lib/upgradedb/mysql.2017062000.php +++ b/lib/upgradedb/mysql.2017062000.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("DROP VIEW IF EXISTS customerview;"); $this->Execute("DROP VIEW IF EXISTS contractorview;"); @@ -89,7 +88,3 @@ LEFT JOIN vaddresses a2 ON ca2.address_id = a2.id WHERE c.type < 2 "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017062000', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2017063000.php b/lib/upgradedb/mysql.2017063000.php index c88dedbd67..9fd35ed447 100644 --- a/lib/upgradedb/mysql.2017063000.php +++ b/lib/upgradedb/mysql.2017063000.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $ident_lengths = array( 'location_states' => 2, @@ -37,7 +36,3 @@ array($length, $length) ); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017063000', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2017070100.php b/lib/upgradedb/mysql.2017070100.php index 3f0f5b568a..083f25644c 100644 --- a/lib/upgradedb/mysql.2017070100.php +++ b/lib/upgradedb/mysql.2017070100.php @@ -21,9 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE rttickets ADD COLUMN source tinyint(4) DEFAULT 0 NOT NULL"); -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017070100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2017070300.php b/lib/upgradedb/mysql.2017070300.php index 27aca9d270..1e626222ca 100644 --- a/lib/upgradedb/mysql.2017070300.php +++ b/lib/upgradedb/mysql.2017070300.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); //Helpdesk ticket source define('RT_SOURCE_UNKNOWN', 0); @@ -48,7 +47,3 @@ "INSERT INTO uiconfig (section, var, value) VALUES (?, ?, ?)", array('userpanel', 'visible_ticket_sources', implode(';', array_keys($RT_SOURCES))) ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017070300', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2017070400.php b/lib/upgradedb/mysql.2017070400.php index 515457c63c..0aaf01defe 100644 --- a/lib/upgradedb/mysql.2017070400.php +++ b/lib/upgradedb/mysql.2017070400.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE rtqueues ADD COLUMN deleted tinyint(1) NOT NULL DEFAULT 0"); $this->Execute("ALTER TABLE rtqueues ADD COLUMN deltime int(11) NOT NULL DEFAULT 0"); @@ -34,7 +33,3 @@ $this->Execute("ALTER TABLE rtmessages ADD COLUMN deleted tinyint(1) NOT NULL DEFAULT 0"); $this->Execute("ALTER TABLE rtmessages ADD COLUMN deltime int(11) NOT NULL DEFAULT 0"); $this->Execute("ALTER TABLE rtmessages ADD COLUMN deluserid int(11) NOT NULL DEFAULT 0"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017070400', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2017070600.php b/lib/upgradedb/mysql.2017070600.php index cc9c739237..a95e7ab661 100644 --- a/lib/upgradedb/mysql.2017070600.php +++ b/lib/upgradedb/mysql.2017070600.php @@ -21,9 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE netnodes ADD COLUMN info text DEFAULT NULL"); -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017070600', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2017070700.php b/lib/upgradedb/mysql.2017070700.php index 3c160efafc..c1429d3eb5 100644 --- a/lib/upgradedb/mysql.2017070700.php +++ b/lib/upgradedb/mysql.2017070700.php @@ -21,12 +21,7 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE rttickets ADD COLUMN address_id int(11) DEFAULT NULL"); $this->Execute("ALTER TABLE rttickets ADD CONSTRAINT rttickets_address_id_fk FOREIGN KEY (address_id) REFERENCES addresses (id) ON UPDATE CASCADE ON DELETE CASCADE"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017070700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2017071000.php b/lib/upgradedb/mysql.2017071000.php index b1f5bfe851..30b38cb5ab 100644 --- a/lib/upgradedb/mysql.2017071000.php +++ b/lib/upgradedb/mysql.2017071000.php @@ -21,12 +21,7 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE rttickets ADD COLUMN nodeid int(11) DEFAULT NULL"); $this->Execute("ALTER TABLE rttickets ADD CONSTRAINT rttickets_nodeid_fk FOREIGN KEY (nodeid) REFERENCES nodes (id) ON UPDATE CASCADE ON DELETE CASCADE"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017071000', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2017071100.php b/lib/upgradedb/mysql.2017071100.php index 9e89e0aa6e..69dbbfb2c6 100644 --- a/lib/upgradedb/mysql.2017071100.php +++ b/lib/upgradedb/mysql.2017071100.php @@ -21,12 +21,7 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE events ADD COLUMN address_id int(11) DEFAULT NULL"); $this->Execute("ALTER TABLE events ADD CONSTRAINT events_address_id_fk FOREIGN KEY (address_id) REFERENCES addresses (id) ON UPDATE CASCADE ON DELETE CASCADE"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017071100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2017071900.php b/lib/upgradedb/mysql.2017071900.php index 2fc9fe13c0..2536f01068 100644 --- a/lib/upgradedb/mysql.2017071900.php +++ b/lib/upgradedb/mysql.2017071900.php @@ -21,10 +21,6 @@ * */ -$this->BeginTrans(); -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017071900', 'dbversion')); $this->Execute("ALTER TABLE taxes ADD COLUMN reversecharge tinyint(1) DEFAULT 0 NOT NULL"); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2017072100.php b/lib/upgradedb/mysql.2017072100.php index f957516533..f3a1d88ea8 100644 --- a/lib/upgradedb/mysql.2017072100.php +++ b/lib/upgradedb/mysql.2017072100.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("INSERT INTO uiconfig (section, var, value) VALUES(?, ?, ?)", array('phpui', 'helpdesk_notification_mail_subject', '[RT#%tid] %subject')); @@ -40,7 +39,3 @@ Telefon: %phone')); $this->Execute("INSERT INTO uiconfig (section, var, value) VALUES(?, ?, ?)", array('phpui', 'helpdesk_customerinfo_sms_body', 'Klient: %custname ID: %cid Adres: %address Telefon: %phone')); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017072100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2017080500.php b/lib/upgradedb/mysql.2017080500.php index 8a2bd13c45..2c0f401c29 100644 --- a/lib/upgradedb/mysql.2017080500.php +++ b/lib/upgradedb/mysql.2017080500.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("INSERT INTO uiconfig (section, var, value) VALUES (?, ?, ?)", array('userpanel', 'change_notification_mail_sender', '')); @@ -31,7 +30,3 @@ VALUES (?, ?, ?)", array('userpanel', 'change_notification_mail_subject', '')); $this->Execute("INSERT INTO uiconfig (section, var, value) VALUES (?, ?, ?)", array('userpanel', 'change_notification_mail_body', '')); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017080500', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2017080600.php b/lib/upgradedb/mysql.2017080600.php index db470042f2..4be3e6f23d 100644 --- a/lib/upgradedb/mysql.2017080600.php +++ b/lib/upgradedb/mysql.2017080600.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("INSERT INTO uiconfig (section, var, value) VALUES (?, ?, ?)", array('userpanel', 'change_confirmation_mail_subject', '')); @@ -31,7 +30,3 @@ VALUES (?, ?, ?)", array('userpanel', 'change_rejection_mail_subject', '')); $this->Execute("INSERT INTO uiconfig (section, var, value) VALUES (?, ?, ?)", array('userpanel', 'change_rejection_mail_body', '')); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017080600', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2017090800.php b/lib/upgradedb/mysql.2017090800.php index 6f6032f81c..25d6138657 100644 --- a/lib/upgradedb/mysql.2017090800.php +++ b/lib/upgradedb/mysql.2017090800.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" CREATE VIEW vnodetariffs_allsuspended AS @@ -132,7 +131,3 @@ OR (t1.nodeid IS NULL AND t2.nodeid IS NOT NULL) OR (t1.nodeid IS NULL AND t2.nodeid IS NULL)) "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017090800', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2017091300.php b/lib/upgradedb/mysql.2017091300.php index 2d68192dbe..82aab8ac4c 100644 --- a/lib/upgradedb/mysql.2017091300.php +++ b/lib/upgradedb/mysql.2017091300.php @@ -21,13 +21,8 @@ * */ -$this->BeginTrans(); $this->Execute("INSERT INTO uiconfig (section, var, value) VALUES (?, ?, ?)", array('userpanel', 'google_recaptcha_sitekey', '')); $this->Execute("INSERT INTO uiconfig (section, var, value) VALUES (?, ?, ?)", array('userpanel', 'google_recaptcha_secret', '')); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017091300', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2017091400.php b/lib/upgradedb/mysql.2017091400.php index fb267a6925..d599a89a2f 100644 --- a/lib/upgradedb/mysql.2017091400.php +++ b/lib/upgradedb/mysql.2017091400.php @@ -21,12 +21,7 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE netnodes ADD COLUMN createtime int(11)"); $this->Execute("ALTER TABLE netnodes ADD COLUMN lastinspectiontime int(11) DEFAULT NULL"); $this->Execute("ALTER TABLE netnodes ADD COLUMN admcontact int(11) DEFAULT NULL"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017091400', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2017092400.php b/lib/upgradedb/mysql.2017092400.php index f1f7c99d34..c8999f9262 100644 --- a/lib/upgradedb/mysql.2017092400.php +++ b/lib/upgradedb/mysql.2017092400.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE rttickets ADD COLUMN netnodeid int(11)"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017092400', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2017092800.php b/lib/upgradedb/mysql.2017092800.php index d383f72399..8745a59442 100644 --- a/lib/upgradedb/mysql.2017092800.php +++ b/lib/upgradedb/mysql.2017092800.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE rtcategories ADD COLUMN style text DEFAULT ''"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017092800', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2017092900.php b/lib/upgradedb/mysql.2017092900.php index 5c71cd3f96..08c2394c4c 100644 --- a/lib/upgradedb/mysql.2017092900.php +++ b/lib/upgradedb/mysql.2017092900.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE assignments ADD COLUMN docid int(11) DEFAULT NULL"); $this->Execute("ALTER TABLE assignments ADD CONSTRAINT assignments_docid_fkey @@ -41,7 +40,3 @@ $this->Execute("DELETE FROM debitnotecontents WHERE NOT EXISTS (SELECT null FROM documents d WHERE debitnotecontents.docid = d.id)"); $this->Execute("ALTER TABLE debitnotecontents ADD CONSTRAINT debitnotecontents_docid_fkey FOREIGN KEY (docid) REFERENCES documents (id) ON DELETE CASCADE ON UPDATE CASCADE"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017092900', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2017092901.php b/lib/upgradedb/mysql.2017092901.php index 00d2dd9719..3e1b36db47 100644 --- a/lib/upgradedb/mysql.2017092901.php +++ b/lib/upgradedb/mysql.2017092901.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE documents ADD COLUMN template varchar(255) DEFAULT NULL"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017092901', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2017101100.php b/lib/upgradedb/mysql.2017101100.php index 8d4540cf26..2d9c2b4346 100644 --- a/lib/upgradedb/mysql.2017101100.php +++ b/lib/upgradedb/mysql.2017101100.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $sql_tables = array( 'documents' => array( @@ -113,7 +112,3 @@ OR " . $props['column'] . " NOT IN (" . $cid_string . ")"); } } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017101100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2017101101.php b/lib/upgradedb/mysql.2017101101.php index 9e27511dac..945f36bad7 100644 --- a/lib/upgradedb/mysql.2017101101.php +++ b/lib/upgradedb/mysql.2017101101.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $sql_tables = array( 'documents' => array( @@ -164,7 +163,3 @@ OR (t1.nodeid IS NULL AND t2.nodeid IS NOT NULL) OR (t1.nodeid IS NULL AND t2.nodeid IS NULL)) "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017101101', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2017101102.php b/lib/upgradedb/mysql.2017101102.php index 23cc63f632..816c8f5e45 100644 --- a/lib/upgradedb/mysql.2017101102.php +++ b/lib/upgradedb/mysql.2017101102.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE nodes MODIFY netdev int(11) NULL"); $this->Execute("ALTER TABLE nodes ALTER COLUMN netdev SET DEFAULT NULL"); @@ -34,7 +33,3 @@ $this->Execute("UPDATE nodes SET netdev = NULL WHERE netdev = 0 OR netdev NOT IN (" . $sql_netdevids . ")"); $this->Execute("DELETE FROM netlinks WHERE src NOT IN (" . $sql_netdevids . ") OR dst NOT IN (" . $sql_netdevids . ")"); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017101102', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2017101103.php b/lib/upgradedb/mysql.2017101103.php index ed85b511a7..c70f2eee1f 100644 --- a/lib/upgradedb/mysql.2017101103.php +++ b/lib/upgradedb/mysql.2017101103.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE nodes ADD CONSTRAINT nodes_netdev_fkey FOREIGN KEY (netdev) REFERENCES netdevices (id) ON DELETE SET NULL ON UPDATE CASCADE"); @@ -32,7 +31,3 @@ $this->Execute("ALTER TABLE netlinks ALTER COLUMN dst DROP DEFAULT"); $this->Execute("ALTER TABLE netlinks ADD CONSTRAINT netlinks_dst_fkey FOREIGN KEY (dst) REFERENCES netdevices (id) ON DELETE CASCADE ON UPDATE CASCADE"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017101103', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2017101200.php b/lib/upgradedb/mysql.2017101200.php index 71822788a9..a57f166fe8 100644 --- a/lib/upgradedb/mysql.2017101200.php +++ b/lib/upgradedb/mysql.2017101200.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("ALTER TABLE documents MODIFY userid int(11) NULL"); $this->Execute("ALTER TABLE documents ALTER COLUMN userid SET DEFAULT NULL"); @@ -78,7 +77,3 @@ $this->Execute("UPDATE messages SET userid = NULL WHERE userid = 0 OR userid NOT IN (" . $sql_userids . ")"); $this->Execute("UPDATE logtransactions SET userid = NULL WHERE userid = 0 OR userid NOT IN (" . $sql_userids . ")"); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017101200', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2017101201.php b/lib/upgradedb/mysql.2017101201.php index c644499781..ab602fcf2f 100644 --- a/lib/upgradedb/mysql.2017101201.php +++ b/lib/upgradedb/mysql.2017101201.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("ALTER TABLE documents ADD CONSTRAINT documents_userid_fkey FOREIGN KEY (userid) REFERENCES users (id) ON DELETE SET NULL ON UPDATE CASCADE"); @@ -60,7 +59,3 @@ FOREIGN KEY (userid) REFERENCES users (id) ON DELETE SET NULL ON UPDATE CASCADE"); $this->Execute("ALTER TABLE logtransactions ADD CONSTRAINT logtransactions_userid_fkey FOREIGN KEY (userid) REFERENCES users (id) ON DELETE SET NULL ON UPDATE CASCADE"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017101201', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2017101202.php b/lib/upgradedb/mysql.2017101202.php index f6668eac6c..c54f9fac33 100644 --- a/lib/upgradedb/mysql.2017101202.php +++ b/lib/upgradedb/mysql.2017101202.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("ALTER TABLE customers MODIFY creatorid int(11) NULL"); $this->Execute("ALTER TABLE customers ALTER COLUMN creatorid SET DEFAULT NULL"); @@ -52,7 +51,3 @@ $this->Execute("UPDATE voipaccounts SET modid = NULL WHERE modid = 0 OR modid NOT IN (" . $sql_userids . ")"); $this->Execute("UPDATE rttickets SET creatorid = NULL WHERE creatorid = 0 OR creatorid NOT IN (" . $sql_userids . ")"); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017101202', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2017101203.php b/lib/upgradedb/mysql.2017101203.php index 2c49aa6f0a..b8517d29d1 100644 --- a/lib/upgradedb/mysql.2017101203.php +++ b/lib/upgradedb/mysql.2017101203.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("ALTER TABLE customers ADD CONSTRAINT customers_creatorid_fkey FOREIGN KEY (creatorid) REFERENCES users (id) ON DELETE SET NULL ON UPDATE CASCADE"); @@ -40,7 +39,3 @@ FOREIGN KEY (modid) REFERENCES users (id) ON DELETE SET NULL ON UPDATE CASCADE"); $this->Execute("ALTER TABLE rttickets ADD CONSTRAINT rttickets_creatorid_fkey FOREIGN KEY (creatorid) REFERENCES users (id) ON DELETE SET NULL ON UPDATE CASCADE"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017101203', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2017101204.php b/lib/upgradedb/mysql.2017101204.php index d12b5156f8..c52856aebc 100644 --- a/lib/upgradedb/mysql.2017101204.php +++ b/lib/upgradedb/mysql.2017101204.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("DROP VIEW vnodealltariffs_tariffs"); $this->Execute("DROP VIEW vnodetariffs_tariffs"); @@ -421,7 +420,3 @@ $this->Execute("UPDATE up_help SET reference = NULL WHERE reference IS NOT NULL AND reference NOT IN (" . $sql_ids . ")"); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017101204', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2017101205.php b/lib/upgradedb/mysql.2017101205.php index faca972882..42df844371 100644 --- a/lib/upgradedb/mysql.2017101205.php +++ b/lib/upgradedb/mysql.2017101205.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("ALTER TABLE customers ADD CONSTRAINT customers_divisionid_fkey FOREIGN KEY (divisionid) REFERENCES divisions (id) ON DELETE SET NULL ON UPDATE CASCADE"); @@ -161,7 +160,3 @@ AND a.id NOT IN (SELECT assignmentid FROM nodeassignments) GROUP BY n.id "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017101205', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2017101600.php b/lib/upgradedb/mysql.2017101600.php index fcf989811e..d2cf8f19b5 100644 --- a/lib/upgradedb/mysql.2017101600.php +++ b/lib/upgradedb/mysql.2017101600.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE ewx_stm_nodes MODIFY channelid int(11) NULL"); $this->Execute("ALTER TABLE ewx_stm_nodes ALTER COLUMN channelid SET DEFAULT NULL"); @@ -38,7 +37,3 @@ $this->Execute("ALTER TABLE ewx_stm_nodes ADD CONSTRAINT ewx_stm_nodes_channelid_fkey FOREIGN KEY (channelid) REFERENCES ewx_stm_channels (id) ON DELETE SET NULL ON UPDATE CASCADE"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017101600', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2017101601.php b/lib/upgradedb/mysql.2017101601.php index c29230c8c8..62b5b5b078 100644 --- a/lib/upgradedb/mysql.2017101601.php +++ b/lib/upgradedb/mysql.2017101601.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE ewx_stm_channels MODIFY cid int(11) NULL"); $this->Execute("ALTER TABLE ewx_stm_channels ALTER COLUMN cid SET DEFAULT NULL"); @@ -38,7 +37,3 @@ $this->Execute("ALTER TABLE ewx_stm_channels ADD CONSTRAINT ewx_stm_channels_cid_fkey FOREIGN KEY (cid) REFERENCES ewx_channels (id) ON DELETE SET NULL ON UPDATE CASCADE"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017101601', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2017101602.php b/lib/upgradedb/mysql.2017101602.php index d31791101e..a105889bd6 100644 --- a/lib/upgradedb/mysql.2017101602.php +++ b/lib/upgradedb/mysql.2017101602.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE ewx_stm_nodes MODIFY nodeid int(11) NULL"); $this->Execute("ALTER TABLE ewx_stm_nodes ALTER COLUMN nodeid SET DEFAULT NULL"); @@ -38,7 +37,3 @@ $this->Execute("ALTER TABLE ewx_stm_nodes ADD CONSTRAINT ewx_stm_nodes_nodeid_fkey FOREIGN KEY (nodeid) REFERENCES nodes (id) ON DELETE SET NULL ON UPDATE CASCADE"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017101602', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2017101800.php b/lib/upgradedb/mysql.2017101800.php index 38e01a9bc2..de81ac0676 100644 --- a/lib/upgradedb/mysql.2017101800.php +++ b/lib/upgradedb/mysql.2017101800.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE rttickets ADD COLUMN requestor_mail varchar(255) DEFAULT NULL"); $this->Execute("ALTER TABLE rttickets ADD COLUMN requestor_phone varchar(32) DEFAULT NULL"); @@ -38,7 +37,3 @@ } } } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017101800', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2017102600.php b/lib/upgradedb/mysql.2017102600.php index 5d4d79b089..7dd7c4148a 100644 --- a/lib/upgradedb/mysql.2017102600.php +++ b/lib/upgradedb/mysql.2017102600.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("DROP VIEW vnodealltariffs"); $this->Execute("DROP VIEW vnodealltariffs_tariffs"); @@ -117,7 +116,3 @@ OR (t1.nodeid IS NULL AND t2.nodeid IS NOT NULL) OR (t1.nodeid IS NULL AND t2.nodeid IS NULL)) "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017102600', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2017103000.php b/lib/upgradedb/mysql.2017103000.php index ea9cce473c..ad1420d5cd 100644 --- a/lib/upgradedb/mysql.2017103000.php +++ b/lib/upgradedb/mysql.2017103000.php @@ -21,12 +21,7 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE promotionassignments MODIFY selectionid varchar(60) NULL"); $this->Execute("ALTER TABLE promotionassignments ALTER COLUMN selectionid SET DEFAULT NULL"); $this->Execute("UPDATE promotionassignments SET selectionid = NULL WHERE selectionid = '0'"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017103000', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2017103100.php b/lib/upgradedb/mysql.2017103100.php index cf5fd54448..7a50a9d356 100644 --- a/lib/upgradedb/mysql.2017103100.php +++ b/lib/upgradedb/mysql.2017103100.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE promotionassignments ADD COLUMN orderid int(11) NOT NULL DEFAULT 0"); @@ -43,7 +42,3 @@ ); } } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017103100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2017103101.php b/lib/upgradedb/mysql.2017103101.php index a5969ba64a..2c67df7f65 100644 --- a/lib/upgradedb/mysql.2017103101.php +++ b/lib/upgradedb/mysql.2017103101.php @@ -51,7 +51,6 @@ define('RECIPIENT_ADDRESS', 4); } -$this->BeginTrans(); $this->Execute("ALTER TABLE documents ADD COLUMN post_address_id int(11)"); $this->Execute("ALTER TABLE documents ADD CONSTRAINT documents_post_address_id_fkey @@ -76,7 +75,3 @@ } } } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017103101', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2017110300.php b/lib/upgradedb/mysql.2017110300.php index a5b0d90d3d..51d3221354 100644 --- a/lib/upgradedb/mysql.2017110300.php +++ b/lib/upgradedb/mysql.2017110300.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE promotionassignments CHANGE selectionid label varchar(60) DEFAULT NULL"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017110300', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2017111300.php b/lib/upgradedb/mysql.2017111300.php index da1b5ed04c..bc2188381f 100644 --- a/lib/upgradedb/mysql.2017111300.php +++ b/lib/upgradedb/mysql.2017111300.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE tariffs ADD COLUMN authtype tinyint(1) DEFAULT 0 NOT NULL"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017111300', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2017112100.php b/lib/upgradedb/mysql.2017112100.php index ee221d101c..7abff45bf2 100644 --- a/lib/upgradedb/mysql.2017112100.php +++ b/lib/upgradedb/mysql.2017112100.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE documents ADD COLUMN commitflags tinyint(1) DEFAULT 0 NOT NULL"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017112100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2017112200.php b/lib/upgradedb/mysql.2017112200.php index 56cff3e06d..720003ee85 100644 --- a/lib/upgradedb/mysql.2017112200.php +++ b/lib/upgradedb/mysql.2017112200.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("DROP VIEW teryt_simc"); $this->Execute(" @@ -36,7 +35,3 @@ JOIN location_states s ON (d.stateid = s.id) LEFT JOIN location_cities cc ON (c.cityid = cc.id) "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017112200', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2018010500.php b/lib/upgradedb/mysql.2018010500.php index 891fbac857..f657e60bca 100644 --- a/lib/upgradedb/mysql.2018010500.php +++ b/lib/upgradedb/mysql.2018010500.php @@ -21,12 +21,7 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE assignments ADD COLUMN separatedocument tinyint(1) DEFAULT 0 NOT NULL"); $this->Execute("UPDATE assignments SET separatedocument = 1, invoice = 1 WHERE invoice = 2"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2018010500', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2018011700.php b/lib/upgradedb/mysql.2018011700.php index ff54e91524..c7902933f4 100644 --- a/lib/upgradedb/mysql.2018011700.php +++ b/lib/upgradedb/mysql.2018011700.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE rttickets ADD COLUMN priority tinyint(4) DEFAULT 0 NOT NULL"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2018011700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2018012200.php b/lib/upgradedb/mysql.2018012200.php index 9420d73fc9..fc6c646861 100644 --- a/lib/upgradedb/mysql.2018012200.php +++ b/lib/upgradedb/mysql.2018012200.php @@ -21,13 +21,8 @@ * */ -$this->BeginTrans(); $this->Execute( "INSERT INTO uiconfig (section, var, value) VALUES (?, ?, ?)", array('userpanel', 'allow_reopen_tickets_newer_than', '0') ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2018012200', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2018020800.php b/lib/upgradedb/mysql.2018020800.php index 168bf1ff2e..60b3aba9ff 100644 --- a/lib/upgradedb/mysql.2018020800.php +++ b/lib/upgradedb/mysql.2018020800.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("DROP VIEW vdivisions"); $this->Execute("ALTER TABLE divisions ADD COLUMN telecomnumber varchar(255) NOT NULL DEFAULT ''"); @@ -32,7 +31,3 @@ FROM divisions d JOIN vaddresses a ON a.id = d.address_id "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2018020800', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2018022200.php b/lib/upgradedb/mysql.2018022200.php index e9c37dbcae..27b7192754 100644 --- a/lib/upgradedb/mysql.2018022200.php +++ b/lib/upgradedb/mysql.2018022200.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("DELETE FROM pna WHERE fromhouse REGEXP '[a-z]' OR tohouse REGEXP '[a-z]'"); @@ -35,7 +34,3 @@ $this->Execute("CREATE INDEX pna_fromnumber_idx ON pna (fromnumber)"); $this->Execute("CREATE INDEX pna_tonumber_idx ON pna (tonumber)"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2018022200', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2018022400.php b/lib/upgradedb/mysql.2018022400.php index 5cf3c1141e..47e3be05ae 100644 --- a/lib/upgradedb/mysql.2018022400.php +++ b/lib/upgradedb/mysql.2018022400.php @@ -21,13 +21,8 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE pna ADD COLUMN streetname varchar(100) DEFAULT NULL"); $this->Execute("ALTER TABLE pna DROP INDEX zip, ADD UNIQUE zip (zip, cityid, streetid, streetname, fromnumber, fromletter, tonumber, toletter, parity)"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2018022400', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2018022500.php b/lib/upgradedb/mysql.2018022500.php index 002bcafff7..0f64c5542f 100644 --- a/lib/upgradedb/mysql.2018022500.php +++ b/lib/upgradedb/mysql.2018022500.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE pna MODIFY COLUMN cityid int(11) NULL"); $this->Execute("ALTER TABLE pna ALTER COLUMN cityid SET DEFAULT NULL"); @@ -30,7 +29,3 @@ $this->Execute("ALTER TABLE pna DROP INDEX zip, ADD UNIQUE zip (zip, cityid, cityname, streetid, streetname, fromnumber, fromletter, tonumber, toletter, parity)"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2018022500', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2018022600.php b/lib/upgradedb/mysql.2018022600.php index a98faa834a..a513bb5188 100644 --- a/lib/upgradedb/mysql.2018022600.php +++ b/lib/upgradedb/mysql.2018022600.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE records MODIFY COLUMN type varchar(10)"); $this->Execute("ALTER TABLE records MODIFY COLUMN content varchar(65535)"); @@ -70,7 +69,3 @@ UNIQUE KEY name (name, algorithm) ) Engine=InnoDB "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2018022600', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2018032100.php b/lib/upgradedb/mysql.2018032100.php index ff129aeac7..b903e01cfa 100644 --- a/lib/upgradedb/mysql.2018032100.php +++ b/lib/upgradedb/mysql.2018032100.php @@ -21,11 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE voip_number_assignments ADD CONSTRAINT voip_number_assignments_assignment_id_key UNIQUE (assignment_id, number_id)"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2018032100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2018032300.php b/lib/upgradedb/mysql.2018032300.php index 9216db055f..739d8a6229 100644 --- a/lib/upgradedb/mysql.2018032300.php +++ b/lib/upgradedb/mysql.2018032300.php @@ -21,9 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE networks ADD COLUMN snat int(16) unsigned NOT NULL DEFAULT 0"); -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2018032300', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2018032900.php b/lib/upgradedb/mysql.2018032900.php index 494c28895a..1058bdbef3 100644 --- a/lib/upgradedb/mysql.2018032900.php +++ b/lib/upgradedb/mysql.2018032900.php @@ -21,11 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE rttickets ADD COLUMN netdevid int(11) DEFAULT NULL"); $this->Execute("ALTER TABLE rttickets ADD CONSTRAINT rttickets_netdevid_fkey FOREIGN KEY (netdevid) REFERENCES netdevices (id) ON UPDATE CASCADE ON DELETE SET NULL"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2018032900', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2018041400.php b/lib/upgradedb/mysql.2018041400.php index 6a461b560b..f2e0f9d7ef 100644 --- a/lib/upgradedb/mysql.2018041400.php +++ b/lib/upgradedb/mysql.2018041400.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE records MODIFY COLUMN content text"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2018041400', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2018042700.php b/lib/upgradedb/mysql.2018042700.php index 22b83da84d..ee0de9b48a 100644 --- a/lib/upgradedb/mysql.2018042700.php +++ b/lib/upgradedb/mysql.2018042700.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("DROP VIEW vnodealltariffs"); $this->Execute("DROP VIEW vnodealltariffs_tariffs"); @@ -182,7 +181,3 @@ OR (t1.nodeid IS NULL AND t2.nodeid IS NOT NULL) OR (t1.nodeid IS NULL AND t2.nodeid IS NULL)) "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2018042700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2018051400.php b/lib/upgradedb/mysql.2018051400.php index fdf832f087..efad09cada 100644 --- a/lib/upgradedb/mysql.2018051400.php +++ b/lib/upgradedb/mysql.2018051400.php @@ -21,11 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE rttickets ADD COLUMN verifierid int(11) DEFAULT NULL"); $this->Execute("ALTER TABLE rttickets ADD CONSTRAINT rttickets_verifierid_fkey FOREIGN KEY (verifierid) REFERENCES users (id) ON DELETE SET NULL ON UPDATE CASCADE"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2018051400', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2018051500.php b/lib/upgradedb/mysql.2018051500.php index 1ac6c220ff..1b710932a7 100644 --- a/lib/upgradedb/mysql.2018051500.php +++ b/lib/upgradedb/mysql.2018051500.php @@ -21,9 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE rttickets ADD COLUMN deadline int(11) DEFAULT NULL"); -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2018051500', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2018051700.php b/lib/upgradedb/mysql.2018051700.php index e1c4e8d3a8..f7c411ca9e 100644 --- a/lib/upgradedb/mysql.2018051700.php +++ b/lib/upgradedb/mysql.2018051700.php @@ -21,11 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE rtqueues ADD COLUMN verifierid int(11) DEFAULT NULL"); $this->Execute("ALTER TABLE rtqueues ADD CONSTRAINT rtqueues_verifierid_fkey FOREIGN KEY (verifierid) REFERENCES users (id) ON DELETE SET NULL ON UPDATE CASCADE"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2018051700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2018052000.php b/lib/upgradedb/mysql.2018052000.php index e931d8b7cf..53b80c827c 100644 --- a/lib/upgradedb/mysql.2018052000.php +++ b/lib/upgradedb/mysql.2018052000.php @@ -21,9 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE documents ADD COLUMN comment text DEFAULT NULL"); -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2018052000', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2018052800.php b/lib/upgradedb/mysql.2018052800.php index c2a0f28adf..2f48848348 100644 --- a/lib/upgradedb/mysql.2018052800.php +++ b/lib/upgradedb/mysql.2018052800.php @@ -21,13 +21,8 @@ * */ -$this->BeginTrans(); $this->Execute( "INSERT INTO uiconfig (section, var, value) VALUES (?, ?, ?)", array('userpanel', 'pin_changes', 'true') ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2018052800', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2018062000.php b/lib/upgradedb/mysql.2018062000.php index 86fc99a215..7f33af5956 100644 --- a/lib/upgradedb/mysql.2018062000.php +++ b/lib/upgradedb/mysql.2018062000.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); if ($this->ResourceExists('rttickets_address_id_fk', LMSDB::RESOURCE_TYPE_CONSTRAINT)) { $this->Execute("ALTER TABLE rttickets DROP FOREIGN KEY rttickets_address_id_fk"); @@ -39,7 +38,3 @@ FOREIGN KEY (address_id) REFERENCES addresses (id) ON DELETE SET NULL ON UPDATE CASCADE"); $this->Execute("ALTER TABLE rttickets ADD CONSTRAINT rttickets_nodeid_fkey FOREIGN KEY (nodeid) REFERENCES nodes (id) ON DELETE SET NULL ON UPDATE CASCADE"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2018062000', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2018070200.php b/lib/upgradedb/mysql.2018070200.php index 0a296cc7d8..1d3a47c46e 100644 --- a/lib/upgradedb/mysql.2018070200.php +++ b/lib/upgradedb/mysql.2018070200.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $all_streets = $this->GetAllByKey("SELECT lst.id, lst.name, lst.name2, lstt.name AS typestr FROM location_streets lst @@ -68,7 +67,3 @@ } } } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2018070200', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2018070300.php b/lib/upgradedb/mysql.2018070300.php index ede9a66d36..acd1b47089 100644 --- a/lib/upgradedb/mysql.2018070300.php +++ b/lib/upgradedb/mysql.2018070300.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE invoicecontents MODIFY COLUMN count numeric(9,3)"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2018070300', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2018070600.php b/lib/upgradedb/mysql.2018070600.php index 8da36fcfb3..2c67ef2ac9 100644 --- a/lib/upgradedb/mysql.2018070600.php +++ b/lib/upgradedb/mysql.2018070600.php @@ -21,10 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE rttickets ADD COLUMN type int(11) DEFAULT NULL"); $this->Execute("ALTER TABLE rttickets ADD COLUMN service int(11) DEFAULT NULL"); -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2018070600', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2018073100.php b/lib/upgradedb/mysql.2018073100.php index 82dc5408f3..85c05996cc 100644 --- a/lib/upgradedb/mysql.2018073100.php +++ b/lib/upgradedb/mysql.2018073100.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" CREATE TABLE rtticketlastview ( @@ -42,7 +41,3 @@ SELECT t.id, u.id, ?NOW? FROM rttickets t, users u ); "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2018073100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2018081400.php b/lib/upgradedb/mysql.2018081400.php index 567b5ca762..05653507f1 100644 --- a/lib/upgradedb/mysql.2018081400.php +++ b/lib/upgradedb/mysql.2018081400.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE rtmessages MODIFY COLUMN type int(11)"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2018081400', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2018081401.php b/lib/upgradedb/mysql.2018081401.php index 5366d7a594..7fbab8a0bf 100644 --- a/lib/upgradedb/mysql.2018081401.php +++ b/lib/upgradedb/mysql.2018081401.php @@ -24,13 +24,8 @@ define('RT_RIGHT_NOTICE', 8); define('RT_RIGHT_INDICATOR', 16); -$this->BeginTrans(); $this->Execute( "UPDATE rtrights SET rights = rights | ? WHERE rights & ? > 0", array(RT_RIGHT_INDICATOR, RT_RIGHT_NOTICE) ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2018081401', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2018081600.php b/lib/upgradedb/mysql.2018081600.php index 9cef298a42..927c18791a 100644 --- a/lib/upgradedb/mysql.2018081600.php +++ b/lib/upgradedb/mysql.2018081600.php @@ -21,11 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("UPDATE rttickets SET priority = 3 WHERE priority = 2"); $this->Execute("UPDATE rttickets SET priority = 2 WHERE priority = 1"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2018081600', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2018081700.php b/lib/upgradedb/mysql.2018081700.php index d8cd202735..540558e49a 100644 --- a/lib/upgradedb/mysql.2018081700.php +++ b/lib/upgradedb/mysql.2018081700.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("DROP VIEW vnetworks"); @@ -41,7 +40,3 @@ LEFT JOIN vaddresses a ON no.address_id = a.id WHERE no.ipaddr = 0 AND no.ipaddr_pub = 0 "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2018081700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2018082100.php b/lib/upgradedb/mysql.2018082100.php index cdea9a5198..7d679005b7 100644 --- a/lib/upgradedb/mysql.2018082100.php +++ b/lib/upgradedb/mysql.2018082100.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("DROP VIEW customerview"); $this->Execute("DROP VIEW contractorview"); @@ -102,7 +101,3 @@ FROM divisions d JOIN vaddresses a ON a.id = d.address_id "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2018082100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2018082300.php b/lib/upgradedb/mysql.2018082300.php index 1ae6a7c1e5..1c65f09555 100644 --- a/lib/upgradedb/mysql.2018082300.php +++ b/lib/upgradedb/mysql.2018082300.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" CREATE TABLE filecontainers ( @@ -54,7 +53,3 @@ FOREIGN KEY (containerid) REFERENCES filecontainers (id) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2018082300', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2018090100.php b/lib/upgradedb/mysql.2018090100.php index 8652733c86..4f421a5fae 100644 --- a/lib/upgradedb/mysql.2018090100.php +++ b/lib/upgradedb/mysql.2018090100.php @@ -20,9 +20,3 @@ * USA. * */ - -$this->BeginTrans(); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2018090100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2018090500.php b/lib/upgradedb/mysql.2018090500.php index 3dfc91a0d2..7cfc1b379c 100644 --- a/lib/upgradedb/mysql.2018090500.php +++ b/lib/upgradedb/mysql.2018090500.php @@ -21,11 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("UPDATE rttickets SET type = 9 WHERE type IS NULL"); $this->Execute("UPDATE rttickets SET service = '-1' WHERE service IS NULL"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2018090500', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2018090800.php b/lib/upgradedb/mysql.2018090800.php index 1d70aa4ac3..a6dbad6578 100644 --- a/lib/upgradedb/mysql.2018090800.php +++ b/lib/upgradedb/mysql.2018090800.php @@ -21,9 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE netradiosectors ADD COLUMN type int(11) DEFAULT 0 NOT NULL"); -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2018090800', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2018091000.php b/lib/upgradedb/mysql.2018091000.php index e594003ba6..7fc5258713 100644 --- a/lib/upgradedb/mysql.2018091000.php +++ b/lib/upgradedb/mysql.2018091000.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute('ALTER TABLE events MODIFY begintime int(11)'); $this->Execute('ALTER TABLE events MODIFY endtime int(11)'); @@ -37,7 +36,3 @@ ); } } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2018091000', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2018091100.php b/lib/upgradedb/mysql.2018091100.php index 8cc09e83e3..103c095298 100644 --- a/lib/upgradedb/mysql.2018091100.php +++ b/lib/upgradedb/mysql.2018091100.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("UPDATE events SET endtime = begintime WHERE endtime = 0 AND date = enddate"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2018091100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2018091300.php b/lib/upgradedb/mysql.2018091300.php index 81e04bca85..f7c4b031be 100644 --- a/lib/upgradedb/mysql.2018091300.php +++ b/lib/upgradedb/mysql.2018091300.php @@ -21,13 +21,7 @@ * */ -$this->BeginTrans(); $this->Execute('ALTER TABLE netnodes ADD COLUMN ownerid int(11) DEFAULT NULL'); $this->Execute("ALTER TABLE netnodes ADD CONSTRAINT netnodes_ownerid_fkey FOREIGN KEY (ownerid) REFERENCES customers (id) ON DELETE SET NULL ON UPDATE CASCADE"); - - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2018091300', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2018091301.php b/lib/upgradedb/mysql.2018091301.php index 60078fcafa..0ef21e09ef 100644 --- a/lib/upgradedb/mysql.2018091301.php +++ b/lib/upgradedb/mysql.2018091301.php @@ -21,9 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE netradiosectors ADD COLUMN secret varchar(64) DEFAULT NULL"); -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2018091301', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2018091800.php b/lib/upgradedb/mysql.2018091800.php index 10714864b1..9cbe6f152b 100644 --- a/lib/upgradedb/mysql.2018091800.php +++ b/lib/upgradedb/mysql.2018091800.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); if (!$this->GetOne("SELECT id FROM uiconfig WHERE section = ? AND var = ?", array('userpanel', 'show_last_years'))) { $this->Execute( @@ -29,7 +28,3 @@ array('userpanel', 'show_last_years', '5') ); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2018091800', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2018091801.php b/lib/upgradedb/mysql.2018091801.php index 696b5885d2..4b1e647956 100644 --- a/lib/upgradedb/mysql.2018091801.php +++ b/lib/upgradedb/mysql.2018091801.php @@ -21,12 +21,7 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE rttickets ADD COLUMN invprojectid int(11) DEFAULT NULL"); $this->Execute("ALTER TABLE rttickets ADD CONSTRAINT rttickets_invprojectid_fkey FOREIGN KEY (invprojectid) REFERENCES invprojects (id) ON DELETE SET NULL ON UPDATE CASCADE"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2018091801', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2018092600.php b/lib/upgradedb/mysql.2018092600.php index b08c683bc8..d60de2e265 100644 --- a/lib/upgradedb/mysql.2018092600.php +++ b/lib/upgradedb/mysql.2018092600.php @@ -21,11 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE nodesessions ADD COLUMN nasipaddr int(16) unsigned DEFAULT NULL"); $this->Execute("ALTER TABLE nodesessions ADD COLUMN nasport text DEFAULT NULL"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2018092600', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2018092601.php b/lib/upgradedb/mysql.2018092601.php index 10f964065e..935c5a5790 100644 --- a/lib/upgradedb/mysql.2018092601.php +++ b/lib/upgradedb/mysql.2018092601.php @@ -21,9 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE rttickets ADD COLUMN verifier_rtime int(11) DEFAULT NULL"); -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2018092601', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2018093000.php b/lib/upgradedb/mysql.2018093000.php index 9d6af40e5d..60b21141a4 100644 --- a/lib/upgradedb/mysql.2018093000.php +++ b/lib/upgradedb/mysql.2018093000.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); if ($this->ResourceExists('promotionassignments.promotionschemaid', LMSDB::RESOURCE_TYPE_CONSTRAINT)) { $this->Execute("ALTER TABLE promotionassignments DROP FOREIGN KEY promotionassignments_ibfk_1"); @@ -29,7 +28,3 @@ $this->Execute("ALTER TABLE promotionassignments ADD CONSTRAINT promotionassignments_ibfk_1 FOREIGN KEY (promotionschemaid) REFERENCES promotionschemas (id) ON DELETE CASCADE ON UPDATE CASCADE"); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2018093000', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2018110700.php b/lib/upgradedb/mysql.2018110700.php index 3e080e99a8..8f765248dc 100644 --- a/lib/upgradedb/mysql.2018110700.php +++ b/lib/upgradedb/mysql.2018110700.php @@ -21,14 +21,9 @@ * */ -$this->BeginTrans(); define('CONFIG_TYPE_POSITIVE_INTEGER_2018110700', 2); $this->Execute( "INSERT INTO uiconfig (section, var, value, type) VALUES (?, ?, ?, ?)", array('phpui', 'networklist_pagelimit', 100, CONFIG_TYPE_POSITIVE_INTEGER_2018110700) ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2018110700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2018111600.php b/lib/upgradedb/mysql.2018111600.php index e8940a43cd..7566ff6119 100644 --- a/lib/upgradedb/mysql.2018111600.php +++ b/lib/upgradedb/mysql.2018111600.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE networks MODIFY COLUMN snat int(16) unsigned DEFAULT NULL"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2018111600', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2018112800.php b/lib/upgradedb/mysql.2018112800.php index ce2bb44d94..72b29846e3 100644 --- a/lib/upgradedb/mysql.2018112800.php +++ b/lib/upgradedb/mysql.2018112800.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE rtmessages MODIFY COLUMN type int(11) NOT NULL DEFAULT 0"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2018112800', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2018121200.php b/lib/upgradedb/mysql.2018121200.php index 965dbe0483..a0ef7a48ea 100644 --- a/lib/upgradedb/mysql.2018121200.php +++ b/lib/upgradedb/mysql.2018121200.php @@ -21,11 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE rtqueues ADD COLUMN verifierticketsubject varchar(255) NOT NULL DEFAULT ''"); $this->Execute("ALTER TABLE rtqueues ADD COLUMN verifierticketbody text NOT NULL DEFAULT ''"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2018121200', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2018121300.php b/lib/upgradedb/mysql.2018121300.php index 671d954367..e13aa0beaa 100644 --- a/lib/upgradedb/mysql.2018121300.php +++ b/lib/upgradedb/mysql.2018121300.php @@ -21,10 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE rttickets ADD COLUMN parentid int(11) DEFAULT NULL"); $this->Execute("ALTER TABLE rttickets ADD CONSTRAINT rttickets_parentid_fkey FOREIGN KEY (parentid) REFERENCES rttickets (id) ON DELETE SET NULL ON UPDATE CASCADE"); -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2018121300', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2019012100.php b/lib/upgradedb/mysql.2019012100.php index 024a0a35c3..cab2f74121 100644 --- a/lib/upgradedb/mysql.2019012100.php +++ b/lib/upgradedb/mysql.2019012100.php @@ -21,13 +21,8 @@ * */ -$this->BeginTrans(); $this->Execute( "INSERT INTO uiconfig (section, var, value) VALUES (?, ?, ?)", array('userpanel', 'aggregate_documents', '0') ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2019012100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2019013100.php b/lib/upgradedb/mysql.2019013100.php index c26f90c367..b9e5e72062 100644 --- a/lib/upgradedb/mysql.2019013100.php +++ b/lib/upgradedb/mysql.2019013100.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $tariffs = $this->GetAllByKey("SELECT id, value FROM tariffs", 'id'); $schemas = $this->GetAllByKey("SELECT id, data, continuation, ctariffid @@ -76,7 +75,3 @@ FOREIGN KEY (promotionid) REFERENCES promotions (id) ON DELETE CASCADE ON UPDATE CASCADE"); $this->Execute("ALTER TABLE promotionschemas DROP COLUMN ctariffid"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2019013100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2019032100.php b/lib/upgradedb/mysql.2019032100.php index 0afc469d69..e994741e79 100644 --- a/lib/upgradedb/mysql.2019032100.php +++ b/lib/upgradedb/mysql.2019032100.php @@ -21,11 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("INSERT INTO uiconfig (section, var, value) VALUES (?, ?, ?)", array('userpanel', 'hide_documentbox', '0')); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2019032100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2019032500.php b/lib/upgradedb/mysql.2019032500.php index 0cdf08e332..6c49737147 100644 --- a/lib/upgradedb/mysql.2019032500.php +++ b/lib/upgradedb/mysql.2019032500.php @@ -21,13 +21,8 @@ * */ -$this->BeginTrans(); $this->Execute("INSERT INTO uiconfig (section, var, value) VALUES (?, ?, ?)", array('userpanel', 'speed_unit_type', '1000')); $this->Execute("INSERT INTO uiconfig (section, var, value) VALUES (?, ?, ?)", array('userpanel', 'speed_unit_aggregation_threshold', '5')); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2019032500', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2019032700.php b/lib/upgradedb/mysql.2019032700.php index 76ecd7ffa2..fcc70de6a4 100644 --- a/lib/upgradedb/mysql.2019032700.php +++ b/lib/upgradedb/mysql.2019032700.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); if ($this->ResourceExists('location_buildings_ibfk_1', LMSDB::RESOURCE_TYPE_CONSTRAINT)) { $this->Execute("ALTER TABLE location_buildings @@ -42,7 +41,3 @@ $this->Execute("ALTER TABLE location_buildings ADD CONSTRAINT location_buildings_street_id_fkey FOREIGN KEY (street_id) REFERENCES location_streets (id) ON DELETE CASCADE ON UPDATE CASCADE"); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2019032700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2019040300.php b/lib/upgradedb/mysql.2019040300.php index e67cce2019..297b8310a3 100644 --- a/lib/upgradedb/mysql.2019040300.php +++ b/lib/upgradedb/mysql.2019040300.php @@ -21,11 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("INSERT INTO uiconfig (section, var, value) VALUES (?, ?, ?)", array('userpanel', 'shortcut_icon', '')); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2019040300', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2019040400.php b/lib/upgradedb/mysql.2019040400.php index 8ac88faf37..a96d4c0a8d 100644 --- a/lib/upgradedb/mysql.2019040400.php +++ b/lib/upgradedb/mysql.2019040400.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE documents ADD COLUMN archived tinyint(1) DEFAULT 0 NOT NULL"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2019040400', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2019040500.php b/lib/upgradedb/mysql.2019040500.php index 405be04d03..aea80523ed 100644 --- a/lib/upgradedb/mysql.2019040500.php +++ b/lib/upgradedb/mysql.2019040500.php @@ -21,13 +21,8 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE documents ADD COLUMN auserid int(11) DEFAULT NULL"); $this->Execute("ALTER TABLE documents ADD CONSTRAINT documents_auserid_fkey FOREIGN KEY (auserid) REFERENCES users (id) ON DELETE SET NULL ON UPDATE CASCADE"); $this->Execute("ALTER TABLE documents ADD COLUMN adate int(11) DEFAULT 0 NOT NULL"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2019040500', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2019041200.php b/lib/upgradedb/mysql.2019041200.php index e69827a99d..d2f6c1ce91 100644 --- a/lib/upgradedb/mysql.2019041200.php +++ b/lib/upgradedb/mysql.2019041200.php @@ -21,11 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE cash ADD COLUMN linktechnology int(11) DEFAULT NULL"); $this->Execute("CREATE INDEX cash_linktechnology_idx ON cash (linktechnology)"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2019041200', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2019042300.php b/lib/upgradedb/mysql.2019042300.php index 088ea39c3b..336316813f 100644 --- a/lib/upgradedb/mysql.2019042300.php +++ b/lib/upgradedb/mysql.2019042300.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("UPDATE rtmessages SET body = REPLACE(REPLACE(body, '
', '\n'), '
', '\n') WHERE type > 1"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2019042300', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2019042400.php b/lib/upgradedb/mysql.2019042400.php index 56e9cd1d8d..348c9f3790 100644 --- a/lib/upgradedb/mysql.2019042400.php +++ b/lib/upgradedb/mysql.2019042400.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" CREATE TABLE rttemplatetypes( @@ -48,7 +47,3 @@ FOREIGN KEY (queueid) REFERENCES rtqueues (id) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2019042400', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2019060300.php b/lib/upgradedb/mysql.2019060300.php index 6aad1da896..21d4eda6cb 100644 --- a/lib/upgradedb/mysql.2019060300.php +++ b/lib/upgradedb/mysql.2019060300.php @@ -24,11 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("INSERT INTO uiconfig (section, var, value, description) VALUES (?, ?, ?, ?)", array('userpanel', 'show_period', '1', '')); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2019060300', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2019071500.php b/lib/upgradedb/mysql.2019071500.php index d925d2b48b..610b9d20aa 100644 --- a/lib/upgradedb/mysql.2019071500.php +++ b/lib/upgradedb/mysql.2019071500.php @@ -24,12 +24,7 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("ALTER TABLE ewx_stm_channels DROP FOREIGN KEY ewx_stm_channels_cid_fkey"); $this->Execute("ALTER TABLE ewx_stm_channels ADD CONSTRAINT ewx_stm_channels_cid_fkey FOREIGN KEY (cid) REFERENCES customers(id) ON UPDATE CASCADE ON DELETE SET NULL"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2019071500', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2019072500.php b/lib/upgradedb/mysql.2019072500.php index 0ae2f68eef..7a6fec046f 100644 --- a/lib/upgradedb/mysql.2019072500.php +++ b/lib/upgradedb/mysql.2019072500.php @@ -21,14 +21,9 @@ * */ -$this->BeginTrans(); if ($this->ResourceExists('events_address_id_fkey', LMSDB::RESOURCE_TYPE_CONSTRAINT)) { $this->Execute("ALTER TABLE events DROP FOREIGN KEY events_address_id_fkey"); } $this->Execute("ALTER TABLE events ADD CONSTRAINT events_address_id_fkey FOREIGN KEY (address_id) REFERENCES addresses(id) ON UPDATE CASCADE ON DELETE SET NULL"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2019072500', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2019080100.php b/lib/upgradedb/mysql.2019080100.php index e44516700e..cb6887290b 100644 --- a/lib/upgradedb/mysql.2019080100.php +++ b/lib/upgradedb/mysql.2019080100.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE uiconfig ADD COLUMN userid int(11) DEFAULT NULL, ADD FOREIGN KEY (userid) REFERENCES users (id) ON UPDATE CASCADE ON DELETE CASCADE"); @@ -29,7 +28,3 @@ ADD FOREIGN KEY (configid) REFERENCES uiconfig (id) ON UPDATE CASCADE ON DELETE RESTRICT"); $this->Execute("ALTER TABLE uiconfig DROP INDEX var"); $this->Execute("ALTER TABLE uiconfig ADD UNIQUE var (section, var, userid)"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2019080100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2019081200.php b/lib/upgradedb/mysql.2019081200.php index a7b7cc09d1..91e28187e4 100644 --- a/lib/upgradedb/mysql.2019081200.php +++ b/lib/upgradedb/mysql.2019081200.php @@ -21,9 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE documents MODIFY COLUMN city varchar(100) NULL DEFAULT NULL"); -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2019081200', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2019082000.php b/lib/upgradedb/mysql.2019082000.php index d56e06f457..d463a9b374 100644 --- a/lib/upgradedb/mysql.2019082000.php +++ b/lib/upgradedb/mysql.2019082000.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE countries ADD COLUMN ccode varchar(5)"); @@ -31,7 +30,3 @@ $this->Execute("UPDATE countries SET ccode = ? WHERE name = ?", array('sk_SK', 'Slovakia')); $this->Execute("UPDATE countries SET ccode = ? WHERE name = ?", array('en_US', 'USA')); $this->Execute("INSERT INTO countries (name, ccode) VALUES (?, ?)", array('Czech', 'cs_CZ')); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2019082000', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2019082200.php b/lib/upgradedb/mysql.2019082200.php index 7d86d4e789..b26e7e8952 100644 --- a/lib/upgradedb/mysql.2019082200.php +++ b/lib/upgradedb/mysql.2019082200.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE nodesessions ADD COLUMN nasid text DEFAULT NULL"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2019082200', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2019082900.php b/lib/upgradedb/mysql.2019082900.php index 99aa89f7d2..3232883344 100644 --- a/lib/upgradedb/mysql.2019082900.php +++ b/lib/upgradedb/mysql.2019082900.php @@ -21,13 +21,8 @@ * */ -$this->BeginTrans(); $this->Execute( "INSERT INTO uiconfig (section, var, value) VALUES(?, ?, ?)", array('userpanel', 'timeout', intval(ConfigHelper::getConfig('phpui.timeout'))) ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2019082900', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2019083000.php b/lib/upgradedb/mysql.2019083000.php index 0fc9203822..dbd1f83884 100644 --- a/lib/upgradedb/mysql.2019083000.php +++ b/lib/upgradedb/mysql.2019083000.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE assignments ADD COLUMN count numeric(9,3) DEFAULT 1 NOT NULL"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2019083000', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2019083001.php b/lib/upgradedb/mysql.2019083001.php index 64727fa5f0..db472c078a 100644 --- a/lib/upgradedb/mysql.2019083001.php +++ b/lib/upgradedb/mysql.2019083001.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("DROP VIEW vnodealltariffs"); $this->Execute("DROP VIEW vnodealltariffs_tariffs"); @@ -158,7 +157,3 @@ OR (t1.nodeid IS NULL AND t2.nodeid IS NOT NULL) OR (t1.nodeid IS NULL AND t2.nodeid IS NULL)) "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2019083001', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2019090200.php b/lib/upgradedb/mysql.2019090200.php index 35f38f8faa..55ae0932aa 100644 --- a/lib/upgradedb/mysql.2019090200.php +++ b/lib/upgradedb/mysql.2019090200.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE nodelocks ADD COLUMN disabled tinyint(1) NOT NULL DEFAULT 0"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2019090200', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2019091200.php b/lib/upgradedb/mysql.2019091200.php index 4705400704..853732210b 100644 --- a/lib/upgradedb/mysql.2019091200.php +++ b/lib/upgradedb/mysql.2019091200.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("DROP VIEW vusers"); $this->Execute("ALTER TABLE users ADD COLUMN twofactorauth smallint NOT NULL DEFAULT 0"); @@ -29,7 +28,3 @@ $this->Execute("CREATE VIEW vusers AS SELECT *, CONCAT(firstname, ' ', lastname) AS name, CONCAT(lastname, ' ', firstname) AS rname FROM users"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2019091200', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2019091300.php b/lib/upgradedb/mysql.2019091300.php index 66ada22918..fe84ad62d5 100644 --- a/lib/upgradedb/mysql.2019091300.php +++ b/lib/upgradedb/mysql.2019091300.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" CREATE TABLE twofactorauthcodehistory ( @@ -34,7 +33,3 @@ FOREIGN KEY (userid) REFERENCES users (id) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2019091300', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2019091301.php b/lib/upgradedb/mysql.2019091301.php index a8f8a2f357..ce93324116 100644 --- a/lib/upgradedb/mysql.2019091301.php +++ b/lib/upgradedb/mysql.2019091301.php @@ -21,11 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE twofactorauthcodehistory ADD COLUMN ipaddr int(16) DEFAULT NULL"); $this->Execute("ALTER TABLE twofactorauthcodehistory ADD COLUMN success smallint NOT NULL DEFAULT 0"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2019091301', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2019091600.php b/lib/upgradedb/mysql.2019091600.php index a092f70c27..e38f88c9c1 100644 --- a/lib/upgradedb/mysql.2019091600.php +++ b/lib/upgradedb/mysql.2019091600.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" CREATE TABLE twofactorauthtrusteddevices ( @@ -36,7 +35,3 @@ FOREIGN KEY (userid) REFERENCES users (id) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2019091600', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2019091700.php b/lib/upgradedb/mysql.2019091700.php index c71b3dc500..3b91d735c3 100644 --- a/lib/upgradedb/mysql.2019091700.php +++ b/lib/upgradedb/mysql.2019091700.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $des_key = ConfigHelper::getConfig('phpui.des_key'); if (!empty($des_key)) { @@ -34,7 +33,3 @@ array('phpui', 'des_key') ); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2019091700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2019091701.php b/lib/upgradedb/mysql.2019091701.php index aad080b619..214b61a308 100644 --- a/lib/upgradedb/mysql.2019091701.php +++ b/lib/upgradedb/mysql.2019091701.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("DROP VIEW vusers"); $this->Execute("ALTER TABLE users ADD COLUMN passwdforcechange smallint NOT NULL DEFAULT 0"); @@ -30,7 +29,3 @@ SELECT *, CONCAT(firstname, ' ', lastname) AS name, CONCAT(lastname, ' ', firstname) AS rname FROM users; "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2019091701', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2019091702.php b/lib/upgradedb/mysql.2019091702.php index 8cef43d18f..f11f8deae1 100644 --- a/lib/upgradedb/mysql.2019091702.php +++ b/lib/upgradedb/mysql.2019091702.php @@ -21,12 +21,7 @@ * */ -$this->BeginTrans(); if (!$this->ResourceExists('documents.splitpayment', LMSDB::RESOURCE_TYPE_COLUMN)) { $this->Execute("ALTER TABLE documents ADD COLUMN splitpayment smallint NOT NULL DEFAULT 0"); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2019091702', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2019092000.php b/lib/upgradedb/mysql.2019092000.php index c5cd5984af..b13777a247 100644 --- a/lib/upgradedb/mysql.2019092000.php +++ b/lib/upgradedb/mysql.2019092000.php @@ -21,12 +21,7 @@ * */ -$this->BeginTrans(); if ($this->ResourceExists('voip_tariff_rules', LMSDB::RESOURCE_TYPE_TABLE)) { $this->Execute("DROP TABLE voip_tariff_rules"); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2019092000', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2019100900.php b/lib/upgradedb/mysql.2019100900.php index fa6a68c702..fe6432f8e2 100644 --- a/lib/upgradedb/mysql.2019100900.php +++ b/lib/upgradedb/mysql.2019100900.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE messageitems ADD COLUMN body text DEFAULT NULL"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2019100900', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2019100901.php b/lib/upgradedb/mysql.2019100901.php index afdb1f0181..5a629733be 100644 --- a/lib/upgradedb/mysql.2019100901.php +++ b/lib/upgradedb/mysql.2019100901.php @@ -21,11 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE messages ADD COLUMN contenttype varchar(255) DEFAULT 'text/plain'"); //$this->Execute("UPDATE messages SET contenttype='text/plain' WHERE contenttype IS NULL"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2019100901', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2019101000.php b/lib/upgradedb/mysql.2019101000.php index 22cde4b072..a576c8d340 100644 --- a/lib/upgradedb/mysql.2019101000.php +++ b/lib/upgradedb/mysql.2019101000.php @@ -21,12 +21,7 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE filecontainers ADD COLUMN messageid int(11) DEFAULT NULL"); $this->Execute("ALTER TABLE filecontainers ADD CONSTRAINT filecontainers_messageid_fkey FOREIGN KEY (messageid) REFERENCES messages (id) ON DELETE CASCADE ON UPDATE CASCADE"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2019101000', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2019102100.php b/lib/upgradedb/mysql.2019102100.php index 59baf1375f..797a70fc3c 100644 --- a/lib/upgradedb/mysql.2019102100.php +++ b/lib/upgradedb/mysql.2019102100.php @@ -21,14 +21,9 @@ * */ -$this->BeginTrans(); if (!$this->ResourceExists('rttickets.modtime', LMSDB::RESOURCE_TYPE_COLUMN)) { $this->Execute("DELETE FROM rttickets WHERE id NOT IN (SELECT DISTINCT ticketid FROM rtmessages)"); $this->Execute("ALTER TABLE rttickets ADD COLUMN modtime int(11) NOT NULL DEFAULT 0"); $this->Execute("UPDATE rttickets t SET modtime = (SELECT MAX(createtime) FROM rtmessages m WHERE m.ticketid = t.id)"); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2019102100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2019102400.php b/lib/upgradedb/mysql.2019102400.php index a851f9827f..ddc8a806a2 100644 --- a/lib/upgradedb/mysql.2019102400.php +++ b/lib/upgradedb/mysql.2019102400.php @@ -20,9 +20,3 @@ * USA. * */ - -$this->BeginTrans(); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2019102400', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2019102500.php b/lib/upgradedb/mysql.2019102500.php index e4b655a3b5..4f82f1ad34 100644 --- a/lib/upgradedb/mysql.2019102500.php +++ b/lib/upgradedb/mysql.2019102500.php @@ -44,7 +44,6 @@ define('DOC_INVOICE_PRO', 6); } -$this->BeginTrans(); $this->Execute("ALTER TABLE cash ADD COLUMN currency varchar(3)"); $this->Execute("ALTER TABLE cash ADD COLUMN currencyvalue decimal(17,10) DEFAULT 1.0"); @@ -65,7 +64,3 @@ foreach (array('tariffs', 'assignments', 'liabilities') as $sql_table) { $this->Execute("UPDATE " . $sql_table . " SET currency = ?", array($_currency)); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2019102500', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2019102900.php b/lib/upgradedb/mysql.2019102900.php index 20a76cfc21..f26971edee 100644 --- a/lib/upgradedb/mysql.2019102900.php +++ b/lib/upgradedb/mysql.2019102900.php @@ -21,12 +21,7 @@ * */ -$this->BeginTrans(); if (!$this->ResourceExists('assignments.splitpayment', LMSDB::RESOURCE_TYPE_COLUMN)) { $this->Execute("ALTER TABLE assignments ADD COLUMN splitpayment smallint NOT NULL DEFAULT 0"); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2019102900', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2019102901.php b/lib/upgradedb/mysql.2019102901.php index 51b60c9f6e..f4785db8cb 100644 --- a/lib/upgradedb/mysql.2019102901.php +++ b/lib/upgradedb/mysql.2019102901.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE voipaccounts ADD COLUMN description text NOT NULL DEFAULT ''"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2019102901', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2019102902.php b/lib/upgradedb/mysql.2019102902.php index 36e1e821d3..4503c5832d 100644 --- a/lib/upgradedb/mysql.2019102902.php +++ b/lib/upgradedb/mysql.2019102902.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("DROP VIEW vdivisions"); $this->Execute("ALTER TABLE divisions ADD COLUMN bank varchar(100) DEFAULT NULL"); @@ -33,7 +32,3 @@ JOIN vaddresses a ON a.id = d.address_id "); $this->Execute("ALTER TABLE documents ADD COLUMN div_bank varchar(100) DEFAULT NULL"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2019102902', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2019110700.php b/lib/upgradedb/mysql.2019110700.php index 1ae53e302b..c0d3d183e7 100644 --- a/lib/upgradedb/mysql.2019110700.php +++ b/lib/upgradedb/mysql.2019110700.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); if ($this->ResourceExists('assignments.splitpayment', LMSDB::RESOURCE_TYPE_COLUMN)) { $this->Execute("ALTER TABLE assignments DROP COLUMN splitpayment"); @@ -34,7 +33,3 @@ if (!$this->ResourceExists('liabilities.splitpayment', LMSDB::RESOURCE_TYPE_COLUMN)) { $this->Execute("ALTER TABLE liabilities ADD COLUMN splitpayment smallint NOT NULL DEFAULT 0"); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2019110700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2019112000.php b/lib/upgradedb/mysql.2019112000.php index 122a8a0840..8de0bb7810 100644 --- a/lib/upgradedb/mysql.2019112000.php +++ b/lib/upgradedb/mysql.2019112000.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE netdevices ADD COLUMN login varchar(60) DEFAULT '' NOT NULL"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2019112000', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2019121800.php b/lib/upgradedb/mysql.2019121800.php index d93a37fcde..20b82fb0fd 100644 --- a/lib/upgradedb/mysql.2019121800.php +++ b/lib/upgradedb/mysql.2019121800.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" CREATE TABLE customerbalances ( @@ -76,7 +75,3 @@ END IF; END "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2019121800', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2020010400.php b/lib/upgradedb/mysql.2020010400.php index bb2061a2b6..896afbb1ca 100644 --- a/lib/upgradedb/mysql.2020010400.php +++ b/lib/upgradedb/mysql.2020010400.php @@ -21,13 +21,8 @@ * */ -$this->BeginTrans(); $this->Execute( "INSERT INTO uiconfig (section, var, value) VALUES (?, ?, ?)", array('userpanel', 'hide_archived_documents', 'false') ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020010400', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2020011000.php b/lib/upgradedb/mysql.2020011000.php index c2df3e3003..e5d6b233f2 100644 --- a/lib/upgradedb/mysql.2020011000.php +++ b/lib/upgradedb/mysql.2020011000.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("DROP TRIGGER cash_customerbalances_delete_trigger"); $this->Execute("DROP TRIGGER cash_customerbalances_update_trigger"); @@ -79,7 +78,3 @@ END IF; END "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020011000', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2020011400.php b/lib/upgradedb/mysql.2020011400.php index 6d2705d864..1d4c23ebb8 100644 --- a/lib/upgradedb/mysql.2020011400.php +++ b/lib/upgradedb/mysql.2020011400.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("INSERT INTO countries (name, ccode) VALUES (?, ?)", array('Guyana', 'en_GY')); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020011400', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2020011401.php b/lib/upgradedb/mysql.2020011401.php index ff99ab184c..f223c1d8cc 100644 --- a/lib/upgradedb/mysql.2020011401.php +++ b/lib/upgradedb/mysql.2020011401.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("DROP TRIGGER cash_customerbalances_delete_trigger"); $this->Execute("DROP TRIGGER cash_customerbalances_update_trigger"); @@ -81,7 +80,3 @@ END IF; END "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020011401', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2020011402.php b/lib/upgradedb/mysql.2020011402.php index c77554a254..b4a25a9122 100644 --- a/lib/upgradedb/mysql.2020011402.php +++ b/lib/upgradedb/mysql.2020011402.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE assignments DROP COLUMN currency"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020011402', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2020013100.php b/lib/upgradedb/mysql.2020013100.php index 88fe65cff9..47fecfb666 100644 --- a/lib/upgradedb/mysql.2020013100.php +++ b/lib/upgradedb/mysql.2020013100.php @@ -21,14 +21,9 @@ * */ -$this->BeginTrans(); $this->Execute("INSERT INTO uiconfig (section, var, value) VALUES (?, ?, ?)", array('userpanel', 'sms_credential_reminders', 'true')); $this->Execute("INSERT INTO uiconfig (section, var, value) VALUES (?, ?, ?)", array('userpanel', 'mail_credential_reminders', 'true')); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020013100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2020013101.php b/lib/upgradedb/mysql.2020013101.php index cc2aba8cd8..caf855e4e7 100644 --- a/lib/upgradedb/mysql.2020013101.php +++ b/lib/upgradedb/mysql.2020013101.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE documents ADD COLUMN senddate int(11) NOT NULL DEFAULT 0"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020013101', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2020020500.php b/lib/upgradedb/mysql.2020020500.php index 08a9f2d644..69b929028b 100644 --- a/lib/upgradedb/mysql.2020020500.php +++ b/lib/upgradedb/mysql.2020020500.php @@ -21,12 +21,7 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE filecontainers ADD COLUMN netdevmodelid int(11) DEFAULT NULL"); $this->Execute("ALTER TABLE filecontainers ADD CONSTRAINT filecontainers_netdevmodelid_fkey FOREIGN KEY (netdevmodelid) REFERENCES netdevicemodels (id) ON DELETE CASCADE ON UPDATE CASCADE"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020020500', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2020030300.php b/lib/upgradedb/mysql.2020030300.php index 7d4697c9d4..27e3ae82bc 100644 --- a/lib/upgradedb/mysql.2020030300.php +++ b/lib/upgradedb/mysql.2020030300.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("DROP VIEW customerview"); $this->Execute("DROP VIEW contractorview"); @@ -89,7 +88,3 @@ LEFT JOIN vaddresses a2 ON ca2.address_id = a2.id WHERE c.type < 2 "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020030300', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2020030500.php b/lib/upgradedb/mysql.2020030500.php index f5b007e953..49ff7b794f 100644 --- a/lib/upgradedb/mysql.2020030500.php +++ b/lib/upgradedb/mysql.2020030500.php @@ -21,14 +21,9 @@ * */ -$this->BeginTrans(); if (!$this->ResourceExists('tariffs.taxcategory', LMSDB::RESOURCE_TYPE_COLUMN)) { $this->Execute("ALTER TABLE tariffs ADD taxcategory smallint DEFAULT 0 NOT NULL"); $this->Execute("ALTER TABLE liabilities ADD taxcategory smallint DEFAULT 0 NOT NULL"); $this->Execute("ALTER TABLE invoicecontents ADD taxcategory smallint DEFAULT 0 NOT NULL"); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020030500', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2020031000.php b/lib/upgradedb/mysql.2020031000.php index ff84d37447..779f8e779d 100644 --- a/lib/upgradedb/mysql.2020031000.php +++ b/lib/upgradedb/mysql.2020031000.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); if (!$this->ResourceExists('divisions.email', LMSDB::RESOURCE_TYPE_COLUMN)) { $this->Execute("DROP VIEW vdivisions"); @@ -34,7 +33,3 @@ JOIN vaddresses a ON a.id = d.address_id" ); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020031000', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2020040600.php b/lib/upgradedb/mysql.2020040600.php index 9a7acca283..d805e40972 100644 --- a/lib/upgradedb/mysql.2020040600.php +++ b/lib/upgradedb/mysql.2020040600.php @@ -21,14 +21,12 @@ * */ -$this->BeginTrans(); define('CCONSENT_DATE', 1); define('CCONSENT_INVOICENOTICE', 2); define('CCONSENT_MAILINGNOTICE', 3); define('CCONSENT_EINVOICE', 4); -$this->BeginTrans(); $this->Execute(" CREATE TABLE customerconsents ( @@ -157,7 +155,3 @@ LEFT JOIN customerconsents cc4 ON cc4.customerid = c.id AND cc4.type = 4 WHERE c.type < 2; "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020040600', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2020040800.php b/lib/upgradedb/mysql.2020040800.php index 03899e55ca..9c6b6b48cc 100644 --- a/lib/upgradedb/mysql.2020040800.php +++ b/lib/upgradedb/mysql.2020040800.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE documents ADD COLUMN confirmdate int(11) NOT NULL DEFAULT 0"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020040800', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2020040900.php b/lib/upgradedb/mysql.2020040900.php index 5104513937..35ceaa9226 100644 --- a/lib/upgradedb/mysql.2020040900.php +++ b/lib/upgradedb/mysql.2020040900.php @@ -21,11 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE documentattachments CHANGE main type smallint DEFAULT 1 NOT NULL"); $this->Execute("ALTER TABLE documentattachments ADD COLUMN cdate int(11) NOT NULL DEFAULT 0"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020040900', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2020040901.php b/lib/upgradedb/mysql.2020040901.php index 830bf6e003..47501c97ae 100644 --- a/lib/upgradedb/mysql.2020040901.php +++ b/lib/upgradedb/mysql.2020040901.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" INSERT INTO uiconfig (section, var, value, description, disabled) VALUES @@ -37,7 +36,3 @@ ('userpanel', 'document_approval_customer_notification_mail_subject', '', '', 0), ('userpanel', 'document_approval_customer_notification_mail_body', '', '', 0) "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020040901', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2020040902.php b/lib/upgradedb/mysql.2020040902.php index e4d5ca85a5..2bbc4c309a 100644 --- a/lib/upgradedb/mysql.2020040902.php +++ b/lib/upgradedb/mysql.2020040902.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute( "UPDATE uiconfig SET var = ? WHERE var = ?", @@ -32,7 +31,3 @@ "INSERT INTO uiconfig (section, var, value, description, type) VALUES (?, ?, ?, ?, ?)", array('userpanel', 'document_notification_mail_sender_name', '', '', 0) ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020040902', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2020040903.php b/lib/upgradedb/mysql.2020040903.php index 1d8a08c99c..137b2d2c50 100644 --- a/lib/upgradedb/mysql.2020040903.php +++ b/lib/upgradedb/mysql.2020040903.php @@ -21,14 +21,9 @@ * */ -$this->BeginTrans(); $this->Execute(" INSERT INTO uiconfig (section, var, value, description, disabled) VALUES ('userpanel', 'document_notification_mail_dsn_address', '', '', 0), ('userpanel', 'document_notification_mail_mdn_address', '', '', 0) "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020040903', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2020041000.php b/lib/upgradedb/mysql.2020041000.php index d031c95fed..1bfbd05ba6 100644 --- a/lib/upgradedb/mysql.2020041000.php +++ b/lib/upgradedb/mysql.2020041000.php @@ -21,13 +21,8 @@ * */ -$this->BeginTrans(); $this->Execute( "INSERT INTO uiconfig (section, var, value, description, type) VALUES (?, ?, ?, ?, ?)", array('userpanel', 'document_notification_mail_reply_address', '', '', 0) ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020041000', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2020041001.php b/lib/upgradedb/mysql.2020041001.php index 211d092bcd..2aabc62269 100644 --- a/lib/upgradedb/mysql.2020041001.php +++ b/lib/upgradedb/mysql.2020041001.php @@ -21,13 +21,8 @@ * */ -$this->BeginTrans(); $this->Execute( "INSERT INTO uiconfig (section, var, value, description, type) VALUES (?, ?, ?, ?, ?)", array('userpanel', 'document_approval_customer_onetime_password_sms_body', '', '', 0) ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020041001', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2020041600.php b/lib/upgradedb/mysql.2020041600.php index ad1f7ee186..823c519560 100644 --- a/lib/upgradedb/mysql.2020041600.php +++ b/lib/upgradedb/mysql.2020041600.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); if (!$this->ResourceExists('cash_importid_ukey', LMSDB::RESOURCE_TYPE_CONSTRAINT)) { $cash_import_duplicates = $this->GetAll( @@ -44,7 +43,3 @@ $this->Execute("ALTER TABLE cash ADD UNIQUE KEY cash_importid_ukey (importid)"); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020041600', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2020042000.php b/lib/upgradedb/mysql.2020042000.php index 3c3719d5fe..a16b0de9ee 100644 --- a/lib/upgradedb/mysql.2020042000.php +++ b/lib/upgradedb/mysql.2020042000.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE customercontacts CHANGE name name varchar(10000) NOT NULL DEFAULT ''"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020042000', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2020042700.php b/lib/upgradedb/mysql.2020042700.php index 6158ac949c..e1914691f7 100644 --- a/lib/upgradedb/mysql.2020042700.php +++ b/lib/upgradedb/mysql.2020042700.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE netnodes MODIFY COLUMN admcontact text DEFAULT NULL"); $this->Execute("ALTER TABLE messageitems MODIFY COLUMN externalmsgid int(11) DEFAULT 0 NOT NULL"); @@ -32,7 +31,3 @@ $this->Execute("ALTER TABLE voip_numbers ADD COLUMN tariff_id int(11) NULL"); $this->Execute("ALTER TABLE voip_numbers ADD CONSTRAINT voip_numbers_tariff_id_fkey FOREIGN KEY (tariff_id) REFERENCES tariffs (id) ON DELETE SET NULL ON UPDATE CASCADE"); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020042700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2020042701.php b/lib/upgradedb/mysql.2020042701.php index ae403c030c..a3737fd13a 100644 --- a/lib/upgradedb/mysql.2020042701.php +++ b/lib/upgradedb/mysql.2020042701.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE pna MODIFY COLUMN zip varchar(10) NOT NULL"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020042701', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2020050400.php b/lib/upgradedb/mysql.2020050400.php index 3e311f1a7c..681e88daf8 100644 --- a/lib/upgradedb/mysql.2020050400.php +++ b/lib/upgradedb/mysql.2020050400.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" CREATE VIEW customerconsentview AS @@ -114,7 +113,3 @@ LEFT JOIN customerconsentview cc ON cc.customerid = c.id WHERE c.type < 2 "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020050400', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2020051300.php b/lib/upgradedb/mysql.2020051300.php index 910d7b9e68..fc5701dae5 100644 --- a/lib/upgradedb/mysql.2020051300.php +++ b/lib/upgradedb/mysql.2020051300.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("DROP VIEW vnodealltariffs"); $this->Execute("DROP VIEW vnodetariffs"); @@ -245,7 +244,3 @@ OR (t1.nodeid IS NULL AND t2.nodeid IS NOT NULL) OR (t1.nodeid IS NULL AND t2.nodeid IS NULL)) "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020051300', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2020052900.php b/lib/upgradedb/mysql.2020052900.php index 10957022ba..bfd37c967e 100644 --- a/lib/upgradedb/mysql.2020052900.php +++ b/lib/upgradedb/mysql.2020052900.php @@ -37,7 +37,6 @@ function parseCssProperties($text) return $result; } -$this->BeginTrans(); $categories = $this->GetAll('SELECT id, style FROM rtcategories'); if (!empty($categories)) { @@ -61,7 +60,3 @@ function parseCssProperties($text) ); } } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020052900', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2020060900.php b/lib/upgradedb/mysql.2020060900.php index d3426e228e..bc5be58525 100644 --- a/lib/upgradedb/mysql.2020060900.php +++ b/lib/upgradedb/mysql.2020060900.php @@ -21,9 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("INSERT INTO uiconfig (section, var, value) VALUES ('userpanel', 'startup_module', 'info')"); -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020060900', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2020071600.php b/lib/upgradedb/mysql.2020071600.php index 803e18e020..0740a011b0 100644 --- a/lib/upgradedb/mysql.2020071600.php +++ b/lib/upgradedb/mysql.2020071600.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); define('CCONSENT_TRANSFERFORM', 7); $this->Execute( @@ -29,7 +28,3 @@ (SELECT id, ?NOW?, ? FROM customers)', array(CCONSENT_TRANSFERFORM) ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020071600', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2020073100.php b/lib/upgradedb/mysql.2020073100.php index b9851f9e3d..2d7e623167 100644 --- a/lib/upgradedb/mysql.2020073100.php +++ b/lib/upgradedb/mysql.2020073100.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE customerbalances MODIFY balance decimal(12,2) NOT NULL"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020073100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2020080300.php b/lib/upgradedb/mysql.2020080300.php index 51e4ed428c..802120ab6c 100644 --- a/lib/upgradedb/mysql.2020080300.php +++ b/lib/upgradedb/mysql.2020080300.php @@ -21,11 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE uiconfig DROP INDEX var"); $this->Execute("ALTER TABLE uiconfig ADD UNIQUE var (section, var, userid)"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020080300', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2020081200.php b/lib/upgradedb/mysql.2020081200.php index 3cb872a2a6..6525f2c4e9 100644 --- a/lib/upgradedb/mysql.2020081200.php +++ b/lib/upgradedb/mysql.2020081200.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" CREATE TABLE userdivisions ( @@ -95,7 +94,3 @@ WHERE ud2.userid = lms_current_user()) GROUP BY u.id "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020081200', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2020081300.php b/lib/upgradedb/mysql.2020081300.php index 237be72b01..47272c9b4a 100644 --- a/lib/upgradedb/mysql.2020081300.php +++ b/lib/upgradedb/mysql.2020081300.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("DROP VIEW vusers"); $this->Execute(" @@ -34,7 +33,3 @@ WHERE ud2.userid = lms_current_user()) GROUP BY u.id; "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020081300', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2020081400.php b/lib/upgradedb/mysql.2020081400.php index 0f65e929c0..52c257217e 100644 --- a/lib/upgradedb/mysql.2020081400.php +++ b/lib/upgradedb/mysql.2020081400.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" CREATE TABLE customernotes ( @@ -37,7 +36,3 @@ FOREIGN KEY (customerid) REFERENCES customers (id) ON DELETE CASCADE ON UPDATE CASCADE ) "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020081400', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2020081800.php b/lib/upgradedb/mysql.2020081800.php index b8e05c1978..13358cc6f6 100644 --- a/lib/upgradedb/mysql.2020081800.php +++ b/lib/upgradedb/mysql.2020081800.php @@ -24,7 +24,6 @@ define('CCONSENT_MAILINGNOTICE_2020081800', 3); define('CCONSENT_SMSNOTICE', 8); -$this->BeginTrans(); $this->Execute( "UPDATE uiconfig SET value = REPLACE(value, ?, ?) WHERE section = ? AND var = ?", @@ -142,7 +141,3 @@ LEFT JOIN customerconsentview cc ON cc.customerid = c.id WHERE c.type < 2 "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020081800', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2020081900.php b/lib/upgradedb/mysql.2020081900.php index 1eea0a32ac..af6e1bc5fc 100644 --- a/lib/upgradedb/mysql.2020081900.php +++ b/lib/upgradedb/mysql.2020081900.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("DROP VIEW IF EXISTS vallusers"); @@ -30,7 +29,3 @@ SELECT *, CONCAT(firstname, ' ', lastname) AS name, CONCAT(lastname, ' ', firstname) AS rname FROM users "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020081900', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2020082500.php b/lib/upgradedb/mysql.2020082500.php index 49ef4363bc..47dc172bbe 100644 --- a/lib/upgradedb/mysql.2020082500.php +++ b/lib/upgradedb/mysql.2020082500.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE templates MODIFY name varchar(100) NOT NULL"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020082500', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2020082600.php b/lib/upgradedb/mysql.2020082600.php index e1df3992e8..8730bcd816 100644 --- a/lib/upgradedb/mysql.2020082600.php +++ b/lib/upgradedb/mysql.2020082600.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); if ($this->ResourceExists('tariff_rule_id_fk', LMSDB::RESOURCE_TYPE_CONSTRAINT)) { $this->Execute("ALTER TABLE tariffs DROP CONSTRAINT tariff_rule_id_fk"); @@ -34,7 +33,3 @@ "ALTER TABLE tariffs ADD CONSTRAINT tariffs_voip_tariff_rule_id_fkey FOREIGN KEY (voip_tariff_rule_id) REFERENCES voip_rule_groups (id) ON UPDATE CASCADE ON DELETE SET NULL" ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020082600', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2020082800.php b/lib/upgradedb/mysql.2020082800.php index 4a82ed0e12..69dc5cd3bf 100644 --- a/lib/upgradedb/mysql.2020082800.php +++ b/lib/upgradedb/mysql.2020082800.php @@ -21,12 +21,7 @@ * */ -$this->BeginTrans(); if (!$this->ResourceExists('assignments.backwardperiod', LMSDB::RESOURCE_TYPE_COLUMN)) { $this->Execute("ALTER TABLE assignments ADD COLUMN backwardperiod smallint NOT NULL DEFAULT 0"); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020082800', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2020083100.php b/lib/upgradedb/mysql.2020083100.php index c010deebf4..50cc0c26c5 100644 --- a/lib/upgradedb/mysql.2020083100.php +++ b/lib/upgradedb/mysql.2020083100.php @@ -21,12 +21,7 @@ * */ -$this->BeginTrans(); if (!$this->ResourceExists('promotionassignments.backwardperiod', LMSDB::RESOURCE_TYPE_COLUMN)) { $this->Execute("ALTER TABLE promotionassignments ADD COLUMN backwardperiod smallint DEFAULT 0 NOT NULL"); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020083100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2020090200.php b/lib/upgradedb/mysql.2020090200.php index 9fab2ec51a..d870fc2e03 100644 --- a/lib/upgradedb/mysql.2020090200.php +++ b/lib/upgradedb/mysql.2020090200.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); if ($this->ResourceExists('uiconfig_configid_fkey', LMSDB::RESOURCE_TYPE_CONSTRAINT)) { $this->Execute("ALTER TABLE uiconfig DROP CONSTRAINT uiconfig_configid_fkey"); } @@ -32,7 +31,3 @@ $this->Execute("ALTER TABLE uiconfig ADD CONSTRAINT uiconfig_divisionid_fkey FOREIGN KEY (divisionid) REFERENCES divisions (id) ON DELETE CASCADE ON UPDATE CASCADE"); $this->Execute("ALTER TABLE uiconfig DROP INDEX var"); $this->Execute("ALTER TABLE uiconfig ADD UNIQUE uiconfig_section_var_userid_divisionid_ukey (section, var, userid, divisionid)"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020090200', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2020091100.php b/lib/upgradedb/mysql.2020091100.php index a7709bc85d..b82f75ba13 100644 --- a/lib/upgradedb/mysql.2020091100.php +++ b/lib/upgradedb/mysql.2020091100.php @@ -21,12 +21,7 @@ * */ -$this->BeginTrans(); if (!$this->ResourceExists('documents.flags', LMSDB::RESOURCE_TYPE_COLUMN)) { $this->Execute("ALTER TABLE documents ADD COLUMN flags smallint NOT NULL DEFAULT 0"); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020091100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2020091600.php b/lib/upgradedb/mysql.2020091600.php index cecd5995f4..ec791844d8 100644 --- a/lib/upgradedb/mysql.2020091600.php +++ b/lib/upgradedb/mysql.2020091600.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" CREATE TABLE routednetworks ( @@ -37,7 +36,3 @@ FOREIGN KEY (netid) REFERENCES networks (id) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020091600', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2020092100.php b/lib/upgradedb/mysql.2020092100.php index b60b976590..48cbc9e88c 100644 --- a/lib/upgradedb/mysql.2020092100.php +++ b/lib/upgradedb/mysql.2020092100.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" CREATE TABLE location_city_types ( @@ -41,7 +40,3 @@ ALTER TABLE location_cities ADD CONSTRAINT location_cities_type_fkey FOREIGN KEY (type) REFERENCES location_city_types (id) ON DELETE CASCADE ON UPDATE CASCADE "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020092100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2020092400.php b/lib/upgradedb/mysql.2020092400.php index 8ca0f16228..783a5cc1e6 100644 --- a/lib/upgradedb/mysql.2020092400.php +++ b/lib/upgradedb/mysql.2020092400.php @@ -21,12 +21,7 @@ * */ -$this->BeginTrans(); if (!$this->ResourceExists('liabilities.type', LMSDB::RESOURCE_TYPE_COLUMN)) { $this->Execute("ALTER TABLE liabilities ADD COLUMN type smallint DEFAULT -1 NOT NULL"); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020092400', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2020100100.php b/lib/upgradedb/mysql.2020100100.php index 189283ba3b..e97489018c 100644 --- a/lib/upgradedb/mysql.2020100100.php +++ b/lib/upgradedb/mysql.2020100100.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); if (!$this->ResourceExists('customers.flags', LMSDB::RESOURCE_TYPE_COLUMN)) { $this->Execute("DROP VIEW customeraddressview"); @@ -133,7 +132,3 @@ WHERE c.type < 2 "); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020100100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2020102200.php b/lib/upgradedb/mysql.2020102200.php index c3d20fcc1a..bbfa2c5a61 100644 --- a/lib/upgradedb/mysql.2020102200.php +++ b/lib/upgradedb/mysql.2020102200.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("DROP VIEW vdivisions"); @@ -34,7 +33,3 @@ FROM divisions d JOIN vaddresses a ON a.id = d.address_id "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020102200', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2020110200.php b/lib/upgradedb/mysql.2020110200.php index d05e86f4b4..3addbcb587 100644 --- a/lib/upgradedb/mysql.2020110200.php +++ b/lib/upgradedb/mysql.2020110200.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE promotionschemas ADD COLUMN deleted tinyint(1) DEFAULT 0 NOT NULL"); @@ -48,7 +47,3 @@ ); } } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020110200', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2020110201.php b/lib/upgradedb/mysql.2020110201.php index c29fb50e65..da468e52cf 100644 --- a/lib/upgradedb/mysql.2020110201.php +++ b/lib/upgradedb/mysql.2020110201.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE promotions ADD COLUMN deleted tinyint(1) DEFAULT 0 NOT NULL"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020110201', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2020110400.php b/lib/upgradedb/mysql.2020110400.php index fb3766b14b..bd4b4739aa 100644 --- a/lib/upgradedb/mysql.2020110400.php +++ b/lib/upgradedb/mysql.2020110400.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("DROP VIEW customeraddressview"); $this->Execute("DROP VIEW contractorview"); @@ -132,7 +131,3 @@ LEFT JOIN customerconsentview cc ON cc.customerid = c.id WHERE c.type < 2 "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020110400', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2020110600.php b/lib/upgradedb/mysql.2020110600.php index 98c40d3e94..ce44225336 100644 --- a/lib/upgradedb/mysql.2020110600.php +++ b/lib/upgradedb/mysql.2020110600.php @@ -21,12 +21,7 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE rtqueues ADD COLUMN newticketsmsbody text DEFAULT NULL"); $this->Execute("ALTER TABLE rtqueues ADD COLUMN newmessagesmsbody text DEFAULT NULL"); $this->Execute("ALTER TABLE rtqueues ADD COLUMN resolveticketsmsbody text DEFAULT NULL"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020110600', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2020111000.php b/lib/upgradedb/mysql.2020111000.php index 43ceaf789e..7f29ae6ff2 100644 --- a/lib/upgradedb/mysql.2020111000.php +++ b/lib/upgradedb/mysql.2020111000.php @@ -21,11 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE rtmessages ADD COLUMN contenttype varchar(255) DEFAULT 'text/plain'"); $this->Execute("ALTER TABLE rtattachments ADD COLUMN cid varchar(255) DEFAULT NULL"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020111000', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2020112600.php b/lib/upgradedb/mysql.2020112600.php index 4207b3061b..639c3cc716 100644 --- a/lib/upgradedb/mysql.2020112600.php +++ b/lib/upgradedb/mysql.2020112600.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE tariffs ADD COLUMN flags tinyint(1) DEFAULT 0 NOT NULL"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020112600', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2020112601.php b/lib/upgradedb/mysql.2020112601.php index 3ccf281c5c..8c0141a4dd 100644 --- a/lib/upgradedb/mysql.2020112601.php +++ b/lib/upgradedb/mysql.2020112601.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" CREATE TABLE netdevicetypes ( @@ -45,7 +44,3 @@ VALUES (?), (?), (?), (?), (?), (?), (?), (?), (?), (?), (?)", array('router', 'switch', 'antenna', 'access-point', 'PON OLT', 'PON ONT', 'PON splitter', 'GSM modem', 'DSL modem', 'power line adapter', 'IPTV decoder') ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020112601', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2020112800.php b/lib/upgradedb/mysql.2020112800.php index c1eb768bbb..ef1731b3b9 100644 --- a/lib/upgradedb/mysql.2020112800.php +++ b/lib/upgradedb/mysql.2020112800.php @@ -21,12 +21,7 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE userdivisions DROP CONSTRAINT userdivisions_divisionid_fkey"); $this->Execute("ALTER TABLE userdivisions ADD CONSTRAINT userdivisions_divisionid_fkey FOREIGN KEY (divisionid) REFERENCES divisions (id) ON DELETE RESTRICT ON UPDATE CASCADE"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020112800', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2020120800.php b/lib/upgradedb/mysql.2020120800.php index 921bca19e6..62d139547f 100644 --- a/lib/upgradedb/mysql.2020120800.php +++ b/lib/upgradedb/mysql.2020120800.php @@ -21,13 +21,8 @@ * */ -$this->BeginTrans(); $this->Execute( "INSERT INTO uiconfig (section, var, value) VALUES (?, ?, ?)", array('userpanel', 'pin_validation', 'true') ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020120800', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2020121400.php b/lib/upgradedb/mysql.2020121400.php index 1d969a7db6..6fe86e2274 100644 --- a/lib/upgradedb/mysql.2020121400.php +++ b/lib/upgradedb/mysql.2020121400.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); if (!$this->GetOne( "SELECT id FROM uiconfig WHERE section = ? AND var = ?", @@ -35,7 +34,3 @@ ('userpanel', 'new_document_customer_notification_sms_body', '', '', 0) "); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020121400', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2020122200.php b/lib/upgradedb/mysql.2020122200.php index 2d29509c18..f3499d750f 100644 --- a/lib/upgradedb/mysql.2020122200.php +++ b/lib/upgradedb/mysql.2020122200.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" CREATE TABLE vlans ( @@ -42,7 +41,3 @@ $this->Execute("ALTER TABLE networks ADD CONSTRAINT networks_vlanid_fkey FOREIGN KEY (vlanid) REFERENCES vlans (id) ON DELETE SET NULL ON UPDATE CASCADE"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020122200', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2021010700.php b/lib/upgradedb/mysql.2021010700.php index e7f6167b93..a324100a4a 100644 --- a/lib/upgradedb/mysql.2021010700.php +++ b/lib/upgradedb/mysql.2021010700.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("DROP VIEW customeraddressview"); $this->Execute("DROP VIEW contractorview"); @@ -117,7 +116,3 @@ LEFT JOIN customerconsentview cc ON cc.customerid = c.id WHERE c.type < 2; "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021010700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2021012100.php b/lib/upgradedb/mysql.2021012100.php index 44f95b50f4..326186bc75 100644 --- a/lib/upgradedb/mysql.2021012100.php +++ b/lib/upgradedb/mysql.2021012100.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE vlans ADD COLUMN netnodeid int(11) DEFAULT NULL"); $this->Execute("ALTER TABLE vlans ADD CONSTRAINT vlans_netnodeid_fkey @@ -30,7 +29,3 @@ $this->Execute("ALTER TABLE vlans DROP CONSTRAINT vlans_ukey"); $this->Execute("ALTER TABLE vlans ADD CONSTRAINT vlans_customerid_ukey UNIQUE (vlanid, customerid)"); $this->Execute("ALTER TABLE vlans ADD CONSTRAINT vlans_netnodeid_ukey UNIQUE (vlanid, netnodeid)"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021012100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2021020300.php b/lib/upgradedb/mysql.2021020300.php index 99cfa148d4..9a3ce92b3a 100644 --- a/lib/upgradedb/mysql.2021020300.php +++ b/lib/upgradedb/mysql.2021020300.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" CREATE TABLE numberplanusers ( @@ -35,7 +34,3 @@ FOREIGN KEY (userid) REFERENCES users (id) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021020300', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2021020301.php b/lib/upgradedb/mysql.2021020301.php index 5da4c3722d..819f8ab22e 100644 --- a/lib/upgradedb/mysql.2021020301.php +++ b/lib/upgradedb/mysql.2021020301.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" CREATE TABLE customercontactproperties ( @@ -35,7 +34,3 @@ UNIQUE KEY customercontactproperties_contactid_name_ukey (contactid, name) ) ENGINE=InnoDB "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021020301', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2021021200.php b/lib/upgradedb/mysql.2021021200.php index d9273f0cf7..30779d2769 100644 --- a/lib/upgradedb/mysql.2021021200.php +++ b/lib/upgradedb/mysql.2021021200.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); if (!$this->ResourceExists('divisions.phone', LMSDB::RESOURCE_TYPE_COLUMN)) { $this->Execute("DROP VIEW vdivisions"); @@ -36,7 +35,3 @@ JOIN vaddresses a ON a.id = d.address_id; "); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021021200', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2021021600.php b/lib/upgradedb/mysql.2021021600.php index c2a4e9233b..aa2fd4c559 100644 --- a/lib/upgradedb/mysql.2021021600.php +++ b/lib/upgradedb/mysql.2021021600.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE cashimport ADD COLUMN srcaccount varchar(60) DEFAULT NULL"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021021600', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2021021800.php b/lib/upgradedb/mysql.2021021800.php index 788d5a81e4..7c246a51ba 100644 --- a/lib/upgradedb/mysql.2021021800.php +++ b/lib/upgradedb/mysql.2021021800.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("DROP VIEW vnodealltariffs"); $this->Execute("DROP VIEW vnodetariffs"); @@ -91,7 +90,3 @@ OR (t1.nodeid IS NULL AND t2.nodeid IS NOT NULL) OR (t1.nodeid IS NULL AND t2.nodeid IS NULL)) "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021021800', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2021022100.php b/lib/upgradedb/mysql.2021022100.php index 032aade0ac..668d3a6f46 100644 --- a/lib/upgradedb/mysql.2021022100.php +++ b/lib/upgradedb/mysql.2021022100.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); if (!$this->ResourceExists('nodes.login', LMSDB::RESOURCE_TYPE_COLUMN)) { $this->Execute("DROP VIEW vnodealltariffs"); @@ -118,7 +117,3 @@ OR (t1.nodeid IS NULL AND t2.nodeid IS NULL)) "); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021022100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2021022500.php b/lib/upgradedb/mysql.2021022500.php index 1685b670d9..1f06a062f2 100644 --- a/lib/upgradedb/mysql.2021022500.php +++ b/lib/upgradedb/mysql.2021022500.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); if (!$this->ResourceExists('netdevicemacs', LMSDB::RESOURCE_TYPE_TABLE)) { $this->Execute(" @@ -41,7 +40,3 @@ ) "); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021022500', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2021030900.php b/lib/upgradedb/mysql.2021030900.php index e27056ca52..ebba5679f8 100644 --- a/lib/upgradedb/mysql.2021030900.php +++ b/lib/upgradedb/mysql.2021030900.php @@ -25,7 +25,6 @@ $numberplans = $this->GetAllByKey("SELECT * FROM numberplans ORDER BY id", 'id'); -$this->BeginTrans(); $this->LockTables("documents"); @@ -60,7 +59,3 @@ } while (!$stop); $this->UnLockTables("documents"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021030900', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2021031000.php b/lib/upgradedb/mysql.2021031000.php index 51488cbe49..14684d417f 100644 --- a/lib/upgradedb/mysql.2021031000.php +++ b/lib/upgradedb/mysql.2021031000.php @@ -26,13 +26,8 @@ define('MONTHLY', 3); } -$this->BeginTrans(); if (!$this->ResourceExists('invoicecontents.period', LMSDB::RESOURCE_TYPE_COLUMN)) { $this->Execute("ALTER TABLE invoicecontents ADD COLUMN period smallint DEFAULT NULL"); $this->Execute("ALTER TABLE invoicecontents ALTER COLUMN period SET DEFAULT ?", array(MONTHLY)); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021031000', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2021031800.php b/lib/upgradedb/mysql.2021031800.php index 153fd77d46..95135ce612 100644 --- a/lib/upgradedb/mysql.2021031800.php +++ b/lib/upgradedb/mysql.2021031800.php @@ -21,12 +21,7 @@ * */ -$this->BeginTrans(); $this->Execute(" UPDATE customers SET ict = ict + 1 WHERE icn <> '' "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021031800', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2021032200.php b/lib/upgradedb/mysql.2021032200.php index 5407c00fb8..7bfd0b8bb5 100644 --- a/lib/upgradedb/mysql.2021032200.php +++ b/lib/upgradedb/mysql.2021032200.php @@ -21,14 +21,9 @@ * */ -$this->BeginTrans(); if (!$this->ResourceExists('cash.servicetype', LMSDB::RESOURCE_TYPE_COLUMN)) { $this->Execute("ALTER TABLE cash ADD COLUMN servicetype smallint DEFAULT NULL"); $this->Execute("UPDATE cash SET servicetype = (SELECT t.type FROM invoicecontents ic JOIN tariffs t ON t.id = ic.tariffid WHERE ic.docid = cash.docid AND ic.itemid = cash.itemid LIMIT 1)"); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021032200', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2021032300.php b/lib/upgradedb/mysql.2021032300.php index 1f4ba187e8..e99c774c13 100644 --- a/lib/upgradedb/mysql.2021032300.php +++ b/lib/upgradedb/mysql.2021032300.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute( "INSERT INTO uiconfig (section, var, value) VALUES (?, ?, ?)", @@ -31,7 +30,3 @@ 'false', ) ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021032300', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2021040400.php b/lib/upgradedb/mysql.2021040400.php index 73893d9a35..25d19b06d9 100644 --- a/lib/upgradedb/mysql.2021040400.php +++ b/lib/upgradedb/mysql.2021040400.php @@ -24,14 +24,9 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("INSERT INTO uiconfig (section, var, value, description) VALUES (?, ?, ?, ?)", array('userpanel', 'show_discount', '1', '')); $this->Execute("INSERT INTO uiconfig (section, var, value, description) VALUES (?, ?, ?, ?)", array('userpanel', 'show_invoice_flag', '1', '')); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021040400', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2021040500.php b/lib/upgradedb/mysql.2021040500.php index 5c36f6464d..2667d2640d 100644 --- a/lib/upgradedb/mysql.2021040500.php +++ b/lib/upgradedb/mysql.2021040500.php @@ -24,11 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("INSERT INTO uiconfig (section, var, value, description) VALUES (?, ?, ?, ?)", array('userpanel', 'show_discounted_value', '0', '')); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021040500', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2021040900.php b/lib/upgradedb/mysql.2021040900.php index 97f4a2f239..ebae0c851a 100644 --- a/lib/upgradedb/mysql.2021040900.php +++ b/lib/upgradedb/mysql.2021040900.php @@ -24,9 +24,5 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("ALTER TABLE rttickets MODIFY priority tinyint(4) DEFAULT NULL"); -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021040900', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2021042200.php b/lib/upgradedb/mysql.2021042200.php index 61d7292f43..60969443c0 100644 --- a/lib/upgradedb/mysql.2021042200.php +++ b/lib/upgradedb/mysql.2021042200.php @@ -24,9 +24,5 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("ALTER TABLE rttickets MODIFY requestor varchar(255) DEFAULT NULL"); -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021042200', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2021042800.php b/lib/upgradedb/mysql.2021042800.php index 9a5c2a2083..f862c77d42 100644 --- a/lib/upgradedb/mysql.2021042800.php +++ b/lib/upgradedb/mysql.2021042800.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("DROP VIEW vusers"); @@ -37,7 +36,3 @@ WHERE ud2.userid = lms_current_user()) GROUP BY u.id "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021042800', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2021050700.php b/lib/upgradedb/mysql.2021050700.php index bcba605131..b4da56ad92 100644 --- a/lib/upgradedb/mysql.2021050700.php +++ b/lib/upgradedb/mysql.2021050700.php @@ -21,11 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE netdevices MODIFY COLUMN producer varchar(256) DEFAULT '' NOT NULL"); $this->Execute("ALTER TABLE netdevices MODIFY COLUMN model varchar(256) DEFAULT '' NOT NULL"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021050700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2021050701.php b/lib/upgradedb/mysql.2021050701.php index 70fc5a2fbb..bcb9c3b5c4 100644 --- a/lib/upgradedb/mysql.2021050701.php +++ b/lib/upgradedb/mysql.2021050701.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); if (!$this->ResourceExists('vcustomerassignments', LMSDB::RESOURCE_TYPE_VIEW)) { $this->Execute("ALTER TABLE customerassignments ADD COLUMN startdate int(11) DEFAULT 0"); @@ -83,7 +82,3 @@ END "); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021050701', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2021051000.php b/lib/upgradedb/mysql.2021051000.php index 672de21ef9..0d6745288b 100644 --- a/lib/upgradedb/mysql.2021051000.php +++ b/lib/upgradedb/mysql.2021051000.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("UPDATE customerassignments SET startdate = 0 WHERE startdate IS NULL"); $this->Execute("ALTER TABLE customerassignments MODIFY COLUMN startdate int(11) NOT NULL DEFAULT 0"); @@ -81,7 +80,3 @@ WHERE ud.userid = lms_current_user())) AND c.type < 2; "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021051000', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2021051300.php b/lib/upgradedb/mysql.2021051300.php index 9fc31b1de0..600f5061b9 100644 --- a/lib/upgradedb/mysql.2021051300.php +++ b/lib/upgradedb/mysql.2021051300.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); if (!$this->ResourceExists('divisions.firstname', LMSDB::RESOURCE_TYPE_COLUMN)) { $this->Execute("DROP VIEW vdivisions"); @@ -36,7 +35,3 @@ JOIN vaddresses a ON a.id = d.address_id; "); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021051300', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2021051400.php b/lib/upgradedb/mysql.2021051400.php index 177e874b32..454b8878ee 100644 --- a/lib/upgradedb/mysql.2021051400.php +++ b/lib/upgradedb/mysql.2021051400.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); if (!$this->ResourceExists('divisions.birthdate', LMSDB::RESOURCE_TYPE_COLUMN)) { $this->Execute("DROP VIEW vdivisions"); @@ -35,7 +34,3 @@ JOIN vaddresses a ON a.id = d.address_id; "); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021051400', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2021051900.php b/lib/upgradedb/mysql.2021051900.php index c2593bd6ac..1bd53f7558 100644 --- a/lib/upgradedb/mysql.2021051900.php +++ b/lib/upgradedb/mysql.2021051900.php @@ -21,13 +21,8 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE tariffs ADD COLUMN netflag tinyint(1) DEFAULT 0 NOT NULL"); $this->Execute("ALTER TABLE tariffs ADD COLUMN netvalue decimal(9,2) DEFAULT NULL"); $this->Execute("UPDATE tariffs SET netvalue = ROUND(value / ((SELECT taxes.value FROM taxes WHERE taxes.id = taxid) / 100 + 1), 2) WHERE netvalue IS NULL"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021051900', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2021052400.php b/lib/upgradedb/mysql.2021052400.php index 3d8bf9aee3..09f0b1f541 100644 --- a/lib/upgradedb/mysql.2021052400.php +++ b/lib/upgradedb/mysql.2021052400.php @@ -21,14 +21,9 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE liabilities ADD COLUMN netflag tinyint(1) DEFAULT 0 NOT NULL"); $this->Execute("ALTER TABLE liabilities ADD COLUMN netvalue decimal(9,2) DEFAULT NULL"); $this->Execute("UPDATE liabilities SET netvalue = ROUND(value / ((SELECT taxes.value FROM taxes WHERE taxes.id = taxid) / 100 + 1), 2) WHERE netvalue IS NULL"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021052400', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2021061500.php b/lib/upgradedb/mysql.2021061500.php index ef7e2c0e6a..7ea378a8b2 100644 --- a/lib/upgradedb/mysql.2021061500.php +++ b/lib/upgradedb/mysql.2021061500.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE assignments MODIFY COLUMN pdiscount decimal(5,2) NOT NULL DEFAULT 0"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021061500', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2021061600.php b/lib/upgradedb/mysql.2021061600.php index 3d486831a2..6b0ec06161 100644 --- a/lib/upgradedb/mysql.2021061600.php +++ b/lib/upgradedb/mysql.2021061600.php @@ -21,14 +21,9 @@ * */ -$this->BeginTrans(); if ($this->ResourceExists('vinvoicecontents', LMSDB::RESOURCE_TYPE_VIEW)) { $this->Execute("DROP VIEW vinvoicecontents"); } $this->Execute("ALTER TABLE invoicecontents MODIFY COLUMN pdiscount decimal(5,2) NOT NULL DEFAULT 0"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021061600', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2021061601.php b/lib/upgradedb/mysql.2021061601.php index d07611be94..42f6b39d35 100644 --- a/lib/upgradedb/mysql.2021061601.php +++ b/lib/upgradedb/mysql.2021061601.php @@ -21,13 +21,8 @@ * */ -$this->BeginTrans(); $this->Execute( "INSERT INTO uiconfig (section, var, value) VALUES (?, ?, ?)", array('userpanel', 'allowed_document_types', '') ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021061601', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2021061700.php b/lib/upgradedb/mysql.2021061700.php index eb3e2b1a2e..d1c65747fc 100644 --- a/lib/upgradedb/mysql.2021061700.php +++ b/lib/upgradedb/mysql.2021061700.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); if (!$this->GetOne( 'SELECT 1 FROM uiconfig WHERE section = ? AND var = ?', @@ -74,7 +73,3 @@ ('userpanel', 'document_approval_operator_notification_mail_body', '', '', 0); "); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021061700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2021070100.php b/lib/upgradedb/mysql.2021070100.php index 5fb9199f20..17b5981743 100644 --- a/lib/upgradedb/mysql.2021070100.php +++ b/lib/upgradedb/mysql.2021070100.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("DROP VIEW vallusers"); $this->Execute("DROP VIEW vusers"); @@ -44,7 +43,3 @@ SELECT *, CONCAT(firstname, ' ', lastname) AS name, CONCAT(lastname, ' ', firstname) AS rname FROM users "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021070100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2021070500.php b/lib/upgradedb/mysql.2021070500.php index 660f4780f0..0561c40de8 100644 --- a/lib/upgradedb/mysql.2021070500.php +++ b/lib/upgradedb/mysql.2021070500.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" CREATE TABLE customercalls ( @@ -51,7 +50,3 @@ UNIQUE KEY customercallassignments_customercallid_ukey (customercallid, customerid) ) ENGINE=InnoDB "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021070500', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2021070600.php b/lib/upgradedb/mysql.2021070600.php index 5331377872..39e170903a 100644 --- a/lib/upgradedb/mysql.2021070600.php +++ b/lib/upgradedb/mysql.2021070600.php @@ -21,14 +21,9 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE customercalls ADD COLUMN userid int(11) DEFAULT NULL"); $this->Execute(" ALTER TABLE customercalls ADD CONSTRAINT customercalls_userid_fkey FOREIGN KEY (userid) REFERENCES users (id) ON UPDATE CASCADE ON DELETE SET NULL "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021070600', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2021070700.php b/lib/upgradedb/mysql.2021070700.php index b62a096b6a..b6d773d380 100644 --- a/lib/upgradedb/mysql.2021070700.php +++ b/lib/upgradedb/mysql.2021070700.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE customercalls ADD COLUMN notes text DEFAULT NULL"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021070700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2021070900.php b/lib/upgradedb/mysql.2021070900.php index 1d240ad0f1..64fe0c0ad9 100644 --- a/lib/upgradedb/mysql.2021070900.php +++ b/lib/upgradedb/mysql.2021070900.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE customercalls MODIFY COLUMN phone varchar(20) NOT NULL"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021070900', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2021072000.php b/lib/upgradedb/mysql.2021072000.php index 2d53e3639b..6b986f7d0e 100644 --- a/lib/upgradedb/mysql.2021072000.php +++ b/lib/upgradedb/mysql.2021072000.php @@ -23,7 +23,6 @@ define('DOC_FLAG_NET_ACCOUNT_2021072000', 16); -$this->BeginTrans(); if ($this->ResourceExists('vinvoicecontents', LMSDB::RESOURCE_TYPE_VIEW)) { $this->Execute("DROP VIEW vinvoicecontents"); @@ -77,7 +76,3 @@ DOC_FLAG_NET_ACCOUNT_2021072000, ) ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021072000', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2021072100.php b/lib/upgradedb/mysql.2021072100.php index f0dedde654..68d31b9989 100644 --- a/lib/upgradedb/mysql.2021072100.php +++ b/lib/upgradedb/mysql.2021072100.php @@ -29,7 +29,6 @@ define('LIABILITY_FLAG_NET_ACCOUT', 16); define('LIABILITY_FLAG_SPLIT_PAYMENT', 32); -$this->BeginTrans(); $this->Execute( "UPDATE documents SET flags = (flags | ?) WHERE splitpayment = 1", @@ -75,7 +74,3 @@ ); $this->Execute("ALTER TABLE liabilities DROP COLUMN netflag"); $this->Execute("ALTER TABLE liabilities DROP COLUMN splitpayment"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021072100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2021072101.php b/lib/upgradedb/mysql.2021072101.php index 856c8a3bd8..2d317a3887 100644 --- a/lib/upgradedb/mysql.2021072101.php +++ b/lib/upgradedb/mysql.2021072101.php @@ -23,7 +23,6 @@ define('DOC_FLAG_NET_ACCOUNT_2021072101', 16); -$this->BeginTrans(); if ($this->ResourceExists('vinvoicecontents', LMSDB::RESOURCE_TYPE_VIEW)) { $this->Execute("DROP VIEW vinvoicecontents"); @@ -79,7 +78,3 @@ DOC_FLAG_NET_ACCOUNT_2021072101, ) ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021072101', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2021072102.php b/lib/upgradedb/mysql.2021072102.php index 6c78534407..7ed87abeb8 100644 --- a/lib/upgradedb/mysql.2021072102.php +++ b/lib/upgradedb/mysql.2021072102.php @@ -23,7 +23,6 @@ define('DOC_FLAG_NET_ACCOUNT_2021072102', 16); -$this->BeginTrans(); if ($this->ResourceExists('vinvoicecontents', LMSDB::RESOURCE_TYPE_VIEW)) { $this->Execute("DROP VIEW vinvoicecontents"); @@ -79,7 +78,3 @@ DOC_FLAG_NET_ACCOUNT_2021072102, ) ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021072102', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2021072103.php b/lib/upgradedb/mysql.2021072103.php index 0a9623c4fb..73badb4c82 100644 --- a/lib/upgradedb/mysql.2021072103.php +++ b/lib/upgradedb/mysql.2021072103.php @@ -23,7 +23,6 @@ define('DOC_FLAG_NET_ACCOUNT_2021072103', 16); -$this->BeginTrans(); if ($this->ResourceExists('vinvoicecontents', LMSDB::RESOURCE_TYPE_VIEW)) { $this->Execute("DROP VIEW vinvoicecontents"); @@ -79,7 +78,3 @@ DOC_FLAG_NET_ACCOUNT_2021072103, ) ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021072103', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2021072300.php b/lib/upgradedb/mysql.2021072300.php index 5fcc172855..7876657a13 100644 --- a/lib/upgradedb/mysql.2021072300.php +++ b/lib/upgradedb/mysql.2021072300.php @@ -28,7 +28,6 @@ define('DOC_CNOTE', 3); } -$this->BeginTrans(); $invoicecontents = $this->GetAll( "SELECT @@ -85,7 +84,3 @@ } } } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021072300', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2021072600.php b/lib/upgradedb/mysql.2021072600.php index 3716218d70..3be6c41a90 100644 --- a/lib/upgradedb/mysql.2021072600.php +++ b/lib/upgradedb/mysql.2021072600.php @@ -23,7 +23,6 @@ define('DOC_FLAG_NET_ACCOUNT', 16); -$this->BeginTrans(); if ($this->ResourceExists('vinvoicecontents', LMSDB::RESOURCE_TYPE_VIEW)) { $this->Execute("DROP VIEW vinvoicecontents"); @@ -94,7 +93,3 @@ DOC_FLAG_NET_ACCOUNT, ) ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021072600', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2021072900.php b/lib/upgradedb/mysql.2021072900.php index 42a172f9eb..478451c71b 100644 --- a/lib/upgradedb/mysql.2021072900.php +++ b/lib/upgradedb/mysql.2021072900.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("DROP VIEW customeraddressview"); $this->Execute("DROP VIEW contractorview"); @@ -117,7 +116,3 @@ LEFT JOIN customerconsentview cc ON cc.customerid = c.id WHERE c.type < 2 "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021072900', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2021082800.php b/lib/upgradedb/mysql.2021082800.php index f2c71690dc..b9b04579e0 100644 --- a/lib/upgradedb/mysql.2021082800.php +++ b/lib/upgradedb/mysql.2021082800.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" CREATE TABLE rtticketwatchers ( @@ -36,7 +35,3 @@ UNIQUE KEY rtticketwatchers_ticketid_ukey (ticketid, userid) ); "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021082800', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2021100500.php b/lib/upgradedb/mysql.2021100500.php index 75fed898e2..9ae6412798 100644 --- a/lib/upgradedb/mysql.2021100500.php +++ b/lib/upgradedb/mysql.2021100500.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("UPDATE netdevicemacs SET mac = UPPER(mac)"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021100500', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2021101900.php b/lib/upgradedb/mysql.2021101900.php index 2335a2a8e9..8e88329878 100644 --- a/lib/upgradedb/mysql.2021101900.php +++ b/lib/upgradedb/mysql.2021101900.php @@ -21,11 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE promotionschemas ADD COLUMN datefrom int(11) DEFAULT 0 NOT NULL"); $this->Execute("ALTER TABLE promotionschemas ADD COLUMN dateto int(11) DEFAULT 0 NOT NULL"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021101900', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2021102700.php b/lib/upgradedb/mysql.2021102700.php index 72655f90d7..f32c77c059 100644 --- a/lib/upgradedb/mysql.2021102700.php +++ b/lib/upgradedb/mysql.2021102700.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute( "INSERT INTO uiconfig (section, var, value) VALUES (?, ?, ?)", @@ -31,7 +30,3 @@ '', ) ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021102700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2021110800.php b/lib/upgradedb/mysql.2021110800.php index 928cd19a7a..85790925fe 100644 --- a/lib/upgradedb/mysql.2021110800.php +++ b/lib/upgradedb/mysql.2021110800.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); if (!$this->ResourceExists('customers.pinlastchange', LMSDB::RESOURCE_TYPE_COLUMN)) { $this->Execute("DROP VIEW customeraddressview"); @@ -119,7 +118,3 @@ WHERE c.type < 2 "); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021110800', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2021110900.php b/lib/upgradedb/mysql.2021110900.php index d52f789e83..cc8a043a72 100644 --- a/lib/upgradedb/mysql.2021110900.php +++ b/lib/upgradedb/mysql.2021110900.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); if (!$this->ResourceExists('customers', LMSDB::RESOURCE_TYPE_TABLE)) { $this->Execute(" @@ -39,7 +38,3 @@ ) ENGINE=InnoDB "); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021110900', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2021120100.php b/lib/upgradedb/mysql.2021120100.php index 266e1891a9..826741718d 100644 --- a/lib/upgradedb/mysql.2021120100.php +++ b/lib/upgradedb/mysql.2021120100.php @@ -21,12 +21,7 @@ * */ -$this->BeginTrans(); if (!$this->ResourceExists('dbinfo_keytype_ukey', LMSDB::RESOURCE_TYPE_CONSTRAINT)) { $this->Execute("ALTER TABLE dbinfo ADD UNIQUE KEY dbinfo_keytype_ukey (keytype)"); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021120100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2021121000.php b/lib/upgradedb/mysql.2021121000.php index 4e0af297ba..75c962ccb5 100644 --- a/lib/upgradedb/mysql.2021121000.php +++ b/lib/upgradedb/mysql.2021121000.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); if (!$this->Execute( "SELECT 1 FROM uiconfig WHERE section = ? AND var = ?", @@ -32,7 +31,3 @@ array('userpanel', 'document_approval_customer_notification_attachments', '0', '', 0) ); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021121000', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2021121500.php b/lib/upgradedb/mysql.2021121500.php index 461ecf1e89..2765bbdc15 100644 --- a/lib/upgradedb/mysql.2021121500.php +++ b/lib/upgradedb/mysql.2021121500.php @@ -23,7 +23,6 @@ define('DOC_FLAG_NET_ACCOUNT_2021121500', 16); -$this->BeginTrans(); $this->Execute("DROP VIEW vinvoicecontents"); @@ -112,7 +111,3 @@ DOC_FLAG_NET_ACCOUNT_2021121500, ) ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021121500', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2022011300.php b/lib/upgradedb/mysql.2022011300.php index 777b2c12e7..4fb196ade9 100644 --- a/lib/upgradedb/mysql.2022011300.php +++ b/lib/upgradedb/mysql.2022011300.php @@ -20,9 +20,3 @@ * USA. * */ - -$this->BeginTrans(); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2022011300', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2022012000.php b/lib/upgradedb/mysql.2022012000.php index 6b5477057e..5552ad916c 100644 --- a/lib/upgradedb/mysql.2022012000.php +++ b/lib/upgradedb/mysql.2022012000.php @@ -21,13 +21,7 @@ * */ -$this->BeginTrans(); - if (!$this->ResourceExists('messageitems.externalmsgid.varchar(64)', LMSDB::RESOURCE_TYPE_COLUMN_TYPE)) { $this->Execute("ALTER TABLE messageitems MODIFY COLUMN externalmsgid varchar(64) DEFAULT NULL"); $this->Execute("UPDATE messageitems SET externalmsgid = NULL WHERE externalmsgid = ?", array('0')); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2022012000', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2022030100.php b/lib/upgradedb/mysql.2022030100.php index ac533e9b13..0be3738a3d 100644 --- a/lib/upgradedb/mysql.2022030100.php +++ b/lib/upgradedb/mysql.2022030100.php @@ -21,12 +21,7 @@ * */ -$this->BeginTrans(); if (!$this->ResourceExists('rtmessages.extid', LMSDB::RESOURCE_TYPE_COLUMN)) { $this->Execute("ALTER TABLE rtmessages ADD COLUMN extid varchar(64) DEFAULT NULL"); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2022030100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2022060900.php b/lib/upgradedb/mysql.2022060900.php index 7f30d84d12..fad2475ea7 100644 --- a/lib/upgradedb/mysql.2022060900.php +++ b/lib/upgradedb/mysql.2022060900.php @@ -21,14 +21,9 @@ * */ -$this->BeginTrans(); if (!$this->ResourceExists('voip_cdr.fraction', LMSDB::RESOURCE_TYPE_COLUMN)) { $this->Execute("ALTER TABLE voip_cdr ADD COLUMN fraction varchar(256) DEFAULT NULL"); $this->Execute("ALTER TABLE voip_cdr ADD COLUMN prefix varchar(256) DEFAULT NULL"); $this->Execute("ALTER TABLE voip_cdr ADD COLUMN prefixname varchar(256) DEFAULT NULL"); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2022060900', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2022061300.php b/lib/upgradedb/mysql.2022061300.php index d59c5ac1f7..d1a26c99f6 100644 --- a/lib/upgradedb/mysql.2022061300.php +++ b/lib/upgradedb/mysql.2022061300.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); if (!$this->ResourceExists('voip_cdr.cdate', LMSDB::RESOURCE_TYPE_COLUMN)) { $this->Execute("ALTER TABLE voip_cdr ADD COLUMN cdate int(11) DEFAULT 0 NOT NULL"); @@ -38,7 +37,3 @@ END "); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2022061300', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2022061301.php b/lib/upgradedb/mysql.2022061301.php index 36fbbc2386..4a0b396553 100644 --- a/lib/upgradedb/mysql.2022061301.php +++ b/lib/upgradedb/mysql.2022061301.php @@ -21,13 +21,8 @@ * */ -$this->BeginTrans(); if ($this->ResourceExists('voip_cdr.cdate', LMSDB::RESOURCE_TYPE_COLUMN)) { $this->Execute("DROP TRIGGER voip_cdr_insert_trigger"); $this->Execute("ALTER TABLE voip_cdr DROP COLUMN cdate"); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2022061301', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2022062400.php b/lib/upgradedb/mysql.2022062400.php index eccbd80f53..2b433cf57e 100644 --- a/lib/upgradedb/mysql.2022062400.php +++ b/lib/upgradedb/mysql.2022062400.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute( "UPDATE uiconfig SET section = ?, var = ? WHERE section = ? AND var = ?", @@ -32,7 +31,3 @@ 'timetable_days_forward', ) ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2022062400', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2022062401.php b/lib/upgradedb/mysql.2022062401.php index 9c23e63983..7d121c762f 100644 --- a/lib/upgradedb/mysql.2022062401.php +++ b/lib/upgradedb/mysql.2022062401.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute( "UPDATE uiconfig SET section = ? WHERE section = ? AND var = ?", @@ -31,7 +30,3 @@ 'event_max_userlist_size', ) ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2022062401', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2022062402.php b/lib/upgradedb/mysql.2022062402.php index 80475f96e5..ac6c067e35 100644 --- a/lib/upgradedb/mysql.2022062402.php +++ b/lib/upgradedb/mysql.2022062402.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute( "UPDATE uiconfig SET section = ? WHERE section = ? AND var = ?", @@ -31,7 +30,3 @@ 'event_usergroup_selection_type', ) ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2022062402', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2022062700.php b/lib/upgradedb/mysql.2022062700.php index a5dfc871ac..8c2cb9fdb2 100644 --- a/lib/upgradedb/mysql.2022062700.php +++ b/lib/upgradedb/mysql.2022062700.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute( "UPDATE uiconfig SET section = ?, var = ? WHERE section = ? AND var = ?", @@ -32,7 +31,3 @@ 'helpdesk_sender_name', ) ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2022062700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2022062701.php b/lib/upgradedb/mysql.2022062701.php index d1191da783..1300230ada 100644 --- a/lib/upgradedb/mysql.2022062701.php +++ b/lib/upgradedb/mysql.2022062701.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute( "UPDATE uiconfig SET section = ?, var = ? WHERE section = ? AND var = ?", @@ -32,7 +31,3 @@ 'helpdesk_backend_mode', ) ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2022062701', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2022062702.php b/lib/upgradedb/mysql.2022062702.php index 7f9e10ebe4..bd4cfe4e2e 100644 --- a/lib/upgradedb/mysql.2022062702.php +++ b/lib/upgradedb/mysql.2022062702.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute( "UPDATE uiconfig SET section = ?, var = ? WHERE section = ? AND var = ?", @@ -32,7 +31,3 @@ 'helpdesk_notify', ) ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2022062702', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2022062703.php b/lib/upgradedb/mysql.2022062703.php index 21b4f8ae06..802ad2437a 100644 --- a/lib/upgradedb/mysql.2022062703.php +++ b/lib/upgradedb/mysql.2022062703.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute( "UPDATE uiconfig SET section = ?, var = ? WHERE section = ? AND var = ?", @@ -32,7 +31,3 @@ 'helpdesk_reply_body', ) ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2022062703', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2022062704.php b/lib/upgradedb/mysql.2022062704.php index ea831a6d16..4a5ce7021c 100644 --- a/lib/upgradedb/mysql.2022062704.php +++ b/lib/upgradedb/mysql.2022062704.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute( "UPDATE uiconfig SET section = ?, var = ? WHERE section = ? AND var = ?", @@ -32,7 +31,3 @@ 'reply_body', ) ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2022062704', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2022062705.php b/lib/upgradedb/mysql.2022062705.php index 32c4f6381a..87225f5633 100644 --- a/lib/upgradedb/mysql.2022062705.php +++ b/lib/upgradedb/mysql.2022062705.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute( "UPDATE uiconfig SET section = ?, var = ? WHERE section = ? AND var = ?", @@ -52,7 +51,3 @@ 'helpdesk_notification_sms_body', ) ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2022062705', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2022062706.php b/lib/upgradedb/mysql.2022062706.php index a47aa0670f..9ba855cf03 100644 --- a/lib/upgradedb/mysql.2022062706.php +++ b/lib/upgradedb/mysql.2022062706.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute( "UPDATE uiconfig SET section = ?, var = ? WHERE section = ? AND var = ?", @@ -42,7 +41,3 @@ 'helpdesk_customerinfo_sms_body', ) ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2022062706', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2022062800.php b/lib/upgradedb/mysql.2022062800.php index 735e34c2a7..e3a564bd23 100644 --- a/lib/upgradedb/mysql.2022062800.php +++ b/lib/upgradedb/mysql.2022062800.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute( "UPDATE uiconfig SET section = ?, var = ? WHERE section = ? AND var = ?", @@ -32,7 +31,3 @@ 'helpdesk_customerinfo', ) ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2022062800', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2022062801.php b/lib/upgradedb/mysql.2022062801.php index 3ac3f40996..535e2fbf9e 100644 --- a/lib/upgradedb/mysql.2022062801.php +++ b/lib/upgradedb/mysql.2022062801.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute( "UPDATE uiconfig SET section = ?, var = ? WHERE section = ? AND var = ?", @@ -32,7 +31,3 @@ 'helpdesk_stats', ) ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2022062801', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2022062802.php b/lib/upgradedb/mysql.2022062802.php index 644539e96b..9a758900ac 100644 --- a/lib/upgradedb/mysql.2022062802.php +++ b/lib/upgradedb/mysql.2022062802.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute( "UPDATE uiconfig SET section = ?, var = ? WHERE section = ? AND var = ?", @@ -32,7 +31,3 @@ 'newticket_notify', ) ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2022062802', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2022062803.php b/lib/upgradedb/mysql.2022062803.php index d1aac9f47a..b95bbe3ee9 100644 --- a/lib/upgradedb/mysql.2022062803.php +++ b/lib/upgradedb/mysql.2022062803.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute( "UPDATE uiconfig SET section = ?, var = ? WHERE section = ? AND var = ?", @@ -32,7 +31,3 @@ 'ticket_template_file', ) ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2022062803', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2022062804.php b/lib/upgradedb/mysql.2022062804.php index bcac4c72e5..3489026c69 100644 --- a/lib/upgradedb/mysql.2022062804.php +++ b/lib/upgradedb/mysql.2022062804.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute( "UPDATE uiconfig SET section = ?, var = ? WHERE section = ? AND var = ?", @@ -52,7 +51,3 @@ 'ticketlist_pagelimit', ) ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2022062804', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2022062805.php b/lib/upgradedb/mysql.2022062805.php index 4eb0fcbac0..ce7f4da5ff 100644 --- a/lib/upgradedb/mysql.2022062805.php +++ b/lib/upgradedb/mysql.2022062805.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute( "UPDATE uiconfig SET section = ?, var = ? WHERE section = ? AND var = ?", @@ -325,7 +324,3 @@ 'ticket_property_change_notify', ) ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2022062805', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2022062806.php b/lib/upgradedb/mysql.2022062806.php index 0955a422ca..6e8bd81707 100644 --- a/lib/upgradedb/mysql.2022062806.php +++ b/lib/upgradedb/mysql.2022062806.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute( "UPDATE uiconfig SET section = ? WHERE section = ? AND var = ?", @@ -31,7 +30,3 @@ 'allow_modify_closed_events_newer_than', ) ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2022062806', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2022062807.php b/lib/upgradedb/mysql.2022062807.php index 447463aaa2..92dbb32200 100644 --- a/lib/upgradedb/mysql.2022062807.php +++ b/lib/upgradedb/mysql.2022062807.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute( "UPDATE uiconfig SET section = ? WHERE section = ? AND var = ?", @@ -31,7 +30,3 @@ 'default_show_closed_events', ) ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2022062807', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2022062808.php b/lib/upgradedb/mysql.2022062808.php index 966eb79462..c0050e1784 100644 --- a/lib/upgradedb/mysql.2022062808.php +++ b/lib/upgradedb/mysql.2022062808.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); if ($this->ResourceExists('voip_cdr_uniqueid_key', LMSDB::RESOURCE_TYPE_CONSTRAINT)) { $this->Execute("ALTER TABLE voip_cdr DROP CONSTRAINT voip_cdr_uniqueid_key"); @@ -29,7 +28,3 @@ if (!$this->ResourceExists('voip_cdr_type_uniqueid_ukey', LMSDB::RESOURCE_TYPE_CONSTRAINT)) { $this->Execute("ALTER TABLE voip_cdr ADD CONSTRAINT voip_cdr_type_uniqueid_ukey UNIQUE (type, uniqueid)"); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2022062808', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2022070400.php b/lib/upgradedb/mysql.2022070400.php index a93782d6c0..373347c318 100644 --- a/lib/upgradedb/mysql.2022070400.php +++ b/lib/upgradedb/mysql.2022070400.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); if (!$this->ResourceExists('voip_cdr_caller_idx', LMSDB::RESOURCE_TYPE_INDEX)) { $this->Execute("CREATE INDEX voip_cdr_caller_idx ON voip_cdr (caller)"); @@ -29,7 +28,3 @@ if (!$this->ResourceExists('voip_cdr_callee_idx', LMSDB::RESOURCE_TYPE_INDEX)) { $this->Execute("CREATE INDEX voip_cdr_callee_idx ON voip_cdr (callee)"); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2022070400', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2022070401.php b/lib/upgradedb/mysql.2022070401.php index 82f443f2ec..6dd86b6358 100644 --- a/lib/upgradedb/mysql.2022070401.php +++ b/lib/upgradedb/mysql.2022070401.php @@ -24,7 +24,6 @@ //define('CCONSENT_PHONE_BILLING', 11); //define('CCONSENT_FULL_PHONE_BILLING', 13); -$this->BeginTrans(); $this->Execute( "UPDATE customerconsents SET type = ? WHERE type = ?", @@ -33,7 +32,3 @@ 11, ) ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2022070401', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2022070700.php b/lib/upgradedb/mysql.2022070700.php index 32271ae48f..0533558a6e 100644 --- a/lib/upgradedb/mysql.2022070700.php +++ b/lib/upgradedb/mysql.2022070700.php @@ -21,12 +21,7 @@ * */ -$this->BeginTrans(); if (!$this->ResourceExists('voip_numbers.info', LMSDB::RESOURCE_TYPE_COLUMN)) { $this->Execute("ALTER TABLE voip_numbers ADD COLUMN info varchar(255) DEFAULT NULL"); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2022070700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2022071800.php b/lib/upgradedb/mysql.2022071800.php index 8ca89dfafb..28604cd52c 100644 --- a/lib/upgradedb/mysql.2022071800.php +++ b/lib/upgradedb/mysql.2022071800.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE cashsources ADD COLUMN isdefault smallint NOT NULL DEFAULT 0"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2022071800', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2022081700.php b/lib/upgradedb/mysql.2022081700.php index 1f6e56028e..24c166e981 100644 --- a/lib/upgradedb/mysql.2022081700.php +++ b/lib/upgradedb/mysql.2022081700.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute( "UPDATE uiconfig SET section = ?, var = ? WHERE section = ? AND var = ?", @@ -52,7 +51,3 @@ 'cache_documents', ) ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2022081700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2022081800.php b/lib/upgradedb/mysql.2022081800.php index 65494fc923..54e75623bd 100644 --- a/lib/upgradedb/mysql.2022081800.php +++ b/lib/upgradedb/mysql.2022081800.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("DROP VIEW customerview"); $this->Execute("DROP VIEW contractorview"); @@ -117,7 +116,3 @@ LEFT JOIN customerconsentview cc ON cc.customerid = c.id WHERE c.type < 2; "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2022081800', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2022082600.php b/lib/upgradedb/mysql.2022082600.php index 170841ec84..966322cb34 100644 --- a/lib/upgradedb/mysql.2022082600.php +++ b/lib/upgradedb/mysql.2022082600.php @@ -21,13 +21,8 @@ * */ -$this->BeginTrans(); if (!$this->ResourceExists('voip_cdr.subtype', LMSDB::RESOURCE_TYPE_COLUMN)) { $this->Execute("ALTER TABLE voip_cdr ADD COLUMN subtype smallint NOT NULL DEFAULT 0"); $this->Execute("CREATE INDEX voip_cdr_subtype_idx ON voip_cdr (subtype)"); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2022082600', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2022082601.php b/lib/upgradedb/mysql.2022082601.php index fa6d3887b7..b599f0f618 100644 --- a/lib/upgradedb/mysql.2022082601.php +++ b/lib/upgradedb/mysql.2022082601.php @@ -21,12 +21,7 @@ * */ -$this->BeginTrans(); if (!$this->ResourceExists('voip_cdr_call_start_time_idx', LMSDB::RESOURCE_TYPE_INDEX)) { $this->Execute("CREATE INDEX voip_cdr_call_start_time_idx ON voip_cdr (call_start_time)"); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2022082601', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/mysql.2022090800.php b/lib/upgradedb/mysql.2022090800.php index 1528c9c974..d14c52c6b1 100644 --- a/lib/upgradedb/mysql.2022090800.php +++ b/lib/upgradedb/mysql.2022090800.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); if ($this->ResourceExists('voip_cdr_type_uniqueid_ukey', LMSDB::RESOURCE_TYPE_CONSTRAINT)) { $this->Execute("ALTER TABLE voip_cdr DROP CONSTRAINT voip_cdr_type_uniqueid_ukey"); @@ -37,7 +36,3 @@ $this->Execute("DROP INDEX voip_cdr_subtype_idx ON voip_cdr"); $this->Execute("ALTER TABLE voip_cdr CHANGE COLUMN subtype incremental smallint NOT NULL DEFAULT 0"); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2022090800', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2004030800.php b/lib/upgradedb/postgres.2004030800.php index 65c2accfc7..4e03f35fa5 100644 --- a/lib/upgradedb/postgres.2004030800.php +++ b/lib/upgradedb/postgres.2004030800.php @@ -67,5 +67,3 @@ body text DEFAULT '' NOT NULL, PRIMARY KEY (id)) "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2004030800', 'dbversion')); diff --git a/lib/upgradedb/postgres.2004031000.php b/lib/upgradedb/postgres.2004031000.php index 903ba90882..433030a46d 100644 --- a/lib/upgradedb/postgres.2004031000.php +++ b/lib/upgradedb/postgres.2004031000.php @@ -39,5 +39,3 @@ UPDATE nodes SET warning=0; ALTER TABLE nodes ALTER warning SET NOT NULL "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2004031000', 'dbversion')); diff --git a/lib/upgradedb/postgres.2004031100.php b/lib/upgradedb/postgres.2004031100.php index 83d9740413..bdb2caf34c 100644 --- a/lib/upgradedb/postgres.2004031100.php +++ b/lib/upgradedb/postgres.2004031100.php @@ -37,5 +37,3 @@ filename VARCHAR(255) NOT NULL, contenttype VARCHAR(255) NOT NULL) "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2004031100', 'dbversion')); diff --git a/lib/upgradedb/postgres.2004031400.php b/lib/upgradedb/postgres.2004031400.php index a0ec26a297..4af8a2269b 100644 --- a/lib/upgradedb/postgres.2004031400.php +++ b/lib/upgradedb/postgres.2004031400.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->Execute("BEGIN"); $this->Execute(" ALTER TABLE admins ALTER lastloginip SET DEFAULT ''; ALTER TABLE admins ALTER failedloginip SET DEFAULT ''; @@ -196,6 +195,3 @@ ALTER TABLE users ALTER info SET NOT NULL; ALTER TABLE users ALTER message SET NOT NULL; "); -$this->Execute("UPDATE dbinfo SET keyvalue='2004031400' WHERE keytype='dbversion'"); - -$this->Execute("COMMIT"); diff --git a/lib/upgradedb/postgres.2004031401.php b/lib/upgradedb/postgres.2004031401.php index 4862ddcde4..b044d3fda2 100644 --- a/lib/upgradedb/postgres.2004031401.php +++ b/lib/upgradedb/postgres.2004031401.php @@ -24,9 +24,6 @@ * $Id$ */ -$this->Execute("BEGIN"); $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'"); -$this->Execute("COMMIT"); diff --git a/lib/upgradedb/postgres.2004031402.php b/lib/upgradedb/postgres.2004031402.php index 4e385b7bc3..47532adb0e 100644 --- a/lib/upgradedb/postgres.2004031402.php +++ b/lib/upgradedb/postgres.2004031402.php @@ -24,7 +24,7 @@ * $Id$ */ -$this->Execute("BEGIN; +$this->Execute(" ALTER TABLE assignments ADD datefrom integer; ALTER TABLE assignments ALTER datefrom SET DEFAULT 0; UPDATE assignments SET datefrom=0; @@ -34,6 +34,3 @@ UPDATE assignments SET dateto=0; ALTER TABLE assignments ALTER dateto SET NOT NULL; "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2004031402', 'dbversion')); -$this->Execute("COMMIT"); diff --git a/lib/upgradedb/postgres.2004040701.php b/lib/upgradedb/postgres.2004040701.php index 5ba9f5ddd1..f9c6f6a334 100644 --- a/lib/upgradedb/postgres.2004040701.php +++ b/lib/upgradedb/postgres.2004040701.php @@ -27,13 +27,11 @@ // upgrade nie potrzebny dla bazy powy¿ej 1.2.0rc5 dla ga³êzi 1.2, za³atwmy to transakcj± $this->Execute(" - BEGIN; + ALTER TABLE invoicecontents ALTER taxvalue DROP NOT NULL; - COMMIT"); + "); $this->Execute(" - BEGIN; + ALTER TABLE tariffs ALTER taxvalue DROP NOT NULL; - COMMIT"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2004040701', 'dbversion')); + "); diff --git a/lib/upgradedb/postgres.2004040800.php b/lib/upgradedb/postgres.2004040800.php index 5207858bc5..d7bff7641a 100644 --- a/lib/upgradedb/postgres.2004040800.php +++ b/lib/upgradedb/postgres.2004040800.php @@ -26,10 +26,9 @@ $this->Execute( " - BEGIN; + ALTER TABLE cash ADD taxvalue decimal(9,2); ALTER TABLE cash ALTER taxvalue SET DEFAULT 0; - UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?; - COMMIT", + ", array('2004040800', 'dbversion') ); diff --git a/lib/upgradedb/postgres.2004041600.php b/lib/upgradedb/postgres.2004041600.php index 8446d87864..6915797fdf 100644 --- a/lib/upgradedb/postgres.2004041600.php +++ b/lib/upgradedb/postgres.2004041600.php @@ -24,7 +24,7 @@ * $Id$ */ $this->Execute(" - BEGIN; + CREATE SEQUENCE usergroups_id_seq; CREATE TABLE usergroups ( id integer DEFAULT nextval('usergroups_id_seq'::text) NOT NULL, @@ -41,6 +41,5 @@ PRIMARY KEY (id), UNIQUE (usergroupid, userid) ); - UPDATE dbinfo SET keyvalue = '2004041600' WHERE keytype = 'dbversion'; - COMMIT; + "); diff --git a/lib/upgradedb/postgres.2004042000.php b/lib/upgradedb/postgres.2004042000.php index 053a377e1e..b62b522afd 100644 --- a/lib/upgradedb/postgres.2004042000.php +++ b/lib/upgradedb/postgres.2004042000.php @@ -24,8 +24,7 @@ * $Id$ */ $this->Execute(" - BEGIN; + ALTER TABLE nodes DROP CONSTRAINT nodes_mac_key; - UPDATE dbinfo SET keyvalue = '2004042000' WHERE keytype = 'dbversion'; - COMMIT; + "); diff --git a/lib/upgradedb/postgres.2004042300.php b/lib/upgradedb/postgres.2004042300.php index 5c36d780a2..2a35d2670b 100644 --- a/lib/upgradedb/postgres.2004042300.php +++ b/lib/upgradedb/postgres.2004042300.php @@ -24,11 +24,10 @@ * $Id$ */ $this->Execute(" - BEGIN; + ALTER TABLE admins ADD deleted smallint; ALTER TABLE admins ALTER deleted SET DEFAULT 0; UPDATE admins SET deleted=0; ALTER TABLE admins ALTER deleted SET NOT NULL; - UPDATE dbinfo SET keyvalue = '2004042300' WHERE keytype = 'dbversion'; - COMMIT; + "); diff --git a/lib/upgradedb/postgres.2004061900.php b/lib/upgradedb/postgres.2004061900.php index 7d947f8cf7..7a7e9b468e 100644 --- a/lib/upgradedb/postgres.2004061900.php +++ b/lib/upgradedb/postgres.2004061900.php @@ -24,7 +24,7 @@ * $Id$ */ $this->Execute(" - BEGIN; + ALTER TABLE tariffs ADD upceil integer; ALTER TABLE tariffs ALTER upceil SET DEFAULT 0; UPDATE tariffs SET upceil=0; @@ -47,6 +47,5 @@ UPDATE tariffs SET upceil=uprate, downceil=downrate; - UPDATE dbinfo SET keyvalue = '2004061900' WHERE keytype = 'dbversion'; - COMMIT; + "); diff --git a/lib/upgradedb/postgres.2004070100.php b/lib/upgradedb/postgres.2004070100.php index 8bf1219098..a1a02c8a2a 100644 --- a/lib/upgradedb/postgres.2004070100.php +++ b/lib/upgradedb/postgres.2004070100.php @@ -25,7 +25,7 @@ */ $this->Execute(" - BEGIN; + CREATE SEQUENCE rtrights_id_seq; CREATE TABLE rtrights ( id integer DEFAULT nextval('rtrights_id_seq'::text) NOT NULL, @@ -40,6 +40,5 @@ UPDATE rtqueues SET description=''; ALTER TABLE rtqueues ALTER description SET NOT NULL; - UPDATE dbinfo SET keyvalue = '2004070100' WHERE keytype = 'dbversion'; - COMMIT; + "); diff --git a/lib/upgradedb/postgres.2004070800.php b/lib/upgradedb/postgres.2004070800.php index 2c4393579b..a942552b2e 100644 --- a/lib/upgradedb/postgres.2004070800.php +++ b/lib/upgradedb/postgres.2004070800.php @@ -25,12 +25,11 @@ */ $this->Execute(" - BEGIN; + ALTER TABLE rttickets ADD userid integer; ALTER TABLE rttickets ALTER userid SET DEFAULT 0; UPDATE rttickets SET userid=0; ALTER TABLE rttickets ALTER userid SET NOT NULL; - UPDATE dbinfo SET keyvalue = '2004070800' WHERE keytype = 'dbversion'; - COMMIT; + "); diff --git a/lib/upgradedb/postgres.2004071200.php b/lib/upgradedb/postgres.2004071200.php index 951fa2f249..a33c20b4cd 100644 --- a/lib/upgradedb/postgres.2004071200.php +++ b/lib/upgradedb/postgres.2004071200.php @@ -25,7 +25,7 @@ */ $this->Execute(" - BEGIN; + ALTER TABLE rtmessages ADD userid integer; ALTER TABLE rtmessages ALTER userid SET DEFAULT 0; UPDATE rtmessages SET userid=0; @@ -39,6 +39,5 @@ ALTER TABLE rtqueues DROP CONSTRAINT rtqueues_email_key; - UPDATE dbinfo SET keyvalue = '2004071200' WHERE keytype = 'dbversion'; - COMMIT; + "); diff --git a/lib/upgradedb/postgres.2004071400.php b/lib/upgradedb/postgres.2004071400.php index aaddf25e63..754d3f8b9b 100644 --- a/lib/upgradedb/postgres.2004071400.php +++ b/lib/upgradedb/postgres.2004071400.php @@ -25,7 +25,7 @@ */ $this->Execute(" - BEGIN; + ALTER TABLE stats ADD down bigint; ALTER TABLE stats ADD up bigint; ALTER TABLE stats ALTER down SET DEFAULT 0; @@ -37,6 +37,5 @@ ALTER TABLE stats RENAME up TO upload; ALTER TABLE stats RENAME down TO download; - UPDATE dbinfo SET keyvalue = '2004071400' WHERE keytype = 'dbversion'; - COMMIT; + "); diff --git a/lib/upgradedb/postgres.2004072100.php b/lib/upgradedb/postgres.2004072100.php index 787c3ae137..a19c67f427 100644 --- a/lib/upgradedb/postgres.2004072100.php +++ b/lib/upgradedb/postgres.2004072100.php @@ -25,12 +25,11 @@ */ $this->Execute(" - BEGIN; + ALTER TABLE users ADD serviceaddr text; ALTER TABLE users ALTER serviceaddr SET DEFAULT ''; UPDATE users SET serviceaddr=''; ALTER TABLE users ALTER serviceaddr SET NOT NULL; - UPDATE dbinfo SET keyvalue = '2004072100' WHERE keytype = 'dbversion'; - COMMIT; + "); diff --git a/lib/upgradedb/postgres.2004072700.php b/lib/upgradedb/postgres.2004072700.php index fc0c0b2eba..a9adf316e3 100644 --- a/lib/upgradedb/postgres.2004072700.php +++ b/lib/upgradedb/postgres.2004072700.php @@ -25,13 +25,12 @@ */ $this->Execute(" - BEGIN; + ALTER TABLE rttickets ADD resolvetime integer; ALTER TABLE rttickets ALTER resolvetime SET DEFAULT 0; UPDATE rttickets SET resolvetime=0; UPDATE rttickets SET resolvetime=createtime WHERE state=2; ALTER TABLE rttickets ALTER resolvetime SET NOT NULL; - UPDATE dbinfo SET keyvalue = '2004072700' WHERE keytype = 'dbversion'; - COMMIT; + "); diff --git a/lib/upgradedb/postgres.2004081400.php b/lib/upgradedb/postgres.2004081400.php index 2de8c7b608..667b1581c7 100644 --- a/lib/upgradedb/postgres.2004081400.php +++ b/lib/upgradedb/postgres.2004081400.php @@ -25,10 +25,9 @@ */ $this->Execute(" - BEGIN; + ALTER TABLE nodes ADD lastonline integer; ALTER TABLE nodes ALTER lastonline SET DEFAULT 0; - UPDATE dbinfo SET keyvalue = '2004081400' WHERE keytype = 'dbversion'; - COMMIT; + "); diff --git a/lib/upgradedb/postgres.2004081700.php b/lib/upgradedb/postgres.2004081700.php index d5a0036023..f7a417c923 100644 --- a/lib/upgradedb/postgres.2004081700.php +++ b/lib/upgradedb/postgres.2004081700.php @@ -25,10 +25,9 @@ */ $this->Execute(" - BEGIN; + UPDATE nodes SET lastonline=0 WHERE lastonline IS NULL; ALTER TABLE nodes ALTER lastonline SET NOT NULL; - UPDATE dbinfo SET keyvalue = '2004081700' WHERE keytype = 'dbversion'; - COMMIT; + "); diff --git a/lib/upgradedb/postgres.2004081800.php b/lib/upgradedb/postgres.2004081800.php index 4c65d55577..8ef0dcb909 100644 --- a/lib/upgradedb/postgres.2004081800.php +++ b/lib/upgradedb/postgres.2004081800.php @@ -25,12 +25,11 @@ */ $this->Execute(" - BEGIN; + ALTER TABLE assignments ADD suspended smallint; ALTER TABLE assignments ALTER suspended SET DEFAULT 0; UPDATE assignments SET suspended=0; ALTER TABLE assignments ALTER suspended SET NOT NULL; - UPDATE dbinfo SET keyvalue = '2004081800' WHERE keytype = 'dbversion'; - COMMIT; + "); diff --git a/lib/upgradedb/postgres.2004090700.php b/lib/upgradedb/postgres.2004090700.php index 1280b2c77e..07ed2b3ad6 100644 --- a/lib/upgradedb/postgres.2004090700.php +++ b/lib/upgradedb/postgres.2004090700.php @@ -24,9 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" CREATE INDEX cash_userid_idx ON cash(userid); - UPDATE dbinfo SET keyvalue = '2004090700' WHERE keytype = 'dbversion'; "); -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2004090800.php b/lib/upgradedb/postgres.2004090800.php index 1554e1ae4b..4693bfcbb6 100644 --- a/lib/upgradedb/postgres.2004090800.php +++ b/lib/upgradedb/postgres.2004090800.php @@ -24,13 +24,10 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" ALTER TABLE users ADD COLUMN pin integer; UPDATE users SET pin=random()*10 + random()*100 + random()*1000 + random()*10000 + random()*100000-1; ALTER TABLE users ALTER pin SET DEFAULT 0; ALTER TABLE users ALTER pin SET NOT NULL; - UPDATE dbinfo SET keyvalue = '2004090800' WHERE keytype = 'dbversion'; "); -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2004101800.php b/lib/upgradedb/postgres.2004101800.php index a23b0ebfd6..6dc1937f7f 100644 --- a/lib/upgradedb/postgres.2004101800.php +++ b/lib/upgradedb/postgres.2004101800.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" ALTER TABLE nodes ADD COLUMN linktype smallint; UPDATE nodes SET linktype=0; @@ -36,6 +35,4 @@ ALTER TABLE netlinks ALTER type SET DEFAULT 0; ALTER TABLE netlinks ALTER type SET NOT NULL; - UPDATE dbinfo SET keyvalue = '2004101800' WHERE keytype = 'dbversion'; "); -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2004102900.php b/lib/upgradedb/postgres.2004102900.php index 7794100a87..92a9a0e55f 100644 --- a/lib/upgradedb/postgres.2004102900.php +++ b/lib/upgradedb/postgres.2004102900.php @@ -24,13 +24,10 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" ALTER TABLE nodes ADD COLUMN info text; UPDATE nodes SET info=''; ALTER TABLE nodes ALTER info SET DEFAULT ''; ALTER TABLE nodes ALTER info SET NOT NULL; - UPDATE dbinfo SET keyvalue = '2004102900' WHERE keytype = 'dbversion'; "); -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2004111300.php b/lib/upgradedb/postgres.2004111300.php index b51c30df90..8fd649656b 100644 --- a/lib/upgradedb/postgres.2004111300.php +++ b/lib/upgradedb/postgres.2004111300.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" CREATE SEQUENCE passwd_id_seq; CREATE TABLE passwd ( @@ -37,6 +36,4 @@ home varchar(25) DEFAULT '' NOT NULL, PRIMARY KEY (id) ); - UPDATE dbinfo SET keyvalue = '2004111300' WHERE keytype = 'dbversion'; "); -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2004111700.php b/lib/upgradedb/postgres.2004111700.php index 459db3975b..f7d42bd260 100644 --- a/lib/upgradedb/postgres.2004111700.php +++ b/lib/upgradedb/postgres.2004111700.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" ALTER TABLE passwd ADD ll integer; @@ -35,6 +34,4 @@ ALTER TABLE passwd ALTER lastlogin SET DEFAULT 0; ALTER TABLE passwd ALTER lastlogin SET NOT NULL; - UPDATE dbinfo SET keyvalue = '2004111700' WHERE keytype = 'dbversion'; "); -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2004112100.php b/lib/upgradedb/postgres.2004112100.php index 17077f394c..0e048c4134 100644 --- a/lib/upgradedb/postgres.2004112100.php +++ b/lib/upgradedb/postgres.2004112100.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" ALTER TABLE passwd ADD type SMALLINT; @@ -44,6 +43,4 @@ ALTER TABLE passwd ADD UNIQUE (login); - UPDATE dbinfo SET keyvalue = '2004112100' WHERE keytype = 'dbversion'; "); -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2004112400.php b/lib/upgradedb/postgres.2004112400.php index 8a901cdf67..fcf4e8e448 100644 --- a/lib/upgradedb/postgres.2004112400.php +++ b/lib/upgradedb/postgres.2004112400.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" ALTER TABLE passwd ADD home1 varchar(255); UPDATE passwd SET home1 = home; @@ -33,6 +32,4 @@ ALTER TABLE passwd ALTER home SET DEFAULT ''; ALTER TABLE passwd ALTER home SET NOT NULL; - UPDATE dbinfo SET keyvalue = '2004112400' WHERE keytype = 'dbversion'; "); -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2004112600.php b/lib/upgradedb/postgres.2004112600.php index 477cfba7da..eccabb9490 100644 --- a/lib/upgradedb/postgres.2004112600.php +++ b/lib/upgradedb/postgres.2004112600.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" CREATE SEQUENCE uiconfig_id_seq; CREATE TABLE uiconfig ( @@ -36,6 +35,4 @@ disabled smallint NOT NULL DEFAULT 0, PRIMARY KEY (id) ); - UPDATE dbinfo SET keyvalue = '2004112600' WHERE keytype = 'dbversion'; "); -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2004112700.php b/lib/upgradedb/postgres.2004112700.php index 17ea228f44..c6408f73c7 100644 --- a/lib/upgradedb/postgres.2004112700.php +++ b/lib/upgradedb/postgres.2004112700.php @@ -24,7 +24,4 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("ALTER TABLE uiconfig ADD UNIQUE (section, var)"); -$this->Execute("UPDATE dbinfo SET keyvalue='2004112700' WHERE keytype='dbversion'"); -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2004120300.php b/lib/upgradedb/postgres.2004120300.php index 05d29a16b6..e31b7eb45b 100644 --- a/lib/upgradedb/postgres.2004120300.php +++ b/lib/upgradedb/postgres.2004120300.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" CREATE SEQUENCE domains_id_seq; CREATE TABLE domains ( @@ -47,6 +46,3 @@ } } $this->Execute('ALTER TABLE passwd DROP domain'); - -$this->Execute("UPDATE dbinfo SET keyvalue = '2004120300' WHERE keytype = 'dbversion'"); -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2004120400.php b/lib/upgradedb/postgres.2004120400.php index dece685832..015771f372 100644 --- a/lib/upgradedb/postgres.2004120400.php +++ b/lib/upgradedb/postgres.2004120400.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" CREATE SEQUENCE aliases_id_seq; CREATE TABLE aliases ( @@ -35,6 +34,4 @@ UNIQUE (login) ); - UPDATE dbinfo SET keyvalue = '2004120400' WHERE keytype = 'dbversion' "); -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2004120600.php b/lib/upgradedb/postgres.2004120600.php index 480bdf60f4..e592b5b3e4 100644 --- a/lib/upgradedb/postgres.2004120600.php +++ b/lib/upgradedb/postgres.2004120600.php @@ -24,10 +24,7 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" ALTER TABLE aliases DROP CONSTRAINT aliases_login_key; ALTER TABLE aliases ADD UNIQUE (login, accountid); - UPDATE dbinfo SET keyvalue = '2004120600' WHERE keytype = 'dbversion' "); -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2004121000.php b/lib/upgradedb/postgres.2004121000.php index 6cd3a6b78c..054af9ba94 100644 --- a/lib/upgradedb/postgres.2004121000.php +++ b/lib/upgradedb/postgres.2004121000.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" ALTER TABLE uiconfig ADD section1 varchar(64); UPDATE uiconfig SET section1 = section; @@ -44,6 +43,4 @@ ALTER TABLE uiconfig ALTER var SET NOT NULL; ALTER TABLE uiconfig ALTER var SET DEFAULT ''; - UPDATE dbinfo SET keyvalue = '2004121000' WHERE keytype = 'dbversion' "); -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2005012600.php b/lib/upgradedb/postgres.2005012600.php index b62a9374ba..312935e126 100644 --- a/lib/upgradedb/postgres.2005012600.php +++ b/lib/upgradedb/postgres.2005012600.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" CREATE SEQUENCE \"events_id_seq\"; CREATE TABLE events ( @@ -50,7 +49,3 @@ "); $this->Execute("CREATE INDEX events_date_idx ON events(date)"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2005012600', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2005012700.php b/lib/upgradedb/postgres.2005012700.php index 824e669e3e..91872ab8b2 100644 --- a/lib/upgradedb/postgres.2005012700.php +++ b/lib/upgradedb/postgres.2005012700.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" ALTER TABLE users ADD zip1 VARCHAR(10); UPDATE users SET zip1=zip; @@ -34,6 +33,3 @@ ALTER TABLE users ALTER zip SET DEFAULT ''; ALTER TABLE users ALTER zip SET NOT NULL; "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2005012700', 'dbversion')); -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2005013000.php b/lib/upgradedb/postgres.2005013000.php index 28a13a78cf..0345806f65 100644 --- a/lib/upgradedb/postgres.2005013000.php +++ b/lib/upgradedb/postgres.2005013000.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" ALTER TABLE invoicecontents ADD itemid smallint; UPDATE invoicecontents set itemid = 0 where itemid is NULL; @@ -35,6 +34,4 @@ UPDATE cash set itemid=0 where itemid is NULL; ALTER TABLE cash ALTER itemid SET DEFAULT 0; ALTER TABLE cash ALTER itemid SET NOT NULL; - UPDATE dbinfo SET keyvalue = '2005013000' WHERE keytype = 'dbversion' "); -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2005020600.php b/lib/upgradedb/postgres.2005020600.php index 5dfe200799..797797a03b 100644 --- a/lib/upgradedb/postgres.2005020600.php +++ b/lib/upgradedb/postgres.2005020600.php @@ -24,9 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" CREATE INDEX cash_invoiceid_idx ON cash (invoiceid); - UPDATE dbinfo SET keyvalue = '2005020600' WHERE keytype = 'dbversion' "); -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2005021500.php b/lib/upgradedb/postgres.2005021500.php index 71269e801e..b6cc121594 100644 --- a/lib/upgradedb/postgres.2005021500.php +++ b/lib/upgradedb/postgres.2005021500.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" ALTER TABLE invoices ADD zip1 VARCHAR(10); UPDATE invoices SET zip1=zip; @@ -34,6 +33,3 @@ ALTER TABLE invoices ALTER zip SET DEFAULT ''; ALTER TABLE invoices ALTER zip SET NOT NULL; "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2005021500', 'dbversion')); -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2005022300.php b/lib/upgradedb/postgres.2005022300.php index d67e3a4543..4dd246a411 100644 --- a/lib/upgradedb/postgres.2005022300.php +++ b/lib/upgradedb/postgres.2005022300.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" CREATE SEQUENCE cashimport_id_seq; CREATE TABLE cashimport ( @@ -38,6 +37,3 @@ closed smallint DEFAULT 0 NOT NULL, PRIMARY KEY (id)) "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2005022300', 'dbversion')); -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2005022500.php b/lib/upgradedb/postgres.2005022500.php index 1f3279b780..a539d0d2b4 100644 --- a/lib/upgradedb/postgres.2005022500.php +++ b/lib/upgradedb/postgres.2005022500.php @@ -24,9 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" CREATE INDEX assignments_tariffid_idx ON assignments (tariffid); - UPDATE dbinfo SET keyvalue = '2005022500' WHERE keytype = 'dbversion' "); -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2005030100.php b/lib/upgradedb/postgres.2005030100.php index dc2ad7ef58..14e18359a0 100644 --- a/lib/upgradedb/postgres.2005030100.php +++ b/lib/upgradedb/postgres.2005030100.php @@ -28,4 +28,3 @@ ALTER TABLE users DROP zip1; ALTER TABLE invoices DROP zip1; "); -$this->Execute("UPDATE dbinfo SET keyvalue = '2005030100' WHERE keytype = 'dbversion'"); diff --git a/lib/upgradedb/postgres.2005030200.php b/lib/upgradedb/postgres.2005030200.php index df5426d53b..52e814c742 100644 --- a/lib/upgradedb/postgres.2005030200.php +++ b/lib/upgradedb/postgres.2005030200.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" CREATE INDEX nodes_netdev_idx ON nodes (netdev); CREATE INDEX rttickets_queueid_idx ON rttickets (queueid); @@ -32,6 +31,4 @@ CREATE INDEX cashimport_hash_idx ON cashimport (hash); CREATE INDEX invoices_cdate_idx ON invoices (cdate); CREATE INDEX invoicecontents_invoiceid_idx ON invoicecontents (invoiceid); - UPDATE dbinfo SET keyvalue = '2005030200' WHERE keytype = 'dbversion' "); -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2005030800.php b/lib/upgradedb/postgres.2005030800.php index 08b0d91822..8e23092eaf 100644 --- a/lib/upgradedb/postgres.2005030800.php +++ b/lib/upgradedb/postgres.2005030800.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" ALTER TABLE nodes ADD passwd varchar(32); @@ -32,6 +31,3 @@ ALTER TABLE nodes ALTER passwd SET NOT NULL; ALTER TABLE nodes ALTER passwd SET DEFAULT ''; "); -$this->Execute("UPDATE dbinfo SET keyvalue = '2005030800' WHERE keytype = 'dbversion'"); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2005031000.php b/lib/upgradedb/postgres.2005031000.php index fa964fa868..420ff3afa9 100644 --- a/lib/upgradedb/postgres.2005031000.php +++ b/lib/upgradedb/postgres.2005031000.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" CREATE TABLE sessions ( @@ -36,7 +35,3 @@ content text NOT NULL, PRIMARY KEY (id)) "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2005031000', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2005033000.php b/lib/upgradedb/postgres.2005033000.php index 08dbe81c42..4c74570985 100644 --- a/lib/upgradedb/postgres.2005033000.php +++ b/lib/upgradedb/postgres.2005033000.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" ALTER TABLE assignments ADD discount numeric(4,2); @@ -32,6 +31,3 @@ ALTER TABLE assignments ALTER discount SET NOT NULL; ALTER TABLE assignments ALTER discount SET DEFAULT 0; "); -$this->Execute("UPDATE dbinfo SET keyvalue = '2005033000' WHERE keytype = 'dbversion'"); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2005033103.php b/lib/upgradedb/postgres.2005033103.php index 78455e0d30..6e8aa99901 100644 --- a/lib/upgradedb/postgres.2005033103.php +++ b/lib/upgradedb/postgres.2005033103.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" ALTER TABLE passwd ADD quota_sh integer; @@ -94,7 +93,3 @@ PRIMARY KEY (id), UNIQUE(instanceid, var)) "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2005033103', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2005042100.php b/lib/upgradedb/postgres.2005042100.php index ec46cb6c0f..d4d338ef68 100644 --- a/lib/upgradedb/postgres.2005042100.php +++ b/lib/upgradedb/postgres.2005042100.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" ALTER TABLE admins ADD hosts varchar(255); @@ -32,7 +31,3 @@ ALTER TABLE admins ALTER hosts SET NOT NULL; ALTER TABLE admins ALTER hosts SET DEFAULT ''; "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2005042100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2005042400.php b/lib/upgradedb/postgres.2005042400.php index b5a1d95130..b18bd8044b 100644 --- a/lib/upgradedb/postgres.2005042400.php +++ b/lib/upgradedb/postgres.2005042400.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" ALTER TABLE nodes ADD ipaddr_pub bigint; @@ -32,7 +31,3 @@ ALTER TABLE nodes ALTER ipaddr_pub SET NOT NULL; ALTER TABLE nodes ALTER ipaddr_pub SET DEFAULT 0; "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2005042400', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2005052300.php b/lib/upgradedb/postgres.2005052300.php index 28350b4853..5b4a47aade 100644 --- a/lib/upgradedb/postgres.2005052300.php +++ b/lib/upgradedb/postgres.2005052300.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" ALTER TABLE assignments ADD customerid integer; @@ -67,7 +66,3 @@ ALTER TABLE userassignments ALTER customerid SET DEFAULT 0; ALTER TABLE userassignments ADD UNIQUE (usergroupid, customerid); "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2005052300', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2005052600.php b/lib/upgradedb/postgres.2005052600.php index fa14032640..a615015dbd 100644 --- a/lib/upgradedb/postgres.2005052600.php +++ b/lib/upgradedb/postgres.2005052600.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" @@ -55,7 +54,3 @@ DROP SEQUENCE users_id_seq; DROP TABLE users; "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2005052600', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2005052700.php b/lib/upgradedb/postgres.2005052700.php index 2434ccccd6..fb78174510 100644 --- a/lib/upgradedb/postgres.2005052700.php +++ b/lib/upgradedb/postgres.2005052700.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" ALTER TABLE cash ADD userid integer; @@ -69,7 +68,3 @@ ALTER TABLE users ADD UNIQUE (login); DROP TABLE admins; "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2005052700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2005052800.php b/lib/upgradedb/postgres.2005052800.php index 5447726684..dea6233177 100644 --- a/lib/upgradedb/postgres.2005052800.php +++ b/lib/upgradedb/postgres.2005052800.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" @@ -110,7 +109,3 @@ DROP TABLE a_t; "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2005052800', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2005060300.php b/lib/upgradedb/postgres.2005060300.php index 05992924d8..310b8b7cab 100644 --- a/lib/upgradedb/postgres.2005060300.php +++ b/lib/upgradedb/postgres.2005060300.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" DROP INDEX cash_invoiceid_idx; @@ -92,7 +91,3 @@ ); CREATE INDEX receiptcontents_docid_idx ON receiptcontents(docid); "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2005060300', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2005060400.php b/lib/upgradedb/postgres.2005060400.php index b68435c5bb..827e6fa07d 100644 --- a/lib/upgradedb/postgres.2005060400.php +++ b/lib/upgradedb/postgres.2005060400.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" ALTER TABLE cash ADD reference integer; @@ -33,7 +32,3 @@ ALTER TABLE cash ALTER reference SET DEFAULT 0; CREATE INDEX cash_reference_idx ON cash(reference); "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2005060400', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2005061200.php b/lib/upgradedb/postgres.2005061200.php index ccc0dc873f..336c27e609 100644 --- a/lib/upgradedb/postgres.2005061200.php +++ b/lib/upgradedb/postgres.2005061200.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" CREATE SEQUENCE taxes_id_seq; @@ -81,7 +80,3 @@ ALTER TABLE tariffs DROP taxvalue; ALTER TABLE invoicecontents DROP taxvalue; "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2005061200', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2005062100.php b/lib/upgradedb/postgres.2005062100.php index 62332c9eff..af2336dd1b 100644 --- a/lib/upgradedb/postgres.2005062100.php +++ b/lib/upgradedb/postgres.2005062100.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" ALTER TABLE tariffs ADD prodid VARCHAR(255); @@ -39,7 +38,3 @@ ALTER TABLE invoicecontents ALTER prodid SET DEFAULT ''; ALTER TABLE invoicecontents DROP pkwiu; "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2005062100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2005062600.php b/lib/upgradedb/postgres.2005062600.php index d87d6aaac4..d26811c8aa 100644 --- a/lib/upgradedb/postgres.2005062600.php +++ b/lib/upgradedb/postgres.2005062600.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" ALTER TABLE customers ADD im integer; @@ -33,7 +32,3 @@ ALTER TABLE customers ALTER im SET DEFAULT 0; ALTER TABLE customers DROP gguin; "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2005062600', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2005072000.php b/lib/upgradedb/postgres.2005072000.php index d6ef571d77..29ca3e32e5 100644 --- a/lib/upgradedb/postgres.2005072000.php +++ b/lib/upgradedb/postgres.2005072000.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" CREATE TABLE documentcontents ( @@ -39,7 +38,3 @@ UNIQUE (docid)) "); $this->Execute("CREATE INDEX documentcontents_md5sum_idx ON documentcontents (md5sum)"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2005072000', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2005072300.php b/lib/upgradedb/postgres.2005072300.php index 38bb3c88bb..2b06e1e8f5 100644 --- a/lib/upgradedb/postgres.2005072300.php +++ b/lib/upgradedb/postgres.2005072300.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" ALTER TABLE assignments ADD pperiod smallint; @@ -63,7 +62,3 @@ ALTER TABLE payments ALTER at SET NOT NULL; ALTER TABLE payments ALTER at SET DEFAULT 0; "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2005072300', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2005080300.php b/lib/upgradedb/postgres.2005080300.php index a1cbd5e3ed..80c95d83ea 100644 --- a/lib/upgradedb/postgres.2005080300.php +++ b/lib/upgradedb/postgres.2005080300.php @@ -41,7 +41,6 @@ array('receipts', 'monthly_numbering', 0) ); -$this->BeginTrans(); $this->Execute(" CREATE SEQUENCE numberplans_id_seq; @@ -73,7 +72,3 @@ CREATE INDEX documents_numberplanid_idx ON documents(numberplanid); "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2005080300', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2005082700.php b/lib/upgradedb/postgres.2005082700.php index d1c91c7e95..c27e1b5b53 100644 --- a/lib/upgradedb/postgres.2005082700.php +++ b/lib/upgradedb/postgres.2005082700.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" ALTER TABLE documents ADD closed smallint; @@ -34,7 +33,3 @@ ALTER TABLE cash DROP reference; "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2005082700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2005082900.php b/lib/upgradedb/postgres.2005082900.php index 959988a748..537869bb0e 100644 --- a/lib/upgradedb/postgres.2005082900.php +++ b/lib/upgradedb/postgres.2005082900.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" CREATE SEQUENCE hosts_id_seq; @@ -41,7 +40,3 @@ DROP TABLE daemonhosts; SELECT setval('hosts_id_seq', MAX(id)) FROM hosts; "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2005082900', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2005090700.php b/lib/upgradedb/postgres.2005090700.php index c06ed13eff..193abf9351 100644 --- a/lib/upgradedb/postgres.2005090700.php +++ b/lib/upgradedb/postgres.2005090700.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" ALTER TABLE documents ADD reference integer; @@ -32,7 +31,3 @@ ALTER TABLE documents ALTER reference SET NOT NULL; ALTER TABLE documents ALTER reference SET DEFAULT 0; "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2005090700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2005101700.php b/lib/upgradedb/postgres.2005101700.php index 5fb0240fd5..9eb642a328 100644 --- a/lib/upgradedb/postgres.2005101700.php +++ b/lib/upgradedb/postgres.2005101700.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); //$lastupgrade = $this->GetOne("SELECT keyvalue FROM dbinfo where keytype='dbversion'"); @@ -47,7 +46,3 @@ // "type" values after change: // 1 - payments e.g. cash payments // 0 - liabilities e.g. invoices - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2005101700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2005110600.php b/lib/upgradedb/postgres.2005110600.php index b87b275864..f62613212a 100644 --- a/lib/upgradedb/postgres.2005110600.php +++ b/lib/upgradedb/postgres.2005110600.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" @@ -52,7 +51,3 @@ PRIMARY KEY (id) ); "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2005110600', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2005122800.php b/lib/upgradedb/postgres.2005122800.php index e60a7ba9ed..001ee35f4b 100644 --- a/lib/upgradedb/postgres.2005122800.php +++ b/lib/upgradedb/postgres.2005122800.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $create_reg = $this->GetOne('SELECT docid FROM receiptcontents LIMIT 1'); @@ -62,7 +61,3 @@ if ($create_reg) { $this->Execute("INSERT INTO cashregs (name) VALUES ('default')"); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2005122800', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2005123000.php b/lib/upgradedb/postgres.2005123000.php index e10ce2a156..63b980059d 100644 --- a/lib/upgradedb/postgres.2005123000.php +++ b/lib/upgradedb/postgres.2005123000.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" ALTER TABLE cashregs ADD COLUMN disabled smallint; @@ -32,7 +31,3 @@ ALTER TABLE cashregs ALTER disabled SET NOT NULL; ALTER TABLE cashregs ALTER disabled SET DEFAULT 0; "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2005123000', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2006011200.php b/lib/upgradedb/postgres.2006011200.php index e7240006f7..fac42949d9 100644 --- a/lib/upgradedb/postgres.2006011200.php +++ b/lib/upgradedb/postgres.2006011200.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" ALTER TABLE documents ADD COLUMN extnumber varchar(255); @@ -32,7 +31,3 @@ ALTER TABLE documents ALTER extnumber SET NOT NULL; ALTER TABLE documents ALTER extnumber SET DEFAULT ''; "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2006011200', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2006011300.php b/lib/upgradedb/postgres.2006011300.php index 70c7d6c32f..4555768bb5 100644 --- a/lib/upgradedb/postgres.2006011300.php +++ b/lib/upgradedb/postgres.2006011300.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" ALTER TABLE assignments ADD COLUMN settlement smallint; @@ -32,7 +31,3 @@ ALTER TABLE assignments ALTER settlement SET NOT NULL; ALTER TABLE assignments ALTER settlement SET DEFAULT 0; "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2006011300', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2006020500.php b/lib/upgradedb/postgres.2006020500.php index d053436e6c..066c1c0d0d 100644 --- a/lib/upgradedb/postgres.2006020500.php +++ b/lib/upgradedb/postgres.2006020500.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" ALTER TABLE invoicecontents ADD COLUMN discount numeric(4,2); @@ -32,7 +31,3 @@ ALTER TABLE invoicecontents ALTER discount SET NOT NULL; ALTER TABLE invoicecontents ALTER discount SET DEFAULT 0; "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2006020500', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2006061200.php b/lib/upgradedb/postgres.2006061200.php index 0214f20e9a..17a6a13865 100644 --- a/lib/upgradedb/postgres.2006061200.php +++ b/lib/upgradedb/postgres.2006061200.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("ALTER TABLE passwd ADD COLUMN quota_sql integer"); $this->Execute("UPDATE passwd SET quota_sql = 0"); @@ -38,7 +37,3 @@ $this->Execute("CREATE INDEX passwd_ownerid_idx ON passwd (ownerid)"); $this->Execute("CREATE INDEX domains_ownerid_idx ON domains (ownerid)"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2006061200', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2006081000.php b/lib/upgradedb/postgres.2006081000.php index 0eab6f33da..0c8922db61 100644 --- a/lib/upgradedb/postgres.2006081000.php +++ b/lib/upgradedb/postgres.2006081000.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); // REGON (Business Registration Number) $this->Execute("ALTER TABLE customers ADD COLUMN regon varchar(255)"); @@ -51,7 +50,3 @@ // Account names (logins) will be unique only in one domain context $this->Execute("ALTER TABLE passwd DROP CONSTRAINT passwd_login_key"); $this->Execute("ALTER TABLE passwd ADD UNIQUE (login, domainid)"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2006081000', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2006082300.php b/lib/upgradedb/postgres.2006082300.php index f6d0228dd8..f7ea71627e 100644 --- a/lib/upgradedb/postgres.2006082300.php +++ b/lib/upgradedb/postgres.2006082300.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("ALTER TABLE assignments ADD COLUMN nodeid integer"); $this->Execute("UPDATE assignments SET nodeid = 0"); @@ -33,7 +32,3 @@ $this->Execute("CREATE INDEX assignments_nodeid_idx ON assignments (nodeid)"); $this->Execute("CREATE INDEX assignments_customerid_idx ON assignments (customerid)"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2006082300', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2006082700.php b/lib/upgradedb/postgres.2006082700.php index 8106ef6bc7..03e9b2e315 100644 --- a/lib/upgradedb/postgres.2006082700.php +++ b/lib/upgradedb/postgres.2006082700.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); /* tariffs with nodes many-to-many assignments */ @@ -47,7 +46,3 @@ } $this->Execute("ALTER TABLE assignments DROP COLUMN nodeid"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2006082700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2006092400.php b/lib/upgradedb/postgres.2006092400.php index b6d6b3ad23..7129d023c7 100644 --- a/lib/upgradedb/postgres.2006092400.php +++ b/lib/upgradedb/postgres.2006092400.php @@ -24,13 +24,8 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("ALTER TABLE customers ADD COLUMN notes text"); $this->Execute("UPDATE customers SET notes = ''"); $this->Execute("ALTER TABLE customers ALTER COLUMN notes SET NOT NULL"); $this->Execute("ALTER TABLE customers ALTER COLUMN notes SET DEFAULT ''"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2006092400', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2006100700.php b/lib/upgradedb/postgres.2006100700.php index 26623ccd46..e330527b3f 100644 --- a/lib/upgradedb/postgres.2006100700.php +++ b/lib/upgradedb/postgres.2006100700.php @@ -24,13 +24,8 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("ALTER TABLE nodes ADD COLUMN chkmac smallint"); $this->Execute("UPDATE nodes SET chkmac = 1"); $this->Execute("ALTER TABLE nodes ALTER COLUMN chkmac SET NOT NULL"); $this->Execute("ALTER TABLE nodes ALTER COLUMN chkmac SET DEFAULT 1"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2006100700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2006110700.php b/lib/upgradedb/postgres.2006110700.php index 29fd913657..7c5d1c194f 100644 --- a/lib/upgradedb/postgres.2006110700.php +++ b/lib/upgradedb/postgres.2006110700.php @@ -24,13 +24,8 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("ALTER TABLE rttickets ADD COLUMN cause smallint"); $this->Execute("UPDATE rttickets SET cause = 0"); $this->Execute("ALTER TABLE rttickets ALTER COLUMN cause SET NOT NULL"); $this->Execute("ALTER TABLE rttickets ALTER COLUMN cause SET DEFAULT 0"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2006110700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2006111100.php b/lib/upgradedb/postgres.2006111100.php index 9fc7007bd3..f2a02f8bb9 100644 --- a/lib/upgradedb/postgres.2006111100.php +++ b/lib/upgradedb/postgres.2006111100.php @@ -24,13 +24,8 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" CREATE INDEX rttickets_customerid_idx ON rttickets (customerid); CREATE INDEX rttickets_createtime_idx ON rttickets (createtime); "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2006111100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2007011200.php b/lib/upgradedb/postgres.2007011200.php index b067f7db67..bf7cbec5b2 100644 --- a/lib/upgradedb/postgres.2007011200.php +++ b/lib/upgradedb/postgres.2007011200.php @@ -24,11 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("CREATE INDEX nodes_ownerid_idx ON nodes (ownerid)"); $this->Execute("CREATE INDEX nodes_ipaddr_pub_idx ON nodes (ipaddr_pub)"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2007011200', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2007012500.php b/lib/upgradedb/postgres.2007012500.php index db0f3fb6d7..fd2e8a6985 100644 --- a/lib/upgradedb/postgres.2007012500.php +++ b/lib/upgradedb/postgres.2007012500.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("ALTER TABLE nodes ADD halfduplex smallint"); $this->Execute("ALTER TABLE tariffs ADD dlimit integer"); @@ -36,7 +35,3 @@ $this->Execute("ALTER TABLE nodes ALTER halfduplex SET DEFAULT 0"); $this->Execute("ALTER TABLE tariffs ALTER dlimit SET NOT NULL"); $this->Execute("ALTER TABLE tariffs ALTER dlimit SET DEFAULT 0"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2007012500', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2007021500.php b/lib/upgradedb/postgres.2007021500.php index 2bd11c74df..2dd7fecbf8 100644 --- a/lib/upgradedb/postgres.2007021500.php +++ b/lib/upgradedb/postgres.2007021500.php @@ -24,13 +24,8 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("UPDATE documents SET closed = 1 WHERE type = 2"); $this->Execute("UPDATE cashrights SET rights = 63 WHERE rights = 2"); $this->Execute("UPDATE cashrights SET rights = 319 WHERE rights = 3"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2007021500', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2007022100.php b/lib/upgradedb/postgres.2007022100.php index 4583acc5cb..8d9da84315 100644 --- a/lib/upgradedb/postgres.2007022100.php +++ b/lib/upgradedb/postgres.2007022100.php @@ -24,11 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("UPDATE rtrights SET rights = 7 WHERE rights = 2"); $this->Execute("UPDATE rtrights SET rights = 15 WHERE rights = 3"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2007022100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2007022200.php b/lib/upgradedb/postgres.2007022200.php index b53bf24c94..b81f597108 100644 --- a/lib/upgradedb/postgres.2007022200.php +++ b/lib/upgradedb/postgres.2007022200.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" CREATE INDEX rtmessages_ticketid_idx ON rtmessages (ticketid); @@ -41,7 +40,3 @@ CREATE INDEX rtnotes_ticketid_idx ON rtnotes (ticketid); "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2007022200', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2007022600.php b/lib/upgradedb/postgres.2007022600.php index 3dc59b9fbe..6c0cafaff4 100644 --- a/lib/upgradedb/postgres.2007022600.php +++ b/lib/upgradedb/postgres.2007022600.php @@ -24,10 +24,5 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("CREATE INDEX documents_customerid_idx ON documents (customerid)"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2007022600', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2007030800.php b/lib/upgradedb/postgres.2007030800.php index ef55e2134d..26b38654e6 100644 --- a/lib/upgradedb/postgres.2007030800.php +++ b/lib/upgradedb/postgres.2007030800.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" @@ -66,7 +65,3 @@ UNIQUE (customerid) ); "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2007030800', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2007032600.php b/lib/upgradedb/postgres.2007032600.php index efd5ac3959..2f3dcc2c06 100644 --- a/lib/upgradedb/postgres.2007032600.php +++ b/lib/upgradedb/postgres.2007032600.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" @@ -40,7 +39,3 @@ UNIQUE (regid, time) ); "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2007032600', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2007033100.php b/lib/upgradedb/postgres.2007033100.php index 6292d7bb5c..ca3cca3550 100644 --- a/lib/upgradedb/postgres.2007033100.php +++ b/lib/upgradedb/postgres.2007033100.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" CREATE SEQUENCE imessengers_id_seq; @@ -43,7 +42,3 @@ $this->Execute("CREATE INDEX imessengers_customerid_idx ON imessengers (customerid)"); $this->Execute("ALTER TABLE customers DROP COLUMN im"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2007033100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2007041200.php b/lib/upgradedb/postgres.2007041200.php index 2c3c25fcb4..0f6486eb69 100644 --- a/lib/upgradedb/postgres.2007041200.php +++ b/lib/upgradedb/postgres.2007041200.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("ALTER TABLE cashreglog ADD snapshot numeric(9,2)"); @@ -48,7 +47,3 @@ $this->Execute("ALTER TABLE cashreglog ALTER snapshot SET NOT NULL"); $this->Execute("ALTER TABLE cashreglog ALTER snapshot SET DEFAULT 0"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2007041200', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2007053100.php b/lib/upgradedb/postgres.2007053100.php index bbc2bbd36b..78b0e6f029 100644 --- a/lib/upgradedb/postgres.2007053100.php +++ b/lib/upgradedb/postgres.2007053100.php @@ -24,13 +24,8 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("ALTER TABLE documents ADD COLUMN reason varchar(255)"); $this->Execute("UPDATE documents SET reason = ''"); $this->Execute("ALTER TABLE documents ALTER COLUMN reason SET NOT NULL"); $this->Execute("ALTER TABLE documents ALTER COLUMN reason SET DEFAULT ''"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2007053100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2007062100.php b/lib/upgradedb/postgres.2007062100.php index 653c773f47..5451cea69d 100644 --- a/lib/upgradedb/postgres.2007062100.php +++ b/lib/upgradedb/postgres.2007062100.php @@ -24,10 +24,5 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("DROP TABLE timestamps"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2007062100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2007062200.php b/lib/upgradedb/postgres.2007062200.php index 5871669dbf..4fad5806ae 100644 --- a/lib/upgradedb/postgres.2007062200.php +++ b/lib/upgradedb/postgres.2007062200.php @@ -24,12 +24,7 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("SELECT setval('events_id_seq', MAX(id)) FROM events"); $this->Execute("ALTER TABLE events ALTER id DROP DEFAULT"); $this->Execute("ALTER TABLE events ALTER id SET DEFAULT nextval('events_id_seq')"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2007062200', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2007070400.php b/lib/upgradedb/postgres.2007070400.php index 9c21e8f736..654963bf8c 100644 --- a/lib/upgradedb/postgres.2007070400.php +++ b/lib/upgradedb/postgres.2007070400.php @@ -24,11 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("CREATE INDEX documentcontents_todate_idx ON documentcontents (todate)"); $this->Execute("CREATE INDEX documentcontents_fromdate_idx ON documentcontents (fromdate)"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2007070400', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2007071100.php b/lib/upgradedb/postgres.2007071100.php index 0f4b933f56..6433de83a1 100644 --- a/lib/upgradedb/postgres.2007071100.php +++ b/lib/upgradedb/postgres.2007071100.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" CREATE SEQUENCE \"customercontacts_id_seq\"; @@ -62,7 +61,3 @@ ALTER TABLE customers DROP phone2; ALTER TABLE customers DROP phone3; "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2007071100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2007071600.php b/lib/upgradedb/postgres.2007071600.php index e6d621b7f5..0ccfb8bd26 100644 --- a/lib/upgradedb/postgres.2007071600.php +++ b/lib/upgradedb/postgres.2007071600.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" CREATE SEQUENCE excludedgroups_id_seq; @@ -36,7 +35,3 @@ CONSTRAINT excludedgroups_userid_key UNIQUE (userid, customergroupid) ); "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2007071600', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2007080100.php b/lib/upgradedb/postgres.2007080100.php index 31909b7357..a4c4e706c3 100644 --- a/lib/upgradedb/postgres.2007080100.php +++ b/lib/upgradedb/postgres.2007080100.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" CREATE OR REPLACE FUNCTION lms_current_user() RETURNS integer AS ' @@ -43,7 +42,3 @@ JOIN excludedgroups e ON (a.customergroupid = e.customergroupid) WHERE e.userid = lms_current_user() AND a.customerid = c.id); "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2007080100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2007101000.php b/lib/upgradedb/postgres.2007101000.php index 604cc45c45..1819093091 100644 --- a/lib/upgradedb/postgres.2007101000.php +++ b/lib/upgradedb/postgres.2007101000.php @@ -24,10 +24,5 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("ALTER TABLE nodes ALTER name TYPE varchar(32)"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2007101000', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2007101700.php b/lib/upgradedb/postgres.2007101700.php index 34ae4aa5d3..335fefd57f 100644 --- a/lib/upgradedb/postgres.2007101700.php +++ b/lib/upgradedb/postgres.2007101700.php @@ -24,10 +24,5 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("ALTER TABLE users ADD position varchar(255) NOT NULL DEFAULT ''"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2007101700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2007102600.php b/lib/upgradedb/postgres.2007102600.php index f72cdf06d9..7b03d3f9aa 100644 --- a/lib/upgradedb/postgres.2007102600.php +++ b/lib/upgradedb/postgres.2007102600.php @@ -24,13 +24,8 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" ALTER TABLE netdevices ADD purchasetime integer NOT NULL DEFAULT 0; ALTER TABLE netdevices ADD guaranteeperiod smallint DEFAULT 0; "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2007102600', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2007110600.php b/lib/upgradedb/postgres.2007110600.php index 1f6d4e5973..4444ed898c 100644 --- a/lib/upgradedb/postgres.2007110600.php +++ b/lib/upgradedb/postgres.2007110600.php @@ -24,13 +24,8 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" ALTER TABLE rttickets ADD creatorid integer NOT NULL DEFAULT 0; CREATE INDEX rttickets_creatorid_idx ON rttickets (creatorid); "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2007110600', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2007111400.php b/lib/upgradedb/postgres.2007111400.php index ed8b2a4eb3..0b5c592a3d 100644 --- a/lib/upgradedb/postgres.2007111400.php +++ b/lib/upgradedb/postgres.2007111400.php @@ -24,14 +24,9 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" ALTER TABLE tariffs ADD type smallint NOT NULL DEFAULT 1; UPDATE tariffs SET type = 1; CREATE INDEX tariffs_type_idx ON tariffs (type); "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2007111400', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2007120300.php b/lib/upgradedb/postgres.2007120300.php index 72363dec68..0632bc95b2 100644 --- a/lib/upgradedb/postgres.2007120300.php +++ b/lib/upgradedb/postgres.2007120300.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" @@ -39,7 +38,3 @@ WHERE e.userid = lms_current_user() AND a.customerid = c.id); "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2007120300', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2008010400.php b/lib/upgradedb/postgres.2008010400.php index 8aad7ba1a1..b17b1bebaa 100644 --- a/lib/upgradedb/postgres.2008010400.php +++ b/lib/upgradedb/postgres.2008010400.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" CREATE SEQUENCE nodegroups_id_seq; @@ -45,7 +44,3 @@ CONSTRAINT nodegroupassignments_nodeid_key UNIQUE (nodeid, nodegroupid) ); "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2008010400', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2008010700.php b/lib/upgradedb/postgres.2008010700.php index f2781f7f5c..c2d910aa1b 100644 --- a/lib/upgradedb/postgres.2008010700.php +++ b/lib/upgradedb/postgres.2008010700.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("ALTER TABLE nodegroups ADD prio integer NOT NULL DEFAULT 0"); @@ -40,7 +39,3 @@ $prio++; } } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2008010700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2008011800.php b/lib/upgradedb/postgres.2008011800.php index df4f385515..960203e431 100644 --- a/lib/upgradedb/postgres.2008011800.php +++ b/lib/upgradedb/postgres.2008011800.php @@ -24,14 +24,9 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" ALTER TABLE nodes ADD port smallint NOT NULL DEFAULT 0; ALTER TABLE netlinks ADD srcport smallint NOT NULL DEFAULT 0; ALTER TABLE netlinks ADD dstport smallint NOT NULL DEFAULT 0; "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2008011800', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2008012200.php b/lib/upgradedb/postgres.2008012200.php index b7f9113a5b..41e2ccd42b 100644 --- a/lib/upgradedb/postgres.2008012200.php +++ b/lib/upgradedb/postgres.2008012200.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" CREATE OR REPLACE FUNCTION mask2prefix(bigint) RETURNS smallint AS $$ @@ -57,7 +56,3 @@ split_part($1,'.',4)::int8; $$ LANGUAGE SQL IMMUTABLE; "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2008012200', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2008020900.php b/lib/upgradedb/postgres.2008020900.php index 30d3cd90e4..21ca0521f4 100644 --- a/lib/upgradedb/postgres.2008020900.php +++ b/lib/upgradedb/postgres.2008020900.php @@ -24,14 +24,9 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" CREATE OR REPLACE FUNCTION int2txt(bigint) RETURNS text AS $$ SELECT $1::text; $$ LANGUAGE SQL IMMUTABLE; "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2008020900', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2008021500.php b/lib/upgradedb/postgres.2008021500.php index 1834471ae5..7b3bcbfe44 100644 --- a/lib/upgradedb/postgres.2008021500.php +++ b/lib/upgradedb/postgres.2008021500.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" CREATE SEQUENCE aliasassignments_id_seq; @@ -46,7 +45,3 @@ ALTER TABLE aliases DROP accountid; ALTER TABLE aliases ADD CONSTRAINT aliases_login_key UNIQUE (login, domainid); "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2008021500', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2008021900.php b/lib/upgradedb/postgres.2008021900.php index 7895d90ee3..9e58f1a7f2 100644 --- a/lib/upgradedb/postgres.2008021900.php +++ b/lib/upgradedb/postgres.2008021900.php @@ -24,10 +24,5 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("ALTER TABLE passwd ADD mail_forward varchar(255) NOT NULL DEFAULT ''"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2008021900', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2008022000.php b/lib/upgradedb/postgres.2008022000.php index 186395e52b..3df9ca3f1a 100644 --- a/lib/upgradedb/postgres.2008022000.php +++ b/lib/upgradedb/postgres.2008022000.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" ALTER TABLE tariffs ADD sh_limit integer DEFAULT NULL; @@ -48,7 +47,3 @@ ftp_limit=0, mail_limit=0, sql_limit=0, quota_sh_limit=0, quota_www_limit=0, quota_ftp_limit=0, quota_mail_limit=0, quota_sql_limit=0; "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2008022000', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2008032100.php b/lib/upgradedb/postgres.2008032100.php index 51d96688b2..596c3b6725 100644 --- a/lib/upgradedb/postgres.2008032100.php +++ b/lib/upgradedb/postgres.2008032100.php @@ -24,10 +24,5 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("CREATE INDEX documents_closed_idx ON documents(closed)"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2008032100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2008032700.php b/lib/upgradedb/postgres.2008032700.php index 5571203d8f..4245a1ba98 100644 --- a/lib/upgradedb/postgres.2008032700.php +++ b/lib/upgradedb/postgres.2008032700.php @@ -24,10 +24,5 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("ALTER TABLE passwd ADD mail_bcc varchar(255) NOT NULL DEFAULT ''"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2008032700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2008042400.php b/lib/upgradedb/postgres.2008042400.php index 13f5294359..50de0b58db 100644 --- a/lib/upgradedb/postgres.2008042400.php +++ b/lib/upgradedb/postgres.2008042400.php @@ -24,10 +24,5 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("ALTER TABLE networks ADD COLUMN disabled smallint NOT NULL DEFAULT 0"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2008042400', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2008052300.php b/lib/upgradedb/postgres.2008052300.php index 8cf9425995..2bbe5200e9 100644 --- a/lib/upgradedb/postgres.2008052300.php +++ b/lib/upgradedb/postgres.2008052300.php @@ -24,10 +24,5 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("ALTER TABLE networks ALTER COLUMN interface TYPE varchar(16)"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2008052300', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2008061300.php b/lib/upgradedb/postgres.2008061300.php index dd7b7a8d73..b215fde5da 100644 --- a/lib/upgradedb/postgres.2008061300.php +++ b/lib/upgradedb/postgres.2008061300.php @@ -27,7 +27,6 @@ $tables = $this->ListTables(); $versions = $this->GetAllByKey("SELECT keytype, keyvalue FROM dbinfo WHERE keytype ?LIKE? 'up_%'", 'keytype'); -$this->BeginTrans(); if (!in_array('up_rights', $tables)) { $this->Execute(" @@ -154,6 +153,3 @@ } $this->Execute("DELETE FROM dbinfo WHERE keytype ?LIKE? 'up_%'"); -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2008061300', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2008062400.php b/lib/upgradedb/postgres.2008062400.php index 6585a2f1ba..f5a1ba7a2f 100644 --- a/lib/upgradedb/postgres.2008062400.php +++ b/lib/upgradedb/postgres.2008062400.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" ALTER TABLE customers ADD COLUMN consentdate integer NOT NULL DEFAULT 0; @@ -38,7 +37,3 @@ WHERE e.userid = lms_current_user() AND a.customerid = c.id); "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2008062400', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2008070100.php b/lib/upgradedb/postgres.2008070100.php index a70a7e1ed4..085a7e0689 100644 --- a/lib/upgradedb/postgres.2008070100.php +++ b/lib/upgradedb/postgres.2008070100.php @@ -24,10 +24,5 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("INSERT INTO uiconfig (section, var) VALUES ('userpanel', 'data_consent_text')"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2008070100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2008071700.php b/lib/upgradedb/postgres.2008071700.php index 6dc0ab1737..7e4a198f9f 100644 --- a/lib/upgradedb/postgres.2008071700.php +++ b/lib/upgradedb/postgres.2008071700.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" @@ -44,7 +43,3 @@ JOIN excludedgroups e ON (a.customergroupid = e.customergroupid) WHERE e.userid = lms_current_user() AND a.customerid = c.id); "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2008071700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2008080800.php b/lib/upgradedb/postgres.2008080800.php index 80139022d6..4006da9688 100644 --- a/lib/upgradedb/postgres.2008080800.php +++ b/lib/upgradedb/postgres.2008080800.php @@ -26,7 +26,6 @@ $lang = $this->GetOne("SELECT value FROM uiconfig WHERE section = ? AND var = ? AND disabled = ?", array('phpui', 'lang', 0)); -$this->BeginTrans(); $this->Execute(" CREATE SEQUENCE states_id_seq; @@ -74,7 +73,3 @@ INSERT INTO states (name) VALUES ('zachodniopomorskie'); "); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2008080800', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2008102000.php b/lib/upgradedb/postgres.2008102000.php index 9e918d0a60..67d882d0ac 100644 --- a/lib/upgradedb/postgres.2008102000.php +++ b/lib/upgradedb/postgres.2008102000.php @@ -65,7 +65,6 @@ array('finances', 'account', 0) ); -$this->BeginTrans(); $this->Execute(" @@ -120,7 +119,3 @@ !empty($account) ? $account : '', ) ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2008102000', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2008102700.php b/lib/upgradedb/postgres.2008102700.php index 3b11e8e4f1..d9909f9f84 100644 --- a/lib/upgradedb/postgres.2008102700.php +++ b/lib/upgradedb/postgres.2008102700.php @@ -24,14 +24,9 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" ALTER TABLE divisions ADD COLUMN ten varchar(16) NOT NULL DEFAULT '', ADD COLUMN regon varchar(255) NOT NULL DEFAULT ''; "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2008102700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2008110100.php b/lib/upgradedb/postgres.2008110100.php index 407ae52092..2c06c04e2a 100644 --- a/lib/upgradedb/postgres.2008110100.php +++ b/lib/upgradedb/postgres.2008110100.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" ALTER TABLE customers @@ -39,7 +38,3 @@ JOIN excludedgroups e ON (a.customergroupid = e.customergroupid) WHERE e.userid = lms_current_user() AND a.customerid = c.id); "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2008110100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2008111900.php b/lib/upgradedb/postgres.2008111900.php index 8ecbe30be8..1015205210 100644 --- a/lib/upgradedb/postgres.2008111900.php +++ b/lib/upgradedb/postgres.2008111900.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" CREATE SEQUENCE voipaccounts_id_seq; @@ -41,7 +40,3 @@ PRIMARY KEY (id) ); "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2008111900', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2008112400.php b/lib/upgradedb/postgres.2008112400.php index 2ffc97a519..d5a3b7a81b 100644 --- a/lib/upgradedb/postgres.2008112400.php +++ b/lib/upgradedb/postgres.2008112400.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" CREATE SEQUENCE countries_id_seq; @@ -54,7 +53,3 @@ INSERT INTO countries (name) VALUES ('USA'); "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2008112400', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2008122900.php b/lib/upgradedb/postgres.2008122900.php index c08d651571..c584594bea 100644 --- a/lib/upgradedb/postgres.2008122900.php +++ b/lib/upgradedb/postgres.2008122900.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" CREATE SEQUENCE numberplanassignments_id_seq; @@ -44,7 +43,3 @@ SELECT id, ? FROM numberplans', array($div['id'])); } } - -$this->Execute('UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?', array('2008122900', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2009021600.php b/lib/upgradedb/postgres.2009021600.php index ce01dc21d9..20492411de 100644 --- a/lib/upgradedb/postgres.2009021600.php +++ b/lib/upgradedb/postgres.2009021600.php @@ -24,10 +24,5 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("ALTER TABLE ewx_pt_config ALTER COLUMN name TYPE varchar(32)"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2009021600', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2009031300.php b/lib/upgradedb/postgres.2009031300.php index 4cce7dc69e..041d162fa7 100644 --- a/lib/upgradedb/postgres.2009031300.php +++ b/lib/upgradedb/postgres.2009031300.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" @@ -59,7 +58,3 @@ CREATE INDEX messageitems_customerid_idx ON messageitems (customerid); "); - -$this->Execute('UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?', array('2009031300', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2009031700.php b/lib/upgradedb/postgres.2009031700.php index 0bb0b68bd3..cd0e1dbe7a 100644 --- a/lib/upgradedb/postgres.2009031700.php +++ b/lib/upgradedb/postgres.2009031700.php @@ -24,12 +24,7 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("UPDATE uiconfig SET section = 'mail' WHERE section = 'phpui' AND var IN ('debug_email', 'smtp_port', 'smtp_host', 'smtp_username', 'smtp_password', 'smtp_auth_type') "); - -$this->Execute('UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?', array('2009031700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2009040200.php b/lib/upgradedb/postgres.2009040200.php index 6234bfd9f7..a4bb9c8817 100644 --- a/lib/upgradedb/postgres.2009040200.php +++ b/lib/upgradedb/postgres.2009040200.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" CREATE SEQUENCE nastypes_id_seq; @@ -64,7 +63,3 @@ INSERT INTO nastypes (name) VALUES ('other'); "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2009040200', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2009051200.php b/lib/upgradedb/postgres.2009051200.php index 834f8046f3..f460517090 100644 --- a/lib/upgradedb/postgres.2009051200.php +++ b/lib/upgradedb/postgres.2009051200.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" @@ -54,7 +53,3 @@ 8 - edit 16 - delete */ - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2009051200', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2009060200.php b/lib/upgradedb/postgres.2009060200.php index b8b50ee061..44ade1f142 100644 --- a/lib/upgradedb/postgres.2009060200.php +++ b/lib/upgradedb/postgres.2009060200.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" @@ -53,7 +52,3 @@ CREATE INDEX cash_sourceid_idx ON cash (sourceid); "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2009060200', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2009062300.php b/lib/upgradedb/postgres.2009062300.php index 1eb2136f0c..431b642d07 100644 --- a/lib/upgradedb/postgres.2009062300.php +++ b/lib/upgradedb/postgres.2009062300.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" @@ -40,7 +39,3 @@ ); "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2009062300', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2009082500.php b/lib/upgradedb/postgres.2009082500.php index 15d09948a2..c48b7148a0 100644 --- a/lib/upgradedb/postgres.2009082500.php +++ b/lib/upgradedb/postgres.2009082500.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" @@ -42,7 +41,3 @@ WHERE e.userid = lms_current_user() AND a.customerid = c.id); "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2009082500', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2009090900.php b/lib/upgradedb/postgres.2009090900.php index 46597f2d17..6e35dc3c0f 100644 --- a/lib/upgradedb/postgres.2009090900.php +++ b/lib/upgradedb/postgres.2009090900.php @@ -24,10 +24,5 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("ALTER TABLE networks ADD notes text DEFAULT '' NOT NULL;"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2009090900', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2009091000.php b/lib/upgradedb/postgres.2009091000.php index 03267bf2dd..958698e82e 100644 --- a/lib/upgradedb/postgres.2009091000.php +++ b/lib/upgradedb/postgres.2009091000.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" DROP VIEW nas; @@ -38,7 +37,3 @@ JOIN netdevices d ON (n.netdev = d.id) WHERE n.nas = 1; "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2009091000', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2009091001.php b/lib/upgradedb/postgres.2009091001.php index 200ed520ee..9902812193 100644 --- a/lib/upgradedb/postgres.2009091001.php +++ b/lib/upgradedb/postgres.2009091001.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" ALTER TABLE customers ADD paytype varchar(255) DEFAULT NULL; @@ -36,7 +35,3 @@ JOIN excludedgroups e ON (a.customergroupid = e.customergroupid) WHERE e.userid = lms_current_user() AND a.customerid = c.id); "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2009091001', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2009091600.php b/lib/upgradedb/postgres.2009091600.php index 78d14f0ee4..ef229f9972 100644 --- a/lib/upgradedb/postgres.2009091600.php +++ b/lib/upgradedb/postgres.2009091600.php @@ -24,14 +24,9 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" ALTER TABLE aliasassignments ADD mail_forward Varchar(255) DEFAULT '' NOT NULL; ALTER TABLE aliasassignments DROP CONSTRAINT aliasassignments_aliasid_key; ALTER TABLE aliasassignments ADD CONSTRAINT aliasassignments_aliasid_key UNIQUE (aliasid, accountid, mail_forward); "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2009091600', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2009101600.php b/lib/upgradedb/postgres.2009101600.php index 67fc27fbc7..f560244685 100644 --- a/lib/upgradedb/postgres.2009101600.php +++ b/lib/upgradedb/postgres.2009101600.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" @@ -36,7 +35,3 @@ ALTER TABLE tariffs ADD plimit_n integer DEFAULT NULL; "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2009101600', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2009103000.php b/lib/upgradedb/postgres.2009103000.php index 5a833f7a73..fb1bc83ef9 100644 --- a/lib/upgradedb/postgres.2009103000.php +++ b/lib/upgradedb/postgres.2009103000.php @@ -22,7 +22,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE domains ADD master varchar(128) DEFAULT NULL"); $this->Execute("ALTER TABLE domains ADD last_check integer DEFAULT NULL"); @@ -59,7 +58,3 @@ PRIMARY KEY (id) ) "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2009103000', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2009111001.php b/lib/upgradedb/postgres.2009111001.php index 90df0b9055..34669fbedf 100644 --- a/lib/upgradedb/postgres.2009111001.php +++ b/lib/upgradedb/postgres.2009111001.php @@ -21,5 +21,3 @@ * USA. * */ - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2009111001', 'dbversion')); diff --git a/lib/upgradedb/postgres.2009111700.php b/lib/upgradedb/postgres.2009111700.php index a96e9fcbbc..68f62c6998 100644 --- a/lib/upgradedb/postgres.2009111700.php +++ b/lib/upgradedb/postgres.2009111700.php @@ -22,7 +22,6 @@ * */ -$this->BeginTrans(); $this->Execute(" ALTER TABLE divisions ADD inv_paytime smallint DEFAULT NULL; @@ -31,7 +30,3 @@ ALTER TABLE receiptcontents ALTER description TYPE text; ALTER TABLE cash ALTER comment TYPE text; "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2009111700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2010011300.php b/lib/upgradedb/postgres.2010011300.php index 0f71237ac9..e1f5c93c49 100644 --- a/lib/upgradedb/postgres.2010011300.php +++ b/lib/upgradedb/postgres.2010011300.php @@ -22,7 +22,6 @@ * */ -$this->BeginTrans(); $this->Execute(" DELETE FROM nodeassignments WHERE assignmentid NOT IN (SELECT id FROM assignments); @@ -38,7 +37,3 @@ CREATE INDEX nodeassignments_assignmentid_idx ON nodeassignments (assignmentid); "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2010011300', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2010020700.php b/lib/upgradedb/postgres.2010020700.php index 457b2d9f8e..84da8374ad 100644 --- a/lib/upgradedb/postgres.2010020700.php +++ b/lib/upgradedb/postgres.2010020700.php @@ -22,7 +22,6 @@ * */ -$this->BeginTrans(); $this->Execute(" CREATE SEQUENCE ewx_channels_id_seq; @@ -41,7 +40,3 @@ REFERENCES ewx_channels (id) ON DELETE SET NULL ON UPDATE CASCADE; CREATE INDEX netdevices_channelid_idx ON netdevices (channelid); "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2010020700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2010031100.php b/lib/upgradedb/postgres.2010031100.php index 18abbd7af0..d68856dfae 100644 --- a/lib/upgradedb/postgres.2010031100.php +++ b/lib/upgradedb/postgres.2010031100.php @@ -22,13 +22,8 @@ * */ -$this->BeginTrans(); $this->Execute(" ALTER TABLE ewx_stm_channels RENAME customerid TO cid; ALTER INDEX ewx_stm_channels_customerid_key RENAME TO ewx_stm_channels_cid_key; "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2010031100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2010050600.php b/lib/upgradedb/postgres.2010050600.php index eb751f3c39..a8bd9e2af7 100644 --- a/lib/upgradedb/postgres.2010050600.php +++ b/lib/upgradedb/postgres.2010050600.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" CREATE SEQUENCE macs_id_seq; @@ -54,7 +53,3 @@ ); "); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2010050600', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2010051400.php b/lib/upgradedb/postgres.2010051400.php index 78571c05f5..bd02fa3c31 100644 --- a/lib/upgradedb/postgres.2010051400.php +++ b/lib/upgradedb/postgres.2010051400.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" CREATE VIEW vnodes AS @@ -33,7 +32,3 @@ LEFT JOIN (SELECT nodeid, array_to_string(array_agg(mac), ',') AS mac FROM (SELECT * FROM macs ORDER BY id) macs GROUP BY nodeid) m ON (n.id = m.nodeid); "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2010051400', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2010061100.php b/lib/upgradedb/postgres.2010061100.php index 02d6feba01..3595b1fdc3 100644 --- a/lib/upgradedb/postgres.2010061100.php +++ b/lib/upgradedb/postgres.2010061100.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" CREATE VIEW vmacs AS @@ -32,7 +31,3 @@ FROM nodes n JOIN macs m ON (n.id = m.nodeid) "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2010061100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2010061800.php b/lib/upgradedb/postgres.2010061800.php index 627c947d9a..f0661b90da 100644 --- a/lib/upgradedb/postgres.2010061800.php +++ b/lib/upgradedb/postgres.2010061800.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $tables = array( 'documents' => 'paytype', @@ -95,7 +94,3 @@ } } } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2010061800', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2010062200.php b/lib/upgradedb/postgres.2010062200.php index caa86bef16..ec97eebb13 100644 --- a/lib/upgradedb/postgres.2010062200.php +++ b/lib/upgradedb/postgres.2010062200.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" ALTER TABLE assignments ADD paytype smallint DEFAULT NULL; @@ -32,7 +31,3 @@ REFERENCES numberplans (id) ON DELETE SET NULL ON UPDATE CASCADE; CREATE INDEX assignments_numberplanid_idx ON assignments (numberplanid); "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2010062200', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2010062800.php b/lib/upgradedb/postgres.2010062800.php index ff433de4f1..cf80131d34 100644 --- a/lib/upgradedb/postgres.2010062800.php +++ b/lib/upgradedb/postgres.2010062800.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" DELETE FROM rtattachments WHERE messageid NOT IN (SELECT id FROM rtmessages); @@ -61,7 +60,3 @@ REFERENCES users (id) ON DELETE CASCADE ON UPDATE CASCADE; ALTER TABLE rtrights ALTER userid DROP DEFAULT; "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2010062800', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2010081700.php b/lib/upgradedb/postgres.2010081700.php index e0485ca04d..3b67518d5f 100644 --- a/lib/upgradedb/postgres.2010081700.php +++ b/lib/upgradedb/postgres.2010081700.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("DROP INDEX stats_nodeid_idx"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2010081700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2010121000.php b/lib/upgradedb/postgres.2010121000.php index c0a9ec66ad..3a5669eb87 100644 --- a/lib/upgradedb/postgres.2010121000.php +++ b/lib/upgradedb/postgres.2010121000.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" DROP VIEW customersview; @@ -61,7 +60,3 @@ CREATE INDEX excludedgroups_customergroupid_idx ON excludedgroups (customergroupid); "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2010121000', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2010121400.php b/lib/upgradedb/postgres.2010121400.php index 47a8e0f5ce..c5d1589402 100644 --- a/lib/upgradedb/postgres.2010121400.php +++ b/lib/upgradedb/postgres.2010121400.php @@ -23,7 +23,6 @@ $lang = $this->GetOne("SELECT value FROM uiconfig WHERE section = ? AND var = ? AND disabled = 0", array('phpui', 'lang', 0)); -$this->BeginTrans(); $this->Execute(" DELETE FROM customercontacts WHERE customerid NOT IN (SELECT id FROM customers); @@ -44,7 +43,3 @@ $this->Execute("UPDATE customercontacts SET type = COALESCE(type, 0) + 1 WHERE regexp_replace(phone, '[^0-9]', '', 'g') ~ '^(\\\\+?[0-9]{2}|0|)(88[0-9]|5[01][0-9]|6[069][0-9]|7[2789][0-9])[0-9]{6}$'"); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2010121400', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2010121600.php b/lib/upgradedb/postgres.2010121600.php index 4fa55ebbdc..7499fb4290 100644 --- a/lib/upgradedb/postgres.2010121600.php +++ b/lib/upgradedb/postgres.2010121600.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" DROP VIEW customersview; @@ -113,7 +112,3 @@ function parse_address_tmp($addr) FROM nodes n JOIN macs m ON (n.id = m.nodeid); "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2010121600', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2010122000.php b/lib/upgradedb/postgres.2010122000.php index 966ad36976..6c22781905 100644 --- a/lib/upgradedb/postgres.2010122000.php +++ b/lib/upgradedb/postgres.2010122000.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" CREATE SEQUENCE sourcefiles_id_seq; @@ -54,7 +53,3 @@ CREATE INDEX cashimport_sourcefileid_idx ON cashimport (sourcefileid); CREATE INDEX cashimport_sourceid_idx ON cashimport (sourceid); "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2010122000', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2010122700.php b/lib/upgradedb/postgres.2010122700.php index 52c5805865..94e996fe50 100644 --- a/lib/upgradedb/postgres.2010122700.php +++ b/lib/upgradedb/postgres.2010122700.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE tariffs ADD period smallint DEFAULT NULL"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2010122700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2011021700.php b/lib/upgradedb/postgres.2011021700.php index 943bf4619e..8745cbc6ac 100644 --- a/lib/upgradedb/postgres.2011021700.php +++ b/lib/upgradedb/postgres.2011021700.php @@ -21,11 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE tariffs DROP CONSTRAINT tariffs_name_key"); $this->Execute("ALTER TABLE tariffs ADD CONSTRAINT tariffs_name_key UNIQUE(name, value)"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2011021700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2011022000.php b/lib/upgradedb/postgres.2011022000.php index 0efd314fb1..84092ea5dc 100644 --- a/lib/upgradedb/postgres.2011022000.php +++ b/lib/upgradedb/postgres.2011022000.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" CREATE SEQUENCE promotions_id_seq; @@ -63,8 +62,3 @@ ALTER TABLE tariffs DROP CONSTRAINT tariffs_name_key; ALTER TABLE tariffs ADD CONSTRAINT tariffs_name_key UNIQUE(name, value, period); "); - - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2011022000', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2011030700.php b/lib/upgradedb/postgres.2011030700.php index 3a2f84eb07..9e178afabd 100644 --- a/lib/upgradedb/postgres.2011030700.php +++ b/lib/upgradedb/postgres.2011030700.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $s_arr = array(); $schemas = $this->GetAll("SELECT * FROM promotionschemas"); @@ -65,7 +64,3 @@ $this->Execute("CREATE INDEX promotionschemas_ctariffid_idx ON promotionschemas (ctariffid)"); $this->Execute("ALTER TABLE promotionschemas ADD continuation smallint DEFAULT NULL"); $this->Execute("UPDATE promotionschemas SET continuation = 1"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2011030700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2011031000.php b/lib/upgradedb/postgres.2011031000.php index 5cb32f5c00..2e4ff2a4f9 100644 --- a/lib/upgradedb/postgres.2011031000.php +++ b/lib/upgradedb/postgres.2011031000.php @@ -21,12 +21,7 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE users ADD phone varchar(32) DEFAULT NULL"); $this->Execute("ALTER TABLE users ADD ntype smallint DEFAULT NULL"); $this->Execute("UPDATE users SET ntype = 1"); // MSG_MAIL - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2011031000', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2011032400.php b/lib/upgradedb/postgres.2011032400.php index 4474bb68ee..4fceac8adb 100644 --- a/lib/upgradedb/postgres.2011032400.php +++ b/lib/upgradedb/postgres.2011032400.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); if (!$this->ResourceExists('customers.post_name', LMSDB::RESOURCE_TYPE_COLUMN)) { $this->Execute("ALTER TABLE customers ADD post_name varchar(255) DEFAULT NULL"); @@ -36,7 +35,3 @@ JOIN excludedgroups e ON (a.customergroupid = e.customergroupid) WHERE e.userid = lms_current_user() AND a.customerid = c.id); "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2011032400', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2011032500.php b/lib/upgradedb/postgres.2011032500.php index 2ae9e06731..76af3019c7 100644 --- a/lib/upgradedb/postgres.2011032500.php +++ b/lib/upgradedb/postgres.2011032500.php @@ -21,14 +21,9 @@ * */ -$this->BeginTrans(); if (!$this->ResourceExists('documents.sdate', LMSDB::RESOURCE_TYPE_COLUMN)) { $this->Execute("ALTER TABLE documents ADD sdate integer DEFAULT 0 NOT NULL"); } $this->Execute("UPDATE documents SET sdate = cdate WHERE type IN (1, 3)"); // DOC_INVOICE/DOC_CNOTE - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2011032500', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2011041500.php b/lib/upgradedb/postgres.2011041500.php index 3e769bb9c9..20808ef26a 100644 --- a/lib/upgradedb/postgres.2011041500.php +++ b/lib/upgradedb/postgres.2011041500.php @@ -21,13 +21,8 @@ * */ -$this->BeginTrans(); $this->Execute(" ALTER TABLE ewx_channels ADD halfduplex smallint DEFAULT NULL; ALTER TABLE ewx_stm_channels ADD halfduplex smallint DEFAULT NULL; "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2011041500', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2011082800.php b/lib/upgradedb/postgres.2011082800.php index cd6038fccb..7e83286594 100644 --- a/lib/upgradedb/postgres.2011082800.php +++ b/lib/upgradedb/postgres.2011082800.php @@ -23,7 +23,6 @@ // TERYT -$this->BeginTrans(); $this->Execute(" -- wojewodztwa @@ -187,7 +186,3 @@ FROM nodes n JOIN macs m ON (n.id = m.nodeid); "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2011082800', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2011091100.php b/lib/upgradedb/postgres.2011091100.php index 4f4641180a..fa912fe445 100644 --- a/lib/upgradedb/postgres.2011091100.php +++ b/lib/upgradedb/postgres.2011091100.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" ALTER TABLE voipaccounts ADD COLUMN access smallint; @@ -32,7 +31,3 @@ ALTER TABLE voipaccounts ALTER access SET NOT NULL; ALTER TABLE voipaccounts ALTER access SET DEFAULT 1; "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2011091100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2011091600.php b/lib/upgradedb/postgres.2011091600.php index 48f49963b5..fb579c47a2 100644 --- a/lib/upgradedb/postgres.2011091600.php +++ b/lib/upgradedb/postgres.2011091600.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" CREATE SEQUENCE rtcategories_id_seq; @@ -68,7 +67,3 @@ ); $this->Execute("INSERT INTO uiconfig (section, var, value) VALUES ('userpanel', 'default_categories', ?)", array($default_catid)); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2011091600', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2011110800.php b/lib/upgradedb/postgres.2011110800.php index 6f21ffb940..83f5e075da 100644 --- a/lib/upgradedb/postgres.2011110800.php +++ b/lib/upgradedb/postgres.2011110800.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" DROP VIEW vnodes; @@ -49,7 +48,3 @@ $this->Execute("ALTER TABLE netdevices ADD longitude numeric(10, 6) DEFAULT NULL"); $this->Execute("ALTER TABLE netdevices ADD latitude numeric(10, 6) DEFAULT NULL"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2011110800', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2011113000.php b/lib/upgradedb/postgres.2011113000.php index 19887b1dbb..8ca6749981 100644 --- a/lib/upgradedb/postgres.2011113000.php +++ b/lib/upgradedb/postgres.2011113000.php @@ -24,13 +24,8 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("ALTER TABLE assignments RENAME discount TO pdiscount"); $this->Execute("ALTER TABLE invoicecontents RENAME discount TO pdiscount"); $this->Execute("ALTER TABLE assignments ADD vdiscount numeric(9, 2) DEFAULT 0 NOT NULL"); $this->Execute("ALTER TABLE invoicecontents ADD vdiscount numeric(9, 2) DEFAULT 0 NOT NULL"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2011113000', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2012011800.php b/lib/upgradedb/postgres.2012011800.php index cc08cdb947..133af120ce 100644 --- a/lib/upgradedb/postgres.2012011800.php +++ b/lib/upgradedb/postgres.2012011800.php @@ -23,9 +23,3 @@ * * $Id$ */ - -$this->BeginTrans(); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2012011800', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2012021400.php b/lib/upgradedb/postgres.2012021400.php index 89d2cc582b..4df0d71928 100644 --- a/lib/upgradedb/postgres.2012021400.php +++ b/lib/upgradedb/postgres.2012021400.php @@ -22,10 +22,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE domains ADD mxbackup smallint DEFAULT 0 NOT NULL"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2012021400', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2012021800.php b/lib/upgradedb/postgres.2012021800.php index c0528fc8c3..ea4091ca8e 100644 --- a/lib/upgradedb/postgres.2012021800.php +++ b/lib/upgradedb/postgres.2012021800.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" CREATE SEQUENCE assignmentlocks_id_seq; @@ -35,7 +34,3 @@ PRIMARY KEY (id) ); "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2012021800', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2012030801.php b/lib/upgradedb/postgres.2012030801.php index a52437ccd0..3d06422e42 100644 --- a/lib/upgradedb/postgres.2012030801.php +++ b/lib/upgradedb/postgres.2012030801.php @@ -22,7 +22,6 @@ * */ -$this->BeginTrans(); // name2 support for teryt location_street $this->Execute(" @@ -55,7 +54,3 @@ FROM nodes n JOIN macs m ON (n.id = m.nodeid); "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2012030801', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2012032900.php b/lib/upgradedb/postgres.2012032900.php index 88cda89a68..1536ecfe54 100644 --- a/lib/upgradedb/postgres.2012032900.php +++ b/lib/upgradedb/postgres.2012032900.php @@ -22,7 +22,6 @@ * */ -$this->BeginTrans(); $this->Execute(" CREATE SEQUENCE pna_id_seq; @@ -40,7 +39,3 @@ UNIQUE (zip, cityid, streetid, fromhouse, tohouse, parity) ); "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2012032900', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2012040700.php b/lib/upgradedb/postgres.2012040700.php index e1e3fecd1a..bd5cabd1b1 100644 --- a/lib/upgradedb/postgres.2012040700.php +++ b/lib/upgradedb/postgres.2012040700.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" CREATE SEQUENCE nodelocks_id_seq; @@ -40,7 +39,3 @@ LEFT JOIN nodeassignments na ON na.assignmentid = a.id); DROP TABLE assignmentlocks; "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2012040700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2012041100.php b/lib/upgradedb/postgres.2012041100.php index 3b07bc514d..2dcfb5d297 100644 --- a/lib/upgradedb/postgres.2012041100.php +++ b/lib/upgradedb/postgres.2012041100.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); // Najpierw kasujemy widok bo korzysta on z kolumny PIN, której chcemy zmienić typ $this->Execute("DROP VIEW customersview"); @@ -36,7 +35,3 @@ WHERE e.userid = lms_current_user() AND a.customerid = c.id)"); $this->Execute("UPDATE customers SET pin = '0' || pin WHERE LENGTH(pin) < 4"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2012041100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2012041101.php b/lib/upgradedb/postgres.2012041101.php index 2e78474d2c..e3558daea7 100644 --- a/lib/upgradedb/postgres.2012041101.php +++ b/lib/upgradedb/postgres.2012041101.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" CREATE SEQUENCE managementurls_id_seq; @@ -34,7 +33,3 @@ PRIMARY KEY (id) ); "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2012041101', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2012041102.php b/lib/upgradedb/postgres.2012041102.php index f6f8063e3a..ca83896647 100644 --- a/lib/upgradedb/postgres.2012041102.php +++ b/lib/upgradedb/postgres.2012041102.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); //$this->Execute("INSERT INTO uiconfig (section, var, value, description, disabled) VALUES ('phpui', 'default_assignment_invoice', '0', '', '0')"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2012041102', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2012042300.php b/lib/upgradedb/postgres.2012042300.php index cdee045e15..909257b6e7 100644 --- a/lib/upgradedb/postgres.2012042300.php +++ b/lib/upgradedb/postgres.2012042300.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" CREATE SEQUENCE nodesessions_id_seq; @@ -44,7 +43,3 @@ ALTER TABLE stats ADD COLUMN nodesessionid integer DEFAULT 0 NOT NULL; CREATE INDEX stats_nodesessionid_idx ON stats(nodesessionid); "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2012042300', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2012042500.php b/lib/upgradedb/postgres.2012042500.php index 5e035f1155..2d0602766b 100644 --- a/lib/upgradedb/postgres.2012042500.php +++ b/lib/upgradedb/postgres.2012042500.php @@ -21,13 +21,8 @@ * */ -$this->BeginTrans(); $this->Execute(" ALTER TABLE users ADD COLUMN passwdexpiration integer DEFAULT 0 NOT NULL; ALTER TABLE users ADD COLUMN passwdlastchange integer DEFAULT 0 NOT NULL; "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2012042500', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2012050200.php b/lib/upgradedb/postgres.2012050200.php index 733a2b3c68..1c75a98eca 100644 --- a/lib/upgradedb/postgres.2012050200.php +++ b/lib/upgradedb/postgres.2012050200.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("INSERT INTO uiconfig (section, var, value, description, disabled) VALUES ('zones', 'default_spf', '', '', '0')"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2012050200', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2012092000.php b/lib/upgradedb/postgres.2012092000.php index 7723d6a0c3..60478011f9 100644 --- a/lib/upgradedb/postgres.2012092000.php +++ b/lib/upgradedb/postgres.2012092000.php @@ -21,12 +21,7 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE users ADD access smallint NOT NULL DEFAULT 1;"); $this->Execute("ALTER TABLE users ADD accessfrom integer NOT NULL DEFAULT 0;"); $this->Execute("ALTER TABLE users ADD accessto integer NOT NULL DEFAULT 0;"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2012092000', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2012092500.php b/lib/upgradedb/postgres.2012092500.php index 39980343af..a781ba392c 100644 --- a/lib/upgradedb/postgres.2012092500.php +++ b/lib/upgradedb/postgres.2012092500.php @@ -21,11 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE events ADD moddate integer NOT NULL DEFAULT 0;"); $this->Execute("ALTER TABLE events ADD moduserid integer NOT NULL DEFAULT 0;"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2012092500', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2012111100.php b/lib/upgradedb/postgres.2012111100.php index 85397f6b5b..22e94e4939 100644 --- a/lib/upgradedb/postgres.2012111100.php +++ b/lib/upgradedb/postgres.2012111100.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("DROP VIEW customersview"); @@ -36,8 +35,3 @@ $this->Execute("CREATE VIEW contractorview AS SELECT c.* FROM customers c WHERE c.type = ? ;", array(2)); - - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2012111100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2013031400.php b/lib/upgradedb/postgres.2013031400.php index 6133f47aef..9a2f421efa 100644 --- a/lib/upgradedb/postgres.2013031400.php +++ b/lib/upgradedb/postgres.2013031400.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE tariffs ADD COLUMN disabled smallint DEFAULT 0 NOT NULL;"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2013031400', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2013031800.php b/lib/upgradedb/postgres.2013031800.php index fdfc2abc3b..62a5856e46 100644 --- a/lib/upgradedb/postgres.2013031800.php +++ b/lib/upgradedb/postgres.2013031800.php @@ -20,9 +20,3 @@ * USA. * */ - -$this->BeginTrans(); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2013031800', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2013032100.php b/lib/upgradedb/postgres.2013032100.php index e2ffca3170..b2885bb684 100644 --- a/lib/upgradedb/postgres.2013032100.php +++ b/lib/upgradedb/postgres.2013032100.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE networks ADD COLUMN hostid integer NULL @@ -34,7 +33,3 @@ $this->Execute("ALTER TABLE networks ADD CONSTRAINT networks_address_key UNIQUE (address, hostid)"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2013032100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2013040200.php b/lib/upgradedb/postgres.2013040200.php index b6fb0cae78..67e9089c42 100644 --- a/lib/upgradedb/postgres.2013040200.php +++ b/lib/upgradedb/postgres.2013040200.php @@ -21,13 +21,8 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE users ADD COLUMN swekey_id varchar(32) DEFAULT NULL; ALTER TABLE users DROP CONSTRAINT users_login_key; ALTER TABLE users ADD CONSTRAINT users_login_key UNIQUE (login, swekey_id); "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2013040200', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2013042600.php b/lib/upgradedb/postgres.2013042600.php index 6f5b6c1484..f6b3313a95 100644 --- a/lib/upgradedb/postgres.2013042600.php +++ b/lib/upgradedb/postgres.2013042600.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" CREATE SEQUENCE logtransactions_id_seq; @@ -67,7 +66,3 @@ CREATE INDEX logmessagedata_logmessageid_idx ON logmessagedata (logmessageid); CREATE INDEX logmessagedata_name_idx ON logmessagedata (name); "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2013042600', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2013050700.php b/lib/upgradedb/postgres.2013050700.php index ebbf065b3d..d7afa1ead4 100644 --- a/lib/upgradedb/postgres.2013050700.php +++ b/lib/upgradedb/postgres.2013050700.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("SET CONSTRAINTS ALL IMMEDIATE"); @@ -60,7 +59,3 @@ FROM nodes n JOIN macs m ON (n.id = m.nodeid); "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2013050700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2013051700.php b/lib/upgradedb/postgres.2013051700.php index e4105a8f85..a7372130bb 100644 --- a/lib/upgradedb/postgres.2013051700.php +++ b/lib/upgradedb/postgres.2013051700.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" CREATE SEQUENCE templates_id_seq; @@ -34,7 +33,3 @@ UNIQUE (type, name) ); "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2013051700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2013101400.php b/lib/upgradedb/postgres.2013101400.php index bf1454e253..25ebcbbf62 100644 --- a/lib/upgradedb/postgres.2013101400.php +++ b/lib/upgradedb/postgres.2013101400.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE documents ADD div_name TEXT NOT NULL DEFAULT ''"); // peÅ‚na nazwa firmy $this->Execute("ALTER TABLE documents ADD div_address VARCHAR (255) NOT NULL DEFAULT ''"); // adres firmy @@ -67,7 +66,3 @@ ); } } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2013101400', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2013110500.php b/lib/upgradedb/postgres.2013110500.php index 85ba6bfbcf..337d9691ab 100644 --- a/lib/upgradedb/postgres.2013110500.php +++ b/lib/upgradedb/postgres.2013110500.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("DROP VIEW customersview"); @@ -32,7 +31,3 @@ JOIN excludedgroups e ON (a.customergroupid = e.customergroupid) WHERE e.userid = lms_current_user() AND a.customerid = c.id) AND c.type < ?", array(2)); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2013110500', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2013111900.php b/lib/upgradedb/postgres.2013111900.php index cd1230da73..62a5856e46 100644 --- a/lib/upgradedb/postgres.2013111900.php +++ b/lib/upgradedb/postgres.2013111900.php @@ -20,9 +20,3 @@ * USA. * */ - -$this->BeginTrans(); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2013111900', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2014012700.php b/lib/upgradedb/postgres.2014012700.php index f292cf41f3..8971c2d3f7 100644 --- a/lib/upgradedb/postgres.2014012700.php +++ b/lib/upgradedb/postgres.2014012700.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("CREATE INDEX documents_reference_idx ON documents (reference)"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2014012700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2014013100.php b/lib/upgradedb/postgres.2014013100.php index df41d52697..13e188d42a 100644 --- a/lib/upgradedb/postgres.2014013100.php +++ b/lib/upgradedb/postgres.2014013100.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); if ($id = $this->GetOne("SELECT id FROM uiconfig WHERE section = ? AND var = ?", array('userpanel', 'default_queue'))) { $this->Execute("UPDATE uiconfig SET var = ? WHERE id = ?", array('queues', $id)); @@ -31,7 +30,3 @@ array('userpanel', 'queues', '1') ); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2014013100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2014020400.php b/lib/upgradedb/postgres.2014020400.php index c098a07b8a..073b56390d 100644 --- a/lib/upgradedb/postgres.2014020400.php +++ b/lib/upgradedb/postgres.2014020400.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" ALTER TABLE rtqueues ADD COLUMN newticketsubject varchar(255) NOT NULL DEFAULT ''; @@ -31,7 +30,3 @@ ALTER TABLE rtqueues ADD COLUMN resolveticketsubject varchar(255) NOT NULL DEFAULT ''; ALTER TABLE rtqueues ADD COLUMN resolveticketbody text NOT NULL DEFAULT ''; "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2014020400', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2014021400.php b/lib/upgradedb/postgres.2014021400.php index 063dea6ec5..aeeae86d66 100644 --- a/lib/upgradedb/postgres.2014021400.php +++ b/lib/upgradedb/postgres.2014021400.php @@ -21,13 +21,8 @@ * */ -$this->BeginTrans(); $this->Execute( "INSERT INTO uiconfig (section, var, value) VALUES(?, ?, ?)", array('userpanel', 'tickets_from_selected_queues', '0') ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2014021400', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2014021700.php b/lib/upgradedb/postgres.2014021700.php index 484eaeefe5..4f7b44a941 100644 --- a/lib/upgradedb/postgres.2014021700.php +++ b/lib/upgradedb/postgres.2014021700.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute( "INSERT INTO uiconfig (section, var, value) VALUES(?, ?, ?)", @@ -31,7 +30,3 @@ "INSERT INTO uiconfig (section, var, value) VALUES(?, ?, ?)", array('userpanel', 'limit_ticket_movements_to_selected_queues', '0') ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2014021700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2014032900.php b/lib/upgradedb/postgres.2014032900.php index 6680518080..d1416bf1ea 100644 --- a/lib/upgradedb/postgres.2014032900.php +++ b/lib/upgradedb/postgres.2014032900.php @@ -22,7 +22,6 @@ * */ -$this->BeginTrans(); $this->Execute(" DROP VIEW vnodes; @@ -39,7 +38,3 @@ FROM nodes n JOIN macs m ON (n.id = m.nodeid); "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2014032900', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2014040100.php b/lib/upgradedb/postgres.2014040100.php index 7fe8812c3f..81e61d10df 100644 --- a/lib/upgradedb/postgres.2014040100.php +++ b/lib/upgradedb/postgres.2014040100.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE documents ADD div_shortname TEXT NOT NULL DEFAULT ''"); @@ -35,6 +34,3 @@ $division['id'])); } } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2014040100', 'dbversion')); -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2014040400.php b/lib/upgradedb/postgres.2014040400.php index 9f87156ba0..bae7daf8d4 100644 --- a/lib/upgradedb/postgres.2014040400.php +++ b/lib/upgradedb/postgres.2014040400.php @@ -21,10 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("UPDATE docrights SET doctype = ? WHERE doctype = ?", array('-128', '-10')); $this->Execute("UPDATE documents SET type = ? WHERE type = ?", array('-128', '-10')); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2014040400', 'dbversion')); -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2014040700.php b/lib/upgradedb/postgres.2014040700.php index 7f211ff7f7..448ea46fb3 100644 --- a/lib/upgradedb/postgres.2014040700.php +++ b/lib/upgradedb/postgres.2014040700.php @@ -21,11 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE promotionassignments ADD optional smallint NOT NULL DEFAULT 0"); $this->Execute("ALTER TABLE promotionassignments ADD selectionid smallint NOT NULL DEFAULT 0"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2014040700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2014061200.php b/lib/upgradedb/postgres.2014061200.php index 6952f93d6b..8598f5db0f 100644 --- a/lib/upgradedb/postgres.2014061200.php +++ b/lib/upgradedb/postgres.2014061200.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE templates ADD subject varchar(255) NOT NULL DEFAULT ''"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2014061200', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2014063000.php b/lib/upgradedb/postgres.2014063000.php index 6b4a76b8f2..0f39672d89 100644 --- a/lib/upgradedb/postgres.2014063000.php +++ b/lib/upgradedb/postgres.2014063000.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $DEFAULTS = array( /* @@ -153,7 +152,3 @@ ); } } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2014063000', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2014072500.php b/lib/upgradedb/postgres.2014072500.php index 814999f3d3..c04b878a97 100644 --- a/lib/upgradedb/postgres.2014072500.php +++ b/lib/upgradedb/postgres.2014072500.php @@ -25,7 +25,6 @@ $numberplans = $this->GetAllByKey("SELECT * FROM numberplans ORDER BY id", 'id'); -$this->BeginTrans(); $this->Execute("ALTER TABLE documents ADD fullnumber varchar(50) DEFAULT NULL"); $this->Execute("CREATE INDEX documents_fullnumber_idx ON documents (fullnumber)"); @@ -61,7 +60,3 @@ } while (!$stop); $this->UnLockTables("documents"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2014072500', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2014090200.php b/lib/upgradedb/postgres.2014090200.php index 79b3101c11..c309c183fa 100644 --- a/lib/upgradedb/postgres.2014090200.php +++ b/lib/upgradedb/postgres.2014090200.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE events ADD enddate integer NOT NULL DEFAULT 0"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2014090200', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2014090600.php b/lib/upgradedb/postgres.2014090600.php index 1a3b99eb11..4db9c54072 100644 --- a/lib/upgradedb/postgres.2014090600.php +++ b/lib/upgradedb/postgres.2014090600.php @@ -21,14 +21,9 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE managementurls ALTER COLUMN netdevid DROP NOT NULL"); $this->Execute("ALTER TABLE managementurls ADD nodeid integer DEFAULT NULL"); $this->Execute("ALTER TABLE managementurls ADD CONSTRAINT managementurls_nodeid_fkey FOREIGN KEY (nodeid) REFERENCES nodes (id) ON DELETE CASCADE ON UPDATE CASCADE"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2014090600', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2014111200.php b/lib/upgradedb/postgres.2014111200.php index f5dd9751f3..e9cd651253 100644 --- a/lib/upgradedb/postgres.2014111200.php +++ b/lib/upgradedb/postgres.2014111200.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE messageitems ADD lastreaddate integer NOT NULL DEFAULT '0'"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2014111200', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2014111400.php b/lib/upgradedb/postgres.2014111400.php index ab35ae0051..33ddabab62 100644 --- a/lib/upgradedb/postgres.2014111400.php +++ b/lib/upgradedb/postgres.2014111400.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" CREATE SEQUENCE invprojects_id_seq; @@ -79,7 +78,3 @@ SELECT n.*, m.mac, m.id AS macid FROM nodes n JOIN macs m ON (n.id = m.nodeid);"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2014111400', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2015020900.php b/lib/upgradedb/postgres.2015020900.php index 8415039f38..ac13696443 100644 --- a/lib/upgradedb/postgres.2015020900.php +++ b/lib/upgradedb/postgres.2015020900.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" CREATE SEQUENCE netdeviceproducers_id_seq; @@ -385,7 +384,3 @@ $this->Execute("ALTER TABLE netdevices ADD COLUMN netdevicemodelid integer DEFAULT NULL"); $this->Execute("ALTER TABLE netdevices ADD CONSTRAINT netdevices_netdevicemodel_fkey FOREIGN KEY (netdevicemodelid) REFERENCES netdevicemodels (id) ON UPDATE CASCADE ON DELETE SET NULL"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2015020900', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2015030300.php b/lib/upgradedb/postgres.2015030300.php index 4b113d7d2a..4b4f5cf406 100644 --- a/lib/upgradedb/postgres.2015030300.php +++ b/lib/upgradedb/postgres.2015030300.php @@ -24,9 +24,5 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("ALTER TABLE assignments ADD attribute varchar(255) DEFAULT NULL"); -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2015030300', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2015031900.php b/lib/upgradedb/postgres.2015031900.php index f353473690..ea73e8fdda 100644 --- a/lib/upgradedb/postgres.2015031900.php +++ b/lib/upgradedb/postgres.2015031900.php @@ -24,9 +24,5 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("ALTER TABLE nodesessions ADD terminatecause varchar(32) DEFAULT '' NOT NULL"); -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2015031900', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2015033000.php b/lib/upgradedb/postgres.2015033000.php index d59012a7e2..5cab6c9a3c 100644 --- a/lib/upgradedb/postgres.2015033000.php +++ b/lib/upgradedb/postgres.2015033000.php @@ -24,11 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("ALTER TABLE netnodes ADD CONSTRAINT netnodes_location_city_fkey FOREIGN KEY (location_city) REFERENCES location_cities(id) ON DELETE SET NULL ON UPDATE CASCADE"); $this->Execute("ALTER TABLE netnodes ADD CONSTRAINT netnodes_location_street_fkey FOREIGN KEY (location_street) REFERENCES location_streets(id) ON DELETE SET NULL ON UPDATE CASCADE"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2015033000', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2015040100.php b/lib/upgradedb/postgres.2015040100.php index 0acd017303..307d6a22ce 100644 --- a/lib/upgradedb/postgres.2015040100.php +++ b/lib/upgradedb/postgres.2015040100.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" DROP VIEW vnodes; @@ -45,7 +44,3 @@ ALTER TABLE netnodes ALTER COLUMN location_house TYPE varchar(32); ALTER TABLE netnodes ALTER COLUMN location_flat TYPE varchar(32); "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2015040100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2015040200.php b/lib/upgradedb/postgres.2015040200.php index 321114f12c..9534465d1f 100644 --- a/lib/upgradedb/postgres.2015040200.php +++ b/lib/upgradedb/postgres.2015040200.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" CREATE SEQUENCE netradiosectors_id_seq; @@ -57,7 +56,3 @@ JOIN macs m ON (n.id = m.nodeid); CREATE INDEX nodes_linkradiosector_idx ON nodes (linkradiosector); "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2015040200', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2015040800.php b/lib/upgradedb/postgres.2015040800.php index e3e732bb82..f1f5211cdf 100644 --- a/lib/upgradedb/postgres.2015040800.php +++ b/lib/upgradedb/postgres.2015040800.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" ALTER TABLE netlinks ADD COLUMN srcradiosector integer DEFAULT NULL; @@ -36,7 +35,3 @@ ALTER TABLE netlinks ADD CONSTRAINT netlinks_dstradiosector_fkey FOREIGN KEY (dstradiosector) REFERENCES netradiosectors (id) ON DELETE SET NULL ON UPDATE CASCADE; "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2015040800', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2015041000.php b/lib/upgradedb/postgres.2015041000.php index 3f2451153b..9e58d4553b 100644 --- a/lib/upgradedb/postgres.2015041000.php +++ b/lib/upgradedb/postgres.2015041000.php @@ -24,10 +24,5 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("ALTER TABLE netradiosectors ADD COLUMN license varchar(64) DEFAULT NULL"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2015041000', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2015041001.php b/lib/upgradedb/postgres.2015041001.php index 76d72c5916..0bc77be6a0 100644 --- a/lib/upgradedb/postgres.2015041001.php +++ b/lib/upgradedb/postgres.2015041001.php @@ -24,10 +24,5 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("ALTER TABLE netradiosectors ADD COLUMN frequency numeric(9,3) DEFAULT NULL"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2015041001', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2015041200.php b/lib/upgradedb/postgres.2015041200.php index ab845c7c8c..3ca649451b 100644 --- a/lib/upgradedb/postgres.2015041200.php +++ b/lib/upgradedb/postgres.2015041200.php @@ -24,10 +24,5 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("ALTER TABLE netradiosectors ALTER COLUMN frequency TYPE numeric(9,5)"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2015041200', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2015041400.php b/lib/upgradedb/postgres.2015041400.php index 491e933bf0..f938f5b7e8 100644 --- a/lib/upgradedb/postgres.2015041400.php +++ b/lib/upgradedb/postgres.2015041400.php @@ -24,12 +24,7 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" ALTER TABLE netradiosectors RENAME radius TO width; ALTER TABLE netradiosectors ADD COLUMN technology integer DEFAULT 0 NOT NULL"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2015041400', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2015041500.php b/lib/upgradedb/postgres.2015041500.php index 713681ddc7..5e3e30a0ae 100644 --- a/lib/upgradedb/postgres.2015041500.php +++ b/lib/upgradedb/postgres.2015041500.php @@ -24,11 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" ALTER TABLE netradiosectors ADD COLUMN bandwidth numeric(9,5) DEFAULT NULL"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2015041500', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2015042100.php b/lib/upgradedb/postgres.2015042100.php index dfa306d17a..9d06a163a0 100644 --- a/lib/upgradedb/postgres.2015042100.php +++ b/lib/upgradedb/postgres.2015042100.php @@ -24,10 +24,5 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("ALTER TABLE netradiosectors ADD COLUMN frequency2 numeric(9,5) DEFAULT NULL"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2015042100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2015042700.php b/lib/upgradedb/postgres.2015042700.php index 7d98fcb8a7..b5752d521f 100644 --- a/lib/upgradedb/postgres.2015042700.php +++ b/lib/upgradedb/postgres.2015042700.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("DROP VIEW vnodes; ALTER TABLE nodes ADD COLUMN authtype smallint DEFAULT 0 NOT NULL; @@ -35,7 +34,3 @@ LEFT JOIN (SELECT nodeid, array_to_string(array_agg(mac), ',') AS mac FROM macs GROUP BY nodeid) m ON (n.id = m.nodeid); "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2015042700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2015072300.php b/lib/upgradedb/postgres.2015072300.php index 414b6b9749..a40c00a2ba 100644 --- a/lib/upgradedb/postgres.2015072300.php +++ b/lib/upgradedb/postgres.2015072300.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" ALTER TABLE voipaccounts ADD COLUMN location varchar(255) DEFAULT NULL; @@ -39,7 +38,3 @@ ALTER TABLE voipaccounts ADD CONSTRAINT voipaccounts_location_street_fkey FOREIGN KEY (location_street) REFERENCES location_streets (id) ON DELETE SET NULL ON UPDATE CASCADE; "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2015072300', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2015080500.php b/lib/upgradedb/postgres.2015080500.php index ff5d63f3be..c4041916bb 100644 --- a/lib/upgradedb/postgres.2015080500.php +++ b/lib/upgradedb/postgres.2015080500.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" CREATE TABLE plicbdlocalisation ( @@ -36,7 +35,3 @@ ); CREATE INDEX plicbdlocalisation_location_city_idx ON plicbdlocalisation (location_city); "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2015080500', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2015080700.php b/lib/upgradedb/postgres.2015080700.php index 337f2e5c8f..3d581c586a 100644 --- a/lib/upgradedb/postgres.2015080700.php +++ b/lib/upgradedb/postgres.2015080700.php @@ -30,7 +30,6 @@ $CONTACT_LANDLINE = 4; $CONTACT_EMAIL = 8; -$this->BeginTrans(); $this->Execute("ALTER TABLE customercontacts RENAME phone TO contact"); $this->Execute( @@ -67,7 +66,3 @@ CREATE VIEW contractorview AS SELECT c.* FROM customers c WHERE c.type = ?", array(2, 2)); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2015080700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2015082700.php b/lib/upgradedb/postgres.2015082700.php index b796908428..1d3cf8716f 100644 --- a/lib/upgradedb/postgres.2015082700.php +++ b/lib/upgradedb/postgres.2015082700.php @@ -21,13 +21,8 @@ * */ -$this->BeginTrans(); $this->Execute( "INSERT INTO uiconfig (section, var, value) VALUES(?, ?, ?)", array('userpanel', 'auth_type', '1') ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2015082700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2015090200.php b/lib/upgradedb/postgres.2015090200.php index bc141aed54..fc9c30644d 100644 --- a/lib/upgradedb/postgres.2015090200.php +++ b/lib/upgradedb/postgres.2015090200.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" CREATE TABLE plicbdoperators ( @@ -36,7 +35,3 @@ CREATE INDEX plicbdoperators_id_idx ON plicbdoperators (id); CREATE INDEX plicbdoperators_rpt_idx ON plicbdoperators (rpt); "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2015090200', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2015090300.php b/lib/upgradedb/postgres.2015090300.php index 527ae61d12..685e9ca269 100644 --- a/lib/upgradedb/postgres.2015090300.php +++ b/lib/upgradedb/postgres.2015090300.php @@ -26,7 +26,6 @@ $CONTACT_EMAIL = 8; -$this->BeginTrans(); $this->Execute(" CREATE VIEW customermailsview AS @@ -34,7 +33,3 @@ FROM customercontacts WHERE type = ? AND contact <> '' GROUP BY customerid", array($CONTACT_EMAIL)); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2015090300', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2015090400.php b/lib/upgradedb/postgres.2015090400.php index a797a66a68..eda1986399 100644 --- a/lib/upgradedb/postgres.2015090400.php +++ b/lib/upgradedb/postgres.2015090400.php @@ -24,13 +24,8 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" ALTER TABLE plicbdoperators ADD CONSTRAINT plicbdoperators_pkey PRIMARY KEY (id); DROP INDEX plicbdoperators_id_idx; "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2015090400', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2015091300.php b/lib/upgradedb/postgres.2015091300.php index 6b1edeeaa1..4ffee8d71a 100644 --- a/lib/upgradedb/postgres.2015091300.php +++ b/lib/upgradedb/postgres.2015091300.php @@ -24,13 +24,8 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" DROP TABLE plicbdlocalisation; DROP TABLE plicbdoperators; "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2015091300', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2015100100.php b/lib/upgradedb/postgres.2015100100.php index 787bdd3d8c..ed9d3e79c5 100644 --- a/lib/upgradedb/postgres.2015100100.php +++ b/lib/upgradedb/postgres.2015100100.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE users ALTER COLUMN rights TYPE text"); @@ -83,7 +82,3 @@ $this->Execute("UPDATE users SET rights = ? WHERE id = ?", array(implode(',', $rights), $user['id'])); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2015100100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2015100101.php b/lib/upgradedb/postgres.2015100101.php index e10a7b14ef..b2c0053f32 100644 --- a/lib/upgradedb/postgres.2015100101.php +++ b/lib/upgradedb/postgres.2015100101.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE messageitems ADD COLUMN externalmsgid smallint DEFAULT 0 NOT NULL;"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2015100101', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2015110600.php b/lib/upgradedb/postgres.2015110600.php index e8f440de91..2682e30332 100644 --- a/lib/upgradedb/postgres.2015110600.php +++ b/lib/upgradedb/postgres.2015110600.php @@ -24,13 +24,8 @@ define('EMAIL', 8); define('EMAIL_INVOICE', 16); -$this->BeginTrans(); $this->Execute( "UPDATE customercontacts SET type = ? WHERE customerid IN (SELECT id FROM customers WHERE einvoice = 1 AND invoicenotice = 1) AND (type & ?) > 0", array(EMAIL | EMAIL_INVOICE, EMAIL) ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2015110600', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2015111300.php b/lib/upgradedb/postgres.2015111300.php index 12e81b7217..4f02f5c14a 100644 --- a/lib/upgradedb/postgres.2015111300.php +++ b/lib/upgradedb/postgres.2015111300.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" ALTER TABLE records ADD COLUMN disabled boolean DEFAULT '0'; @@ -35,7 +34,3 @@ ); CREATE INDEX domainidmetaindex ON domainmetadata (domain_id); "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2015111300', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2015111800.php b/lib/upgradedb/postgres.2015111800.php index 13e3a41719..0cfd331e4a 100644 --- a/lib/upgradedb/postgres.2015111800.php +++ b/lib/upgradedb/postgres.2015111800.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE events ADD COLUMN type smallint NOT NULL DEFAULT 1"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2015111800', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2015111900.php b/lib/upgradedb/postgres.2015111900.php index 37faeb2a98..dfd90b5dc2 100644 --- a/lib/upgradedb/postgres.2015111900.php +++ b/lib/upgradedb/postgres.2015111900.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE nodesessions ADD COLUMN type smallint NOT NULL DEFAULT 0"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2015111900', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2015112000.php b/lib/upgradedb/postgres.2015112000.php index 10d7fce158..93972ce8db 100644 --- a/lib/upgradedb/postgres.2015112000.php +++ b/lib/upgradedb/postgres.2015112000.php @@ -22,10 +22,7 @@ */ -$this->BeginTrans(); $this->Execute("ALTER TABLE events ADD nodeid integer DEFAULT NULL; CREATE INDEX nodeid_idx ON events (nodeid); ALTER TABLE events ADD CONSTRAINT events_nodeid_fkey FOREIGN KEY (nodeid) REFERENCES nodes (id) ON DELETE SET NULL ON UPDATE CASCADE;"); -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2015112000', 'dbversion')); -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2015112001.php b/lib/upgradedb/postgres.2015112001.php index caa8ae1622..fc5f531543 100644 --- a/lib/upgradedb/postgres.2015112001.php +++ b/lib/upgradedb/postgres.2015112001.php @@ -22,7 +22,4 @@ */ -$this->BeginTrans(); $this->Execute("ALTER TABLE rtnotes ADD COLUMN type smallint NOT NULL DEFAULT 1"); -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2015112001', 'dbversion')); -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2015120200.php b/lib/upgradedb/postgres.2015120200.php index 0144e9866b..27f2c5bafa 100644 --- a/lib/upgradedb/postgres.2015120200.php +++ b/lib/upgradedb/postgres.2015120200.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("DROP VIEW vnodes; DROP VIEW vmacs; DROP VIEW IF EXISTS vnetworks"); $this->Execute(" @@ -46,7 +45,3 @@ LEFT JOIN hosts h ON (h.id = ne.hostid) WHERE no.ipaddr = 0 AND no.ipaddr_pub = 0; "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2015120200', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2015120201.php b/lib/upgradedb/postgres.2015120201.php index f033ef1217..682716c79f 100644 --- a/lib/upgradedb/postgres.2015120201.php +++ b/lib/upgradedb/postgres.2015120201.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("DROP VIEW vnodes; DROP VIEW vmacs;"); $this->Execute(" @@ -38,7 +37,3 @@ JOIN macs m ON (n.id = m.nodeid) WHERE n.ipaddr <> 0 OR n.ipaddr_pub <> 0; "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2015120201', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2015120202.php b/lib/upgradedb/postgres.2015120202.php index f19c7db1d0..e9a20ceb4c 100644 --- a/lib/upgradedb/postgres.2015120202.php +++ b/lib/upgradedb/postgres.2015120202.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("DROP VIEW vnetworks;"); $this->Execute(" @@ -33,7 +32,3 @@ LEFT JOIN hosts h ON (h.id = ne.hostid) WHERE no.ipaddr = 0 AND no.ipaddr_pub = 0; "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2015120202', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2015120800.php b/lib/upgradedb/postgres.2015120800.php index 6830706ebb..edfb3cd29a 100644 --- a/lib/upgradedb/postgres.2015120800.php +++ b/lib/upgradedb/postgres.2015120800.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("INSERT INTO uiconfig (section, var, value) VALUES(?, ?, ?)", array('phpui', 'event_max_userlist_size', '0')); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2015120800', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2015120900.php b/lib/upgradedb/postgres.2015120900.php index 5c3b13a594..dd38c90da0 100644 --- a/lib/upgradedb/postgres.2015120900.php +++ b/lib/upgradedb/postgres.2015120900.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("INSERT INTO uiconfig (section, var, value) VALUES(?, ?, ?)", array('invoices', 'customer_bankaccount', '0')); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2015120900', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2015120901.php b/lib/upgradedb/postgres.2015120901.php index 8328b62965..ecdf0c164f 100644 --- a/lib/upgradedb/postgres.2015120901.php +++ b/lib/upgradedb/postgres.2015120901.php @@ -24,7 +24,4 @@ * @author Maciej_Wawryk */ -$this->BeginTrans(); $this->Execute("ALTER TABLE documents ADD COLUMN cancelled smallint NOT NULL DEFAULT 0"); -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2015120901', 'dbversion')); -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2015121100.php b/lib/upgradedb/postgres.2015121100.php index fc6e1b49f1..8988a6201e 100644 --- a/lib/upgradedb/postgres.2015121100.php +++ b/lib/upgradedb/postgres.2015121100.php @@ -24,7 +24,4 @@ * @author Maciej_Wawryk */ -$this->BeginTrans(); $this->Execute("ALTER TABLE cashsources ADD COLUMN deleted smallint NOT NULL DEFAULT 0"); -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2015121100', 'dbversion')); -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2015121800.php b/lib/upgradedb/postgres.2015121800.php index 5a95396094..98f25dd3d9 100644 --- a/lib/upgradedb/postgres.2015121800.php +++ b/lib/upgradedb/postgres.2015121800.php @@ -24,7 +24,6 @@ * @author Maciej_Wawryk */ -$this->BeginTrans(); $this->Execute(" CREATE SEQUENCE usergroups_id_seq; @@ -47,7 +46,3 @@ ); CREATE INDEX userassignments_userid_idx ON userassignments (userid) "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2015121800', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2015122200.php b/lib/upgradedb/postgres.2015122200.php index 578ab8145c..352e55d11e 100644 --- a/lib/upgradedb/postgres.2015122200.php +++ b/lib/upgradedb/postgres.2015122200.php @@ -44,7 +44,6 @@ function parse_address_2015122200($address) return $res; } -$this->BeginTrans(); $this->Execute(" DROP VIEW customersview; @@ -126,7 +125,3 @@ function parse_address_2015122200($address) FROM customers c WHERE c.type < 2; "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2015122200', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2015122300.php b/lib/upgradedb/postgres.2015122300.php index 2c48ba8f47..03abcb72e6 100644 --- a/lib/upgradedb/postgres.2015122300.php +++ b/lib/upgradedb/postgres.2015122300.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" DROP VIEW customerview; @@ -69,7 +68,3 @@ FROM customers c WHERE c.type < 2; "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2015122300', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2015122301.php b/lib/upgradedb/postgres.2015122301.php index 1bb489a401..8c0ec93140 100644 --- a/lib/upgradedb/postgres.2015122301.php +++ b/lib/upgradedb/postgres.2015122301.php @@ -24,7 +24,6 @@ * @author Maciej_Wawryk */ -$this->BeginTrans(); $this->Execute(" CREATE SEQUENCE passwdhistory_id_seq; @@ -38,7 +37,3 @@ "); $this->Execute("INSERT INTO uiconfig (section, var, value) VALUES(?, ?, ?)", array('phpui', 'passwordhistory', 6)); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2015122301', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2016011200.php b/lib/upgradedb/postgres.2016011200.php index 5476372a89..e7675ca099 100644 --- a/lib/upgradedb/postgres.2016011200.php +++ b/lib/upgradedb/postgres.2016011200.php @@ -21,13 +21,8 @@ * */ -$this->BeginTrans(); $this->Execute( "UPDATE customercontacts SET type = ((type & ?) | ?) WHERE (type & ?) > 0", array(~64, 16384, 64) ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016011200', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2016011800.php b/lib/upgradedb/postgres.2016011800.php index ed83e1e9d3..427056b1be 100644 --- a/lib/upgradedb/postgres.2016011800.php +++ b/lib/upgradedb/postgres.2016011800.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE uiconfig ADD COLUMN type smallint NOT NULL DEFAULT 0"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016011800', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2016011900.php b/lib/upgradedb/postgres.2016011900.php index 57616c9b11..bc2f585083 100644 --- a/lib/upgradedb/postgres.2016011900.php +++ b/lib/upgradedb/postgres.2016011900.php @@ -21,12 +21,7 @@ * */ -$this->BeginTrans(); define('CONFIG_TYPE_MARGINS_2016011900', 6); $this->Execute("INSERT INTO uiconfig (section, var, value, type) VALUES('phpui', 'document_margins', '10,5,15,5', ?)", array(CONFIG_TYPE_MARGINS_2016011900)); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016011900', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2016012500.php b/lib/upgradedb/postgres.2016012500.php index 7fc7ced774..e38674bddc 100644 --- a/lib/upgradedb/postgres.2016012500.php +++ b/lib/upgradedb/postgres.2016012500.php @@ -21,14 +21,9 @@ * */ -$this->BeginTrans(); define('CONFIG_TYPE_MAIL_BACKEND_2016012500', 9); define('CONFIG_TYPE_MAIL_SECURE_2016012500', 10); $this->Execute("INSERT INTO uiconfig (section, var, value, type) VALUES('mail', 'backend', 'pear', ?)", array(CONFIG_TYPE_MAIL_BACKEND_2016012500)); $this->Execute("INSERT INTO uiconfig (section, var, value, type) VALUES('mail', 'smtp_secure', 'ssl', ?)", array(CONFIG_TYPE_MAIL_SECURE_2016012500)); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016012500', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2016012501.php b/lib/upgradedb/postgres.2016012501.php index 6b93a632a9..b61b4eae5c 100644 --- a/lib/upgradedb/postgres.2016012501.php +++ b/lib/upgradedb/postgres.2016012501.php @@ -21,12 +21,7 @@ * */ -$this->BeginTrans(); define('CONFIG_TYPE_DATE_FORMAT_2016012501', 11); $this->Execute("INSERT INTO uiconfig (section, var, value, type) VALUES('payments', 'date_format', '%Y/%m/%d', ?)", array(CONFIG_TYPE_DATE_FORMAT_2016012501)); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016012501', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2016012600.php b/lib/upgradedb/postgres.2016012600.php index 2525807d01..dc0243c1f8 100644 --- a/lib/upgradedb/postgres.2016012600.php +++ b/lib/upgradedb/postgres.2016012600.php @@ -21,12 +21,7 @@ * */ -$this->BeginTrans(); define('CONFIG_TYPE_POSITIVE_INTEGER_2016012600', 2); $this->Execute("INSERT INTO uiconfig (section, var, value, type) VALUES('phpui', 'quicksearch_limit', '15', ?)", array(CONFIG_TYPE_POSITIVE_INTEGER_2016012600)); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016012600', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2016012800.php b/lib/upgradedb/postgres.2016012800.php index 15c86c8a82..575ed006ac 100644 --- a/lib/upgradedb/postgres.2016012800.php +++ b/lib/upgradedb/postgres.2016012800.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE invoicecontents ALTER COLUMN value TYPE numeric(12, 5)"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016012800', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2016020200.php b/lib/upgradedb/postgres.2016020200.php index ccb6df36c7..8dbe0393cd 100644 --- a/lib/upgradedb/postgres.2016020200.php +++ b/lib/upgradedb/postgres.2016020200.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("INSERT INTO uiconfig (section, var, value) VALUES('payments', 'default_unit_name', ?)", array('pcs.')); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016020200', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2016020300.php b/lib/upgradedb/postgres.2016020300.php index 45cfde5a30..4376b9896b 100644 --- a/lib/upgradedb/postgres.2016020300.php +++ b/lib/upgradedb/postgres.2016020300.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE users ADD COLUMN settings TEXT NOT NULL DEFAULT ''"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016020300', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2016020500.php b/lib/upgradedb/postgres.2016020500.php index 8b11f73dc7..f8a59dda0b 100644 --- a/lib/upgradedb/postgres.2016020500.php +++ b/lib/upgradedb/postgres.2016020500.php @@ -21,12 +21,7 @@ * */ -$this->BeginTrans(); define('CONFIG_TYPE_BOOLEAN_2016020500', 1); $this->Execute("INSERT INTO uiconfig (section, var, value, type) VALUES('phpui', 'helpdesk_notify', 'false', ?)", array(CONFIG_TYPE_BOOLEAN_2016020500)); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016020500', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2016020501.php b/lib/upgradedb/postgres.2016020501.php index 860547d7a7..d2bb88ba02 100644 --- a/lib/upgradedb/postgres.2016020501.php +++ b/lib/upgradedb/postgres.2016020501.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE invprojects ADD COLUMN divisionid integer NULL DEFAULT NULL"); $this->Execute("ALTER TABLE invprojects ADD CONSTRAINT invprojects_divisions_fkey @@ -29,7 +28,3 @@ $this->Execute("ALTER TABLE netnodes ADD COLUMN divisionid integer NULL DEFAULT NULL"); $this->Execute("ALTER TABLE netnodes ADD CONSTRAINT netnodes_divisions_fkey FOREIGN KEY (divisionid) REFERENCES divisions (id) ON DELETE SET NULL ON UPDATE CASCADE"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016020501', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2016030700.php b/lib/upgradedb/postgres.2016030700.php index 01054ccb9a..a056e912b3 100644 --- a/lib/upgradedb/postgres.2016030700.php +++ b/lib/upgradedb/postgres.2016030700.php @@ -26,12 +26,7 @@ */ -$this->BeginTrans(); define('CONFIG_TYPE_BOOLEAN_2016030700', 1); $this->Execute("INSERT INTO uiconfig (section, var, value, type) VALUES('phpui', 'cache_documents', 'false', ?)", array(CONFIG_TYPE_BOOLEAN_2016030700)); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016030700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2016031400.php b/lib/upgradedb/postgres.2016031400.php index 93afd03174..779b512f2a 100644 --- a/lib/upgradedb/postgres.2016031400.php +++ b/lib/upgradedb/postgres.2016031400.php @@ -21,11 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE tariffs ADD COLUMN numberplanid integer DEFAULT NULL REFERENCES numberplans (id) ON DELETE CASCADE ON UPDATE CASCADE"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016031400', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2016031800.php b/lib/upgradedb/postgres.2016031800.php index 9cba690ac5..d305f14d3a 100644 --- a/lib/upgradedb/postgres.2016031800.php +++ b/lib/upgradedb/postgres.2016031800.php @@ -21,11 +21,7 @@ * */ -$this->BeginTrans(); define('CONFIG_TYPE_BOOLEAN_2016031800', 1); $this->Execute("INSERT INTO uiconfig (section, var, value, type) VALUES('phpui', 'quicksearch_autosubmit', 'true', ?)", array(CONFIG_TYPE_BOOLEAN_2016031800)); -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016031800', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2016031900.php b/lib/upgradedb/postgres.2016031900.php index 222bb5a3f6..0b7c68c1c1 100644 --- a/lib/upgradedb/postgres.2016031900.php +++ b/lib/upgradedb/postgres.2016031900.php @@ -21,11 +21,7 @@ * */ -$this->BeginTrans(); define('CONFIG_TYPE_POSITIVE_INTEGER_2016031900', 2); $this->Execute("INSERT INTO uiconfig (section, var, value, type) VALUES('phpui', 'ping_type', '1', ?)", array(CONFIG_TYPE_POSITIVE_INTEGER_2016031900)); -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016031900', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2016032100.php b/lib/upgradedb/postgres.2016032100.php index 5356fdbc42..df82096595 100644 --- a/lib/upgradedb/postgres.2016032100.php +++ b/lib/upgradedb/postgres.2016032100.php @@ -21,11 +21,7 @@ * */ -$this->BeginTrans(); define('CONFIG_TYPE_NONE_2016032100', 7); $this->Execute("INSERT INTO uiconfig (section, var, value, type) VALUES('phpui', 'default_teryt_city', 'false', ?)", array(CONFIG_TYPE_NONE_2016032100)); -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016032100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2016032500.php b/lib/upgradedb/postgres.2016032500.php index 68242e27de..c056343fa1 100644 --- a/lib/upgradedb/postgres.2016032500.php +++ b/lib/upgradedb/postgres.2016032500.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); define('CONFIG_TYPE_NONE_2016032500', 7); define('CONFIG_TYPE_POSITIVE_INTEGER_2016032500', 2); @@ -29,7 +28,3 @@ $this->Execute("INSERT INTO uiconfig (section, var, value, type) VALUES('phpui', 'default_autosuggest_placement', 'bottom', ?)", array(CONFIG_TYPE_NONE_2016032500)); $this->Execute("INSERT INTO uiconfig (section, var, value, type) VALUES('phpui', 'autosuggest_max_length', '40', ?)", array(CONFIG_TYPE_POSITIVE_INTEGER_2016032500)); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016032500', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2016033100.php b/lib/upgradedb/postgres.2016033100.php index 745a79dfd8..8507cb2a8d 100644 --- a/lib/upgradedb/postgres.2016033100.php +++ b/lib/upgradedb/postgres.2016033100.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("DROP VIEW vnetworks"); @@ -34,7 +33,3 @@ LEFT JOIN networks ne ON (ne.id = no.netid) LEFT JOIN hosts h ON (h.id = ne.hostid) WHERE no.ipaddr = 0 AND no.ipaddr_pub = 0;"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016033100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2016040700.php b/lib/upgradedb/postgres.2016040700.php index 1b55358221..c21347bac0 100644 --- a/lib/upgradedb/postgres.2016040700.php +++ b/lib/upgradedb/postgres.2016040700.php @@ -23,7 +23,6 @@ define('CONTACT_EMAIL', 8); -$this->BeginTrans(); $this->Execute("DROP VIEW customermailsview"); $this->Execute("CREATE VIEW customermailsview AS @@ -31,6 +30,3 @@ FROM customercontacts WHERE type = ? AND contact <> '' GROUP BY customerid", array(CONTACT_EMAIL)); -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016040700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2016041900.php b/lib/upgradedb/postgres.2016041900.php index beb953b938..2611e5f655 100644 --- a/lib/upgradedb/postgres.2016041900.php +++ b/lib/upgradedb/postgres.2016041900.php @@ -23,12 +23,8 @@ define('CONFIG_TYPE_NONE_2016041900', 7); -$this->BeginTrans(); $this->Execute( "INSERT INTO uiconfig (section, var, value, type) VALUES('phpui', 'event_usergroup_selection_type', 'update', ?)", array(CONFIG_TYPE_NONE_2016041900) ); -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016041900', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2016051000.php b/lib/upgradedb/postgres.2016051000.php index 09e7f28643..baf4b6263f 100644 --- a/lib/upgradedb/postgres.2016051000.php +++ b/lib/upgradedb/postgres.2016051000.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE events ADD COLUMN creationdate integer DEFAULT 0 NOT NULL"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016051000', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2016053000.php b/lib/upgradedb/postgres.2016053000.php index 3942205a60..d65d4fc96e 100644 --- a/lib/upgradedb/postgres.2016053000.php +++ b/lib/upgradedb/postgres.2016053000.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" CREATE SEQUENCE voip_prefixes_id_seq; @@ -94,7 +93,3 @@ PRIMARY KEY (id) ); "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016053000', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2016060600.php b/lib/upgradedb/postgres.2016060600.php index 141e32be6a..507a4319ac 100644 --- a/lib/upgradedb/postgres.2016060600.php +++ b/lib/upgradedb/postgres.2016060600.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE voipaccounts ADD COLUMN balance numeric(12,5) NOT NULL DEFAULT 0"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016060600', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2016060800.php b/lib/upgradedb/postgres.2016060800.php index 2f8e72a875..48afc11144 100644 --- a/lib/upgradedb/postgres.2016060800.php +++ b/lib/upgradedb/postgres.2016060800.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" ALTER TABLE voip_cdr ALTER COLUMN status TYPE smallint USING type::smallint; @@ -69,7 +68,3 @@ define('CONFIG_TYPE_POSITIVE_INTEGER_2016060800', 2); $this->Execute("INSERT INTO uiconfig (section, var, value, type) VALUES('phpui', 'billinglist_pagelimit', '100', ?)", array(CONFIG_TYPE_POSITIVE_INTEGER_2016060800)); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016060800', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2016062300.php b/lib/upgradedb/postgres.2016062300.php index 6419584f95..bc32fbf78c 100644 --- a/lib/upgradedb/postgres.2016062300.php +++ b/lib/upgradedb/postgres.2016062300.php @@ -21,11 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE voip_cdr ALTER COLUMN caller_prefix_group TYPE varchar(100)"); $this->Execute("ALTER TABLE voip_cdr ALTER COLUMN callee_prefix_group TYPE varchar(100)"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016062300', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2016062400.php b/lib/upgradedb/postgres.2016062400.php index 0f6ccc3adf..6c1d81f2da 100644 --- a/lib/upgradedb/postgres.2016062400.php +++ b/lib/upgradedb/postgres.2016062400.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" CREATE TABLE voip_emergency_numbers ( @@ -33,7 +32,3 @@ ); CREATE INDEX voip_emergency_numbers_number_idx ON voip_emergency_numbers (number) "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016062400', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2016062401.php b/lib/upgradedb/postgres.2016062401.php index 3ce230f33e..608c30bf8d 100644 --- a/lib/upgradedb/postgres.2016062401.php +++ b/lib/upgradedb/postgres.2016062401.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("DROP SEQUENCE IF EXISTS voip_rules_id_seq; CREATE SEQUENCE voip_rules_id_seq; @@ -57,7 +56,3 @@ REFERENCES voip_rules (id) ON DELETE CASCADE ON UPDATE CASCADE, PRIMARY KEY (id) );"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016062401', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2016062800.php b/lib/upgradedb/postgres.2016062800.php index 3362111b89..3d84b5fcaf 100644 --- a/lib/upgradedb/postgres.2016062800.php +++ b/lib/upgradedb/postgres.2016062800.php @@ -21,11 +21,6 @@ * */ -$this->BeginTrans(); define('CONFIG_TYPE_POSITIVE_INTEGER_2016062800', 2); $this->Execute("INSERT INTO uiconfig (section, var, value, type) VALUES('voip', 'default_cost_limit', '200', ?)", array(CONFIG_TYPE_POSITIVE_INTEGER_2016062800)); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016062800', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2016070100.php b/lib/upgradedb/postgres.2016070100.php index 28c0452844..f24a97c547 100644 --- a/lib/upgradedb/postgres.2016070100.php +++ b/lib/upgradedb/postgres.2016070100.php @@ -21,9 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE voipaccounts ADD COLUMN cost_limit numeric(12,2) NULL DEFAULT NULL"); -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016070100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2016070500.php b/lib/upgradedb/postgres.2016070500.php index 128891e4c2..8064397d99 100644 --- a/lib/upgradedb/postgres.2016070500.php +++ b/lib/upgradedb/postgres.2016070500.php @@ -21,9 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE voip_cdr ADD UNIQUE (uniqueid)"); -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016070500', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2016070700.php b/lib/upgradedb/postgres.2016070700.php index 6fae84805f..d93e24b19a 100644 --- a/lib/upgradedb/postgres.2016070700.php +++ b/lib/upgradedb/postgres.2016070700.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("CREATE SEQUENCE tarifftags_id_seq;"); @@ -46,8 +45,3 @@ );"); $this->Execute("CREATE INDEX tariffassignments_tarifftagid_idx ON tariffassignments (tarifftagid);"); - - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016070700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2016071200.php b/lib/upgradedb/postgres.2016071200.php index ad5cf38a9f..7fc3c52cb2 100644 --- a/lib/upgradedb/postgres.2016071200.php +++ b/lib/upgradedb/postgres.2016071200.php @@ -21,11 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE events ADD COLUMN closeduserid integer DEFAULT 0 NOT NULL"); $this->Execute("ALTER TABLE events ADD COLUMN closeddate integer DEFAULT 0 NOT NULL"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016071200', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2016071500.php b/lib/upgradedb/postgres.2016071500.php index dd663cf821..bc13d71a44 100644 --- a/lib/upgradedb/postgres.2016071500.php +++ b/lib/upgradedb/postgres.2016071500.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("INSERT INTO uiconfig (section, var, value) VALUES ('phpui', 'settings_timeout', '28800')"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016071500', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2016071900.php b/lib/upgradedb/postgres.2016071900.php index dddcc3de8f..7eb4bb34c8 100644 --- a/lib/upgradedb/postgres.2016071900.php +++ b/lib/upgradedb/postgres.2016071900.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE cashimport ALTER COLUMN description TYPE varchar(256)"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016071900', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2016072000.php b/lib/upgradedb/postgres.2016072000.php index 77dbaa596a..5955e700a7 100644 --- a/lib/upgradedb/postgres.2016072000.php +++ b/lib/upgradedb/postgres.2016072000.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE cashimport ALTER COLUMN description TYPE text"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016072000', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2016080500.php b/lib/upgradedb/postgres.2016080500.php index 7552fbe83d..418d1e8aa3 100644 --- a/lib/upgradedb/postgres.2016080500.php +++ b/lib/upgradedb/postgres.2016080500.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE tariffs ADD COLUMN voip_tariff_id integer DEFAULT NULL; ALTER TABLE tariffs ADD COLUMN voip_tariff_rule_id integer DEFAULT NULL; @@ -83,7 +82,4 @@ PRIMARY KEY(id), UNIQUE(voip_account_id, rule_id) ); - - UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016080500', 'dbversion')); - -$this->CommitTrans(); +"); diff --git a/lib/upgradedb/postgres.2016080800.php b/lib/upgradedb/postgres.2016080800.php index 50f1c7e4e0..6d8af133f7 100644 --- a/lib/upgradedb/postgres.2016080800.php +++ b/lib/upgradedb/postgres.2016080800.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE voip_rules RENAME TO voip_rule_groups; ALTER SEQUENCE voip_rules_id_seq RENAME TO voip_rule_groups_id_seq; @@ -32,7 +31,4 @@ ALTER TABLE voip_rules RENAME ruleid TO rule_group_id; ALTER TABLE voip_rules RENAME groupid TO prefix_group_id; ALTER TABLE voip_rules RENAME rule_settings TO settings; - - UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016080800', 'dbversion')); - -$this->CommitTrans(); +"); diff --git a/lib/upgradedb/postgres.2016080801.php b/lib/upgradedb/postgres.2016080801.php index 2ee106e398..4c747ec9f0 100644 --- a/lib/upgradedb/postgres.2016080801.php +++ b/lib/upgradedb/postgres.2016080801.php @@ -21,11 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE voip_rules ALTER COLUMN id SET DEFAULT nextval('voip_rules_id_seq'::text); - ALTER TABLE voip_rule_groups ALTER COLUMN id SET DEFAULT nextval('voip_rule_groups_id_seq'::text); - - UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016080801', 'dbversion')); - -$this->CommitTrans(); + ALTER TABLE voip_rule_groups ALTER COLUMN id SET DEFAULT nextval('voip_rule_groups_id_seq'::text);"); diff --git a/lib/upgradedb/postgres.2016082400.php b/lib/upgradedb/postgres.2016082400.php index 106388196b..8baf89ccf4 100644 --- a/lib/upgradedb/postgres.2016082400.php +++ b/lib/upgradedb/postgres.2016082400.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE cashimport ALTER COLUMN customer TYPE text"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016082400', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2016082500.php b/lib/upgradedb/postgres.2016082500.php index c231a5ff97..d69e8f1a14 100644 --- a/lib/upgradedb/postgres.2016082500.php +++ b/lib/upgradedb/postgres.2016082500.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE rtmessages ADD COLUMN type smallint DEFAULT 0 NOT NULL"); @@ -38,7 +37,3 @@ $this->Execute("DROP TABLE rtnotes"); $this->Execute("DROP SEQUENCE rtnotes_id_seq"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016082500', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2016082600.php b/lib/upgradedb/postgres.2016082600.php index 20543cde18..871df8caf7 100644 --- a/lib/upgradedb/postgres.2016082600.php +++ b/lib/upgradedb/postgres.2016082600.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" CREATE SEQUENCE documentattachments_id_seq; @@ -55,7 +54,3 @@ ALTER TABLE documentcontents DROP COLUMN contenttype; ALTER TABLE documentcontents DROP COLUMN md5sum; "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016082600', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2016082900.php b/lib/upgradedb/postgres.2016082900.php index 6e6ab5ec91..804a8f456d 100644 --- a/lib/upgradedb/postgres.2016082900.php +++ b/lib/upgradedb/postgres.2016082900.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("CREATE SEQUENCE voip_numbers_id_seq; CREATE TABLE voip_numbers ( @@ -36,7 +35,3 @@ SELECT id, phone FROM voipaccounts;"); $this->Execute("ALTER TABLE voipaccounts DROP COLUMN phone;"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016082900', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2016090700.php b/lib/upgradedb/postgres.2016090700.php index 3326bb08d2..a1374af26c 100644 --- a/lib/upgradedb/postgres.2016090700.php +++ b/lib/upgradedb/postgres.2016090700.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("CREATE SEQUENCE voip_pool_numbers_id_seq; CREATE TABLE voip_pool_numbers ( @@ -34,7 +33,3 @@ PRIMARY KEY (id), UNIQUE (name)); "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016090700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2016091300.php b/lib/upgradedb/postgres.2016091300.php index 1d44245943..9c3a43b442 100644 --- a/lib/upgradedb/postgres.2016091300.php +++ b/lib/upgradedb/postgres.2016091300.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("DROP VIEW vnetworks"); @@ -36,7 +35,3 @@ LEFT JOIN hosts h ON (h.id = ne.hostid) WHERE no.ipaddr = 0 AND no.ipaddr_pub = 0 "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016091300', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2016092100.php b/lib/upgradedb/postgres.2016092100.php index 03ece1ff44..8b9f6eba66 100644 --- a/lib/upgradedb/postgres.2016092100.php +++ b/lib/upgradedb/postgres.2016092100.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE users ADD COLUMN persistentsettings text NOT NULL DEFAULT ''"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016092100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2016092600.php b/lib/upgradedb/postgres.2016092600.php index 7c1a9262ef..ac85cbec79 100644 --- a/lib/upgradedb/postgres.2016092600.php +++ b/lib/upgradedb/postgres.2016092600.php @@ -21,13 +21,8 @@ * */ -$this->BeginTrans(); $this->Execute(" ALTER TABLE users DROP COLUMN swekey_id; ALTER TABLE users ADD CONSTRAINT users_login_key UNIQUE (login); "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016092600', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2016092900.php b/lib/upgradedb/postgres.2016092900.php index b9e02b978a..d65907bac6 100644 --- a/lib/upgradedb/postgres.2016092900.php +++ b/lib/upgradedb/postgres.2016092900.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE documents ADD COLUMN published smallint DEFAULT 0 NOT NULL"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016092900', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2016100500.php b/lib/upgradedb/postgres.2016100500.php index 6b1a86683d..f8027eb544 100644 --- a/lib/upgradedb/postgres.2016100500.php +++ b/lib/upgradedb/postgres.2016100500.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE voip_numbers ADD COLUMN \"index\" smallint"); @@ -44,7 +43,3 @@ } $this->Execute("ALTER TABLE voip_numbers ADD CONSTRAINT vn_uniq_index UNIQUE (voip_account_id, \"index\")"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016100500', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2016100600.php b/lib/upgradedb/postgres.2016100600.php index 7d486078f4..211acb7fd9 100644 --- a/lib/upgradedb/postgres.2016100600.php +++ b/lib/upgradedb/postgres.2016100600.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE voip_numbers RENAME COLUMN \"index\" TO number_index;"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016100600', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2016101000.php b/lib/upgradedb/postgres.2016101000.php index 224b1cd573..9fd0afae18 100644 --- a/lib/upgradedb/postgres.2016101000.php +++ b/lib/upgradedb/postgres.2016101000.php @@ -30,7 +30,6 @@ define('CONTACT_IM_YAHOO', 1024); define('CONTACT_IM_SKYPE', 2048); -$this->BeginTrans(); $this->Execute("DROP VIEW customermailsview"); @@ -64,7 +63,3 @@ } $this->Execute("DROP TABLE imessengers"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016101000', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2016101700.php b/lib/upgradedb/postgres.2016101700.php index e62825e4aa..7702ea74cf 100644 --- a/lib/upgradedb/postgres.2016101700.php +++ b/lib/upgradedb/postgres.2016101700.php @@ -21,11 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("INSERT INTO uiconfig (section, var, value) VALUES (?, ?, ?)", array('userpanel', 'show_confirmed_documents_only', 'false')); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016101700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2016101800.php b/lib/upgradedb/postgres.2016101800.php index 4b5f334ae2..6e289bdbc1 100644 --- a/lib/upgradedb/postgres.2016101800.php +++ b/lib/upgradedb/postgres.2016101800.php @@ -21,11 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("INSERT INTO uiconfig (section, var, value) VALUES (?, ?, ?)", array('userpanel', 'module_order', '')); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016101800', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2016102100.php b/lib/upgradedb/postgres.2016102100.php index 3d19b63eaa..e361737f5b 100644 --- a/lib/upgradedb/postgres.2016102100.php +++ b/lib/upgradedb/postgres.2016102100.php @@ -21,13 +21,8 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE netdevices ADD COLUMN ownerid integer NULL"); $this->Execute("ALTER TABLE netdevices ADD CONSTRAINT ownerid_fk FOREIGN KEY (ownerid) REFERENCES customers (id) ON DELETE SET NULL ON UPDATE CASCADE"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016102100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2016102500.php b/lib/upgradedb/postgres.2016102500.php index 96844b94ea..93bcbb601a 100644 --- a/lib/upgradedb/postgres.2016102500.php +++ b/lib/upgradedb/postgres.2016102500.php @@ -38,7 +38,6 @@ function splitNameToFirstAndLastName($users_before) return $users; } -$this->BeginTrans(); $this->Execute("ALTER TABLE users ADD COLUMN firstname varchar(64) NOT NULL DEFAULT ''"); $this->Execute("ALTER TABLE users ADD COLUMN lastname varchar(64) NOT NULL DEFAULT ''"); @@ -55,7 +54,3 @@ function splitNameToFirstAndLastName($users_before) $this->Execute("ALTER TABLE users DROP COLUMN name"); $this->Execute("CREATE VIEW vusers AS SELECT *, " . $this->Concat('firstname', "' '", 'lastname') . " AS name, " . $this->Concat('lastname', "' '", 'firstname') . " AS rname FROM users"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016102500', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2016110800.php b/lib/upgradedb/postgres.2016110800.php index 59d67f233f..39e73414ca 100644 --- a/lib/upgradedb/postgres.2016110800.php +++ b/lib/upgradedb/postgres.2016110800.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE voip_pool_numbers ADD COLUMN type smallint NOT NULL DEFAULT 1"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016110800', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2016112500.php b/lib/upgradedb/postgres.2016112500.php index 1bb8b20906..d1959295a9 100644 --- a/lib/upgradedb/postgres.2016112500.php +++ b/lib/upgradedb/postgres.2016112500.php @@ -21,12 +21,7 @@ * */ -$this->BeginTrans(); if (!$this->ResourceExists('voip_numbers_pkey', LMSDB::RESOURCE_TYPE_CONSTRAINT)) { $this->Execute("ALTER TABLE voip_numbers ADD PRIMARY KEY (id)"); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016112500', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2016112800.php b/lib/upgradedb/postgres.2016112800.php index 2c9ffe8f22..0f0724af75 100644 --- a/lib/upgradedb/postgres.2016112800.php +++ b/lib/upgradedb/postgres.2016112800.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("CREATE SEQUENCE voip_number_assignments_id_seq"); $this->Execute("CREATE TABLE voip_number_assignments ( @@ -30,7 +29,3 @@ assignment_id integer NOT NULL REFERENCES assignments (id) ON DELETE CASCADE ON UPDATE CASCADE, PRIMARY KEY (id)); "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016112800', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2016120600.php b/lib/upgradedb/postgres.2016120600.php index 3e1d4c6129..f51a5c4c0c 100644 --- a/lib/upgradedb/postgres.2016120600.php +++ b/lib/upgradedb/postgres.2016120600.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" ALTER TABLE divisions ADD COLUMN location_city integer DEFAULT NULL @@ -32,7 +31,3 @@ ALTER TABLE divisions ADD COLUMN location_flat varchar(32) DEFAULT NULL; ALTER TABLE divisions ADD COLUMN tax_office_code varchar(8) DEFAULT NULL; "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016120600', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2016121200.php b/lib/upgradedb/postgres.2016121200.php index edb796aa25..ba16fd0766 100644 --- a/lib/upgradedb/postgres.2016121200.php +++ b/lib/upgradedb/postgres.2016121200.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE documents ADD COLUMN cuserid integer NOT NULL DEFAULT 0"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016121200', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2016121400.php b/lib/upgradedb/postgres.2016121400.php index 32493f1d2a..1e4ffd9677 100644 --- a/lib/upgradedb/postgres.2016121400.php +++ b/lib/upgradedb/postgres.2016121400.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("CREATE SEQUENCE location_buildings_id_seq"); $this->Execute("CREATE TABLE location_buildings ( @@ -36,7 +35,3 @@ "); $this->Execute('CREATE INDEX location_cityid_index ON location_buildings (city_id);'); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016121400', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2016121401.php b/lib/upgradedb/postgres.2016121401.php index 6af3fa1c53..f669979e91 100644 --- a/lib/upgradedb/postgres.2016121401.php +++ b/lib/upgradedb/postgres.2016121401.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE location_buildings ADD COLUMN updated integer DEFAULT 0;"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016121401', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2016122100.php b/lib/upgradedb/postgres.2016122100.php index 9a23b517f2..720c72e405 100644 --- a/lib/upgradedb/postgres.2016122100.php +++ b/lib/upgradedb/postgres.2016122100.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE cashsources ADD COLUMN account varchar(48) NOT NULL DEFAULT ''"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2016122100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2017010900.php b/lib/upgradedb/postgres.2017010900.php index 41d6930d9c..46612baa14 100644 --- a/lib/upgradedb/postgres.2017010900.php +++ b/lib/upgradedb/postgres.2017010900.php @@ -21,13 +21,8 @@ * */ -$this->BeginTrans(); $this->Execute(" ALTER TABLE tariffs ADD COLUMN datefrom integer NOT NULL DEFAULT 0; ALTER TABLE tariffs ADD COLUMN dateto integer NOT NULL DEFAULT 0 "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017010900', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2017010901.php b/lib/upgradedb/postgres.2017010901.php index a8ca0e6afe..5329c9255b 100644 --- a/lib/upgradedb/postgres.2017010901.php +++ b/lib/upgradedb/postgres.2017010901.php @@ -21,13 +21,8 @@ * */ -$this->BeginTrans(); $this->Execute(" ALTER TABLE promotions ADD COLUMN datefrom integer NOT NULL DEFAULT 0; ALTER TABLE promotions ADD COLUMN dateto integer NOT NULL DEFAULT 0 "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017010901', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2017011300.php b/lib/upgradedb/postgres.2017011300.php index 8e2b3f6343..272520f8bd 100644 --- a/lib/upgradedb/postgres.2017011300.php +++ b/lib/upgradedb/postgres.2017011300.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("UPDATE uiconfig SET value = ? WHERE section = ? AND var = ?", array('tls', 'mail', 'smtp_secure')); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017011300', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2017012400.php b/lib/upgradedb/postgres.2017012400.php index 72de0c0b43..8ab16e087c 100644 --- a/lib/upgradedb/postgres.2017012400.php +++ b/lib/upgradedb/postgres.2017012400.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" DROP VIEW customerview; @@ -77,7 +76,3 @@ ALTER TABLE divisions ADD COLUMN rbe varchar(255) NOT NULL DEFAULT ''; ALTER TABLE divisions ADD COLUMN rbename varchar(255) NOT NULL DEFAULT ''; "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017012400', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2017013100.php b/lib/upgradedb/postgres.2017013100.php index e2adf72504..dd9cb7ddff 100644 --- a/lib/upgradedb/postgres.2017013100.php +++ b/lib/upgradedb/postgres.2017013100.php @@ -113,7 +113,6 @@ function moveTableLocation($DB, $table) define('LOCATION_ADDRESS_2017013100', 2); define('DEFAULT_LOCATION_ADDRESS_2017013100', 3); -$this->BeginTrans(); $this->Execute("DROP SEQUENCE IF EXISTS addresses_id_seq; CREATE SEQUENCE addresses_id_seq; @@ -569,7 +568,3 @@ function moveTableLocation($DB, $table) $this->Execute("DROP INDEX IF EXISTS netdevices_location_city_idx;"); $this->Execute("DROP INDEX IF EXISTS voipaccounts_location_street_idx;"); $this->Execute("DROP INDEX IF EXISTS voipaccounts_location_city_idx;"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017013100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2017013101.php b/lib/upgradedb/postgres.2017013101.php index c521e188f5..fa2cbe063d 100644 --- a/lib/upgradedb/postgres.2017013101.php +++ b/lib/upgradedb/postgres.2017013101.php @@ -22,7 +22,6 @@ */ -$this->BeginTrans(); $this->Execute("DROP VIEW IF EXISTS customerview;"); $this->Execute("DROP VIEW IF EXISTS contractorview;"); @@ -157,7 +156,3 @@ LEFT JOIN (SELECT nodeid, array_to_string(array_agg(mac), ',') AS mac FROM macs GROUP BY nodeid) m ON (n.id = m.nodeid) LEFT JOIN addresses a ON n.address_id = a.id WHERE n.ipaddr <> 0 OR n.ipaddr_pub <> 0;"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017013101', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2017020100.php b/lib/upgradedb/postgres.2017020100.php index 3cb382fa76..444c9b8211 100644 --- a/lib/upgradedb/postgres.2017020100.php +++ b/lib/upgradedb/postgres.2017020100.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" CREATE VIEW vdivisions AS @@ -30,7 +29,3 @@ (CASE WHEN a.house IS NULL THEN a.street ELSE (CASE WHEN a.flat IS NULL THEN a.street || ' ' || a.house ELSE a.street || ' ' || a.house || '/' || a.flat END) END) as address FROM divisions d JOIN addresses a ON a.id = d.address_id;"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017020100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2017020600.php b/lib/upgradedb/postgres.2017020600.php index 5df378e6ef..55c6fa8d5b 100644 --- a/lib/upgradedb/postgres.2017020600.php +++ b/lib/upgradedb/postgres.2017020600.php @@ -21,11 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE assignments ADD COLUMN address_id integer"); $this->Execute("ALTER TABLE assignments ADD CONSTRAINT address_id_fk FOREIGN KEY (address_id) REFERENCES addresses (id) ON DELETE SET NULL ON UPDATE CASCADE"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017020600', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2017021400.php b/lib/upgradedb/postgres.2017021400.php index 60ba0c7e32..e2a258583b 100644 --- a/lib/upgradedb/postgres.2017021400.php +++ b/lib/upgradedb/postgres.2017021400.php @@ -21,14 +21,9 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE documents ALTER COLUMN zip DROP NOT NULL;"); $this->Execute("ALTER TABLE documents ALTER COLUMN zip SET DEFAULT NULL;"); $this->Execute("ALTER TABLE documents ALTER COLUMN city DROP NOT NULL;"); $this->Execute("ALTER TABLE documents ALTER COLUMN city SET DEFAULT NULL;"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017021400', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2017022200.php b/lib/upgradedb/postgres.2017022200.php index c69217ed0a..718247d9a0 100644 --- a/lib/upgradedb/postgres.2017022200.php +++ b/lib/upgradedb/postgres.2017022200.php @@ -20,9 +20,3 @@ * USA. * */ - -$this->BeginTrans(); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017022200', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2017022700.php b/lib/upgradedb/postgres.2017022700.php index b5de6ce4df..bb2b72082b 100644 --- a/lib/upgradedb/postgres.2017022700.php +++ b/lib/upgradedb/postgres.2017022700.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $DEFAULTS = array( 'phpui' => array( @@ -37,7 +36,3 @@ ); } } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017022700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2017030100.php b/lib/upgradedb/postgres.2017030100.php index 9b6edb091e..521b1f847a 100644 --- a/lib/upgradedb/postgres.2017030100.php +++ b/lib/upgradedb/postgres.2017030100.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE documents ADD COLUMN recipient_address_id integer"); $this->Execute("ALTER TABLE documents ADD CONSTRAINT recipient_address_id_fk FOREIGN KEY (recipient_address_id) REFERENCES addresses (id) ON DELETE SET NULL ON UPDATE CASCADE"); @@ -31,7 +30,3 @@ $this->Execute("ALTER TABLE assignments ADD CONSTRAINT recipient_address_id_fk2 FOREIGN KEY (recipient_address_id) REFERENCES addresses (id) ON DELETE SET NULL ON UPDATE CASCADE"); $this->Execute("ALTER TABLE location_buildings DROP COLUMN flats"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017030100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2017030101.php b/lib/upgradedb/postgres.2017030101.php index 770efeb7b0..d12a4f2a49 100644 --- a/lib/upgradedb/postgres.2017030101.php +++ b/lib/upgradedb/postgres.2017030101.php @@ -21,11 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE voip_cdr RENAME COLUMN time_start_to_end TO totaltime"); $this->Execute("ALTER TABLE voip_cdr RENAME COLUMN time_answer_to_end TO billedtime"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017030101', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2017030300.php b/lib/upgradedb/postgres.2017030300.php index 70440a22c3..10da80e01b 100644 --- a/lib/upgradedb/postgres.2017030300.php +++ b/lib/upgradedb/postgres.2017030300.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE rtmessages ADD COLUMN phonefrom varchar(20) DEFAULT '' NOT NULL"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017030300', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2017030800.php b/lib/upgradedb/postgres.2017030800.php index 716c168f07..e25ec72d6f 100644 --- a/lib/upgradedb/postgres.2017030800.php +++ b/lib/upgradedb/postgres.2017030800.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" CREATE VIEW vaddresses AS @@ -137,7 +136,3 @@ LEFT JOIN vaddresses a ON n.address_id = a.id WHERE n.ipaddr <> 0 OR n.ipaddr_pub <> 0; "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017030800', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2017031000.php b/lib/upgradedb/postgres.2017031000.php index 78c35ff893..6f5cca1b4d 100644 --- a/lib/upgradedb/postgres.2017031000.php +++ b/lib/upgradedb/postgres.2017031000.php @@ -21,10 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE events ADD COLUMN ticketid integer DEFAULT NULL"); $this->Execute("ALTER TABLE events ADD CONSTRAINT event_ticketid_rttickets_id_fk FOREIGN KEY (ticketid) REFERENCES rttickets (id) ON DELETE SET NULL ON UPDATE CASCADE"); -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017031000', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2017031400.php b/lib/upgradedb/postgres.2017031400.php index 8df1ed1a78..8f8cfdd43b 100644 --- a/lib/upgradedb/postgres.2017031400.php +++ b/lib/upgradedb/postgres.2017031400.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("DROP VIEW IF EXISTS customerview;"); $this->Execute("DROP VIEW IF EXISTS contractorview;"); @@ -140,7 +139,3 @@ LEFT JOIN vaddresses a ON n.address_id = a.id WHERE n.ipaddr <> 0 OR n.ipaddr_pub <> 0; "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017031400', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2017031500.php b/lib/upgradedb/postgres.2017031500.php index 98e61bdcce..a754720766 100644 --- a/lib/upgradedb/postgres.2017031500.php +++ b/lib/upgradedb/postgres.2017031500.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" DROP VIEW IF EXISTS customerview; @@ -138,7 +137,3 @@ LEFT JOIN vaddresses a ON n.address_id = a.id WHERE n.ipaddr <> 0 OR n.ipaddr_pub <> 0; "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017031500', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2017031600.php b/lib/upgradedb/postgres.2017031600.php index de4f83105c..76ba54f470 100644 --- a/lib/upgradedb/postgres.2017031600.php +++ b/lib/upgradedb/postgres.2017031600.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" DROP VIEW IF EXISTS customerview; @@ -138,7 +137,3 @@ LEFT JOIN vaddresses a ON n.address_id = a.id WHERE n.ipaddr <> 0 OR n.ipaddr_pub <> 0; "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017031600', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2017032000.php b/lib/upgradedb/postgres.2017032000.php index 61724e61f2..0833d98e13 100644 --- a/lib/upgradedb/postgres.2017032000.php +++ b/lib/upgradedb/postgres.2017032000.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" DROP VIEW IF EXISTS customerview; @@ -145,7 +144,3 @@ FROM divisions d JOIN addresses a ON a.id = d.address_id; "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017032000', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2017032200.php b/lib/upgradedb/postgres.2017032200.php index 6b9a134a07..5525a55865 100644 --- a/lib/upgradedb/postgres.2017032200.php +++ b/lib/upgradedb/postgres.2017032200.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" DROP VIEW IF EXISTS customerview; @@ -75,7 +74,3 @@ LEFT JOIN vaddresses a2 ON ca2.address_id = a2.id WHERE c.type < 2; "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017032200', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2017040700.php b/lib/upgradedb/postgres.2017040700.php index 2cb65749d1..100921329d 100644 --- a/lib/upgradedb/postgres.2017040700.php +++ b/lib/upgradedb/postgres.2017040700.php @@ -21,11 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE zipcodes ALTER COLUMN id SET DEFAULT nextval('zipcodes_id_seq'::text)"); $this->Execute("SELECT setval('zipcodes_id_seq', MAX(id)) FROM zipcodes"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017040700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2017041800.php b/lib/upgradedb/postgres.2017041800.php index 00d5f109f0..2467dec2e2 100644 --- a/lib/upgradedb/postgres.2017041800.php +++ b/lib/upgradedb/postgres.2017041800.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" DROP VIEW IF EXISTS customerview; @@ -136,7 +135,3 @@ FROM divisions d JOIN addresses a ON a.id = d.address_id; "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017041800', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2017041801.php b/lib/upgradedb/postgres.2017041801.php index c53841c04a..5268305571 100644 --- a/lib/upgradedb/postgres.2017041801.php +++ b/lib/upgradedb/postgres.2017041801.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" DROP VIEW IF EXISTS customerview; @@ -78,7 +77,3 @@ LEFT JOIN vaddresses a2 ON ca2.address_id = a2.id WHERE c.type < 2; "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017041801', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2017042700.php b/lib/upgradedb/postgres.2017042700.php index 5d22df1245..3c62f28fdc 100644 --- a/lib/upgradedb/postgres.2017042700.php +++ b/lib/upgradedb/postgres.2017042700.php @@ -21,14 +21,9 @@ * */ -$this->BeginTrans(); $this->Execute(" ALTER TABLE tariffs ADD COLUMN cloud_limit integer DEFAULT NULL; ALTER TABLE tariffs ADD COLUMN quota_cloud_limit integer DEFAULT NULL; ALTER TABLE passwd ADD COLUMN quota_cloud integer DEFAULT 0 NOT NULL "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017042700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2017051200.php b/lib/upgradedb/postgres.2017051200.php index 3a5a9d59dd..c5daac487b 100644 --- a/lib/upgradedb/postgres.2017051200.php +++ b/lib/upgradedb/postgres.2017051200.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" DROP VIEW IF EXISTS customerview; @@ -138,7 +137,3 @@ FROM divisions d JOIN vaddresses a ON a.id = d.address_id; "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017051200', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2017051201.php b/lib/upgradedb/postgres.2017051201.php index f1bda0da77..f387c30767 100644 --- a/lib/upgradedb/postgres.2017051201.php +++ b/lib/upgradedb/postgres.2017051201.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" DROP VIEW IF EXISTS customerview; @@ -84,7 +83,3 @@ LEFT JOIN vaddresses a2 ON ca2.address_id = a2.id WHERE c.type < 2; "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017051201', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2017061600.php b/lib/upgradedb/postgres.2017061600.php index 51963ac47e..2bb9bee50c 100644 --- a/lib/upgradedb/postgres.2017061600.php +++ b/lib/upgradedb/postgres.2017061600.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" CREATE SEQUENCE rtqueuecategories_id_seq; @@ -32,7 +31,3 @@ PRIMARY KEY (id) ); "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017061600', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2017061900.php b/lib/upgradedb/postgres.2017061900.php index aafb46722a..aa4210be0a 100644 --- a/lib/upgradedb/postgres.2017061900.php +++ b/lib/upgradedb/postgres.2017061900.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" DROP VIEW IF EXISTS customeraddressview; @@ -45,7 +44,3 @@ LEFT JOIN vaddresses a2 ON ca2.address_id = a2.id WHERE c.type < 2; "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017061900', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2017062000.php b/lib/upgradedb/postgres.2017062000.php index 91e76f9bdc..b4f06b0a5e 100644 --- a/lib/upgradedb/postgres.2017062000.php +++ b/lib/upgradedb/postgres.2017062000.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" DROP VIEW customerview; @@ -86,7 +85,3 @@ LEFT JOIN vaddresses a2 ON ca2.address_id = a2.id WHERE c.type < 2 "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017062000', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2017063000.php b/lib/upgradedb/postgres.2017063000.php index c88dedbd67..9fd35ed447 100644 --- a/lib/upgradedb/postgres.2017063000.php +++ b/lib/upgradedb/postgres.2017063000.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $ident_lengths = array( 'location_states' => 2, @@ -37,7 +36,3 @@ array($length, $length) ); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017063000', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2017070100.php b/lib/upgradedb/postgres.2017070100.php index 96ab937d4d..9215fad894 100644 --- a/lib/upgradedb/postgres.2017070100.php +++ b/lib/upgradedb/postgres.2017070100.php @@ -21,9 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE rttickets ADD COLUMN source integer DEFAULT 0 NOT NULL"); -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017070100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2017070300.php b/lib/upgradedb/postgres.2017070300.php index 6e6b62af9a..2934c7d3bb 100644 --- a/lib/upgradedb/postgres.2017070300.php +++ b/lib/upgradedb/postgres.2017070300.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); //Helpdesk ticket source define('RT_SOURCE_UNKNOWN', 0); @@ -48,7 +47,3 @@ "INSERT INTO uiconfig (section, var, value) VALUES (?, ?, ?)", array('userpanel', 'visible_ticket_sources', implode(';', array_keys($RT_SOURCES))) ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017070300', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2017070400.php b/lib/upgradedb/postgres.2017070400.php index 34e0ebca59..491766ead8 100644 --- a/lib/upgradedb/postgres.2017070400.php +++ b/lib/upgradedb/postgres.2017070400.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" ALTER TABLE rtqueues ADD COLUMN deleted smallint DEFAULT 0 NOT NULL; @@ -34,7 +33,3 @@ ALTER TABLE rtmessages ADD COLUMN deltime integer DEFAULT 0 NOT NULL; ALTER TABLE rtmessages ADD COLUMN deluserid integer DEFAULT 0 NOT NULL "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017070400', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2017070600.php b/lib/upgradedb/postgres.2017070600.php index cc9c739237..a95e7ab661 100644 --- a/lib/upgradedb/postgres.2017070600.php +++ b/lib/upgradedb/postgres.2017070600.php @@ -21,9 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE netnodes ADD COLUMN info text DEFAULT NULL"); -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017070600', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2017070700.php b/lib/upgradedb/postgres.2017070700.php index f77daaade0..cf2310d47a 100644 --- a/lib/upgradedb/postgres.2017070700.php +++ b/lib/upgradedb/postgres.2017070700.php @@ -21,14 +21,9 @@ * */ -$this->BeginTrans(); $this->Execute(" ALTER TABLE rttickets ADD COLUMN address_id integer DEFAULT NULL; ALTER TABLE rttickets ADD CONSTRAINT rttickets_address_id_fk FOREIGN KEY (address_id) REFERENCES addresses (id) ON UPDATE CASCADE ON DELETE CASCADE "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017070700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2017071000.php b/lib/upgradedb/postgres.2017071000.php index cbdc413132..761d5d9f26 100644 --- a/lib/upgradedb/postgres.2017071000.php +++ b/lib/upgradedb/postgres.2017071000.php @@ -21,14 +21,9 @@ * */ -$this->BeginTrans(); $this->Execute(" ALTER TABLE rttickets ADD COLUMN nodeid integer DEFAULT NULL; ALTER TABLE rttickets ADD CONSTRAINT rttickets_nodeid_fk FOREIGN KEY (nodeid) REFERENCES nodes (id) ON UPDATE CASCADE ON DELETE CASCADE "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017071000', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2017071100.php b/lib/upgradedb/postgres.2017071100.php index 5431664f4c..3bd90f6fb9 100644 --- a/lib/upgradedb/postgres.2017071100.php +++ b/lib/upgradedb/postgres.2017071100.php @@ -21,14 +21,9 @@ * */ -$this->BeginTrans(); $this->Execute(" ALTER TABLE events ADD COLUMN address_id integer DEFAULT NULL; ALTER TABLE events ADD CONSTRAINT events_address_id_fk FOREIGN KEY (address_id) REFERENCES addresses (id) ON UPDATE CASCADE ON DELETE CASCADE "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017071100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2017071900.php b/lib/upgradedb/postgres.2017071900.php index 06e40e05dd..ace2e25180 100644 --- a/lib/upgradedb/postgres.2017071900.php +++ b/lib/upgradedb/postgres.2017071900.php @@ -21,10 +21,6 @@ * */ -$this->BeginTrans(); -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017071900', 'dbversion')); $this->Execute("ALTER TABLE taxes ADD COLUMN reversecharge smallint DEFAULT 0 NOT NULL"); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2017072100.php b/lib/upgradedb/postgres.2017072100.php index f957516533..f3a1d88ea8 100644 --- a/lib/upgradedb/postgres.2017072100.php +++ b/lib/upgradedb/postgres.2017072100.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("INSERT INTO uiconfig (section, var, value) VALUES(?, ?, ?)", array('phpui', 'helpdesk_notification_mail_subject', '[RT#%tid] %subject')); @@ -40,7 +39,3 @@ Telefon: %phone')); $this->Execute("INSERT INTO uiconfig (section, var, value) VALUES(?, ?, ?)", array('phpui', 'helpdesk_customerinfo_sms_body', 'Klient: %custname ID: %cid Adres: %address Telefon: %phone')); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017072100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2017080500.php b/lib/upgradedb/postgres.2017080500.php index 8a2bd13c45..2c0f401c29 100644 --- a/lib/upgradedb/postgres.2017080500.php +++ b/lib/upgradedb/postgres.2017080500.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("INSERT INTO uiconfig (section, var, value) VALUES (?, ?, ?)", array('userpanel', 'change_notification_mail_sender', '')); @@ -31,7 +30,3 @@ VALUES (?, ?, ?)", array('userpanel', 'change_notification_mail_subject', '')); $this->Execute("INSERT INTO uiconfig (section, var, value) VALUES (?, ?, ?)", array('userpanel', 'change_notification_mail_body', '')); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017080500', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2017080600.php b/lib/upgradedb/postgres.2017080600.php index db470042f2..4be3e6f23d 100644 --- a/lib/upgradedb/postgres.2017080600.php +++ b/lib/upgradedb/postgres.2017080600.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("INSERT INTO uiconfig (section, var, value) VALUES (?, ?, ?)", array('userpanel', 'change_confirmation_mail_subject', '')); @@ -31,7 +30,3 @@ VALUES (?, ?, ?)", array('userpanel', 'change_rejection_mail_subject', '')); $this->Execute("INSERT INTO uiconfig (section, var, value) VALUES (?, ?, ?)", array('userpanel', 'change_rejection_mail_body', '')); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017080600', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2017090800.php b/lib/upgradedb/postgres.2017090800.php index f33831f68d..730731f30f 100644 --- a/lib/upgradedb/postgres.2017090800.php +++ b/lib/upgradedb/postgres.2017090800.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" CREATE VIEW vnodetariffs AS @@ -151,7 +150,3 @@ OR (t1.nodeid IS NULL AND t2.nodeid IS NOT NULL) OR (t1.nodeid IS NULL AND t2.nodeid IS NULL)) "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017090800', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2017091300.php b/lib/upgradedb/postgres.2017091300.php index 2d68192dbe..82aab8ac4c 100644 --- a/lib/upgradedb/postgres.2017091300.php +++ b/lib/upgradedb/postgres.2017091300.php @@ -21,13 +21,8 @@ * */ -$this->BeginTrans(); $this->Execute("INSERT INTO uiconfig (section, var, value) VALUES (?, ?, ?)", array('userpanel', 'google_recaptcha_sitekey', '')); $this->Execute("INSERT INTO uiconfig (section, var, value) VALUES (?, ?, ?)", array('userpanel', 'google_recaptcha_secret', '')); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017091300', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2017091400.php b/lib/upgradedb/postgres.2017091400.php index d311e22343..6161ae8878 100644 --- a/lib/upgradedb/postgres.2017091400.php +++ b/lib/upgradedb/postgres.2017091400.php @@ -21,11 +21,7 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE netnodes ADD COLUMN createtime integer"); $this->Execute("ALTER TABLE netnodes ADD COLUMN lastinspectiontime integer DEFAULT NULL"); $this->Execute("ALTER TABLE netnodes ADD COLUMN admcontact integer DEFAULT NULL"); -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017091400', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2017092400.php b/lib/upgradedb/postgres.2017092400.php index eb791122ca..0f30a40ab8 100644 --- a/lib/upgradedb/postgres.2017092400.php +++ b/lib/upgradedb/postgres.2017092400.php @@ -21,9 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE rttickets ADD COLUMN netnodeid integer"); -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017092400', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2017092800.php b/lib/upgradedb/postgres.2017092800.php index 6b522c6110..8745a59442 100644 --- a/lib/upgradedb/postgres.2017092800.php +++ b/lib/upgradedb/postgres.2017092800.php @@ -21,9 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE rtcategories ADD COLUMN style text DEFAULT ''"); -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017092800', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2017092900.php b/lib/upgradedb/postgres.2017092900.php index ff6ac19ef3..ea560b24ca 100644 --- a/lib/upgradedb/postgres.2017092900.php +++ b/lib/upgradedb/postgres.2017092900.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE assignments ADD COLUMN docid integer DEFAULT NULL"); $this->Execute("ALTER TABLE assignments ADD CONSTRAINT assignments_docid_fkey @@ -41,7 +40,3 @@ $this->Execute("DELETE FROM debitnotecontents dc WHERE NOT EXISTS (SELECT null FROM documents d WHERE dc.docid = d.id)"); $this->Execute("ALTER TABLE debitnotecontents ADD CONSTRAINT debitnotecontents_docid_fkey FOREIGN KEY (docid) REFERENCES documents (id) ON DELETE CASCADE ON UPDATE CASCADE"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017092900', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2017092901.php b/lib/upgradedb/postgres.2017092901.php index 00d2dd9719..3e1b36db47 100644 --- a/lib/upgradedb/postgres.2017092901.php +++ b/lib/upgradedb/postgres.2017092901.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE documents ADD COLUMN template varchar(255) DEFAULT NULL"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017092901', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2017101100.php b/lib/upgradedb/postgres.2017101100.php index 90f16b38f5..dd9015ea4c 100644 --- a/lib/upgradedb/postgres.2017101100.php +++ b/lib/upgradedb/postgres.2017101100.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $sql_tables = array( 'documents' => array( @@ -111,7 +110,3 @@ OR " . $props['column'] . " NOT IN (" . $cid_string . ")"); } } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017101100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2017101101.php b/lib/upgradedb/postgres.2017101101.php index 39def66f45..94e0f466c2 100644 --- a/lib/upgradedb/postgres.2017101101.php +++ b/lib/upgradedb/postgres.2017101101.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $sql_tables = array( 'documents' => array( @@ -191,7 +190,3 @@ OR (t1.nodeid IS NULL AND t2.nodeid IS NOT NULL) OR (t1.nodeid IS NULL AND t2.nodeid IS NULL)) "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017101101', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2017101102.php b/lib/upgradedb/postgres.2017101102.php index a3df32599c..a7abba7ca3 100644 --- a/lib/upgradedb/postgres.2017101102.php +++ b/lib/upgradedb/postgres.2017101102.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" ALTER TABLE nodes ALTER COLUMN netdev DROP NOT NULL; @@ -36,7 +35,3 @@ $this->Execute("UPDATE nodes SET netdev = NULL WHERE netdev = 0 OR netdev NOT IN (" . $sql_netdevids . ")"); $this->Execute("DELETE FROM netlinks WHERE src NOT IN (" . $sql_netdevids . ") OR dst NOT IN (" . $sql_netdevids . ")"); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017101102', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2017101103.php b/lib/upgradedb/postgres.2017101103.php index e7d20f0be9..2d7badcc81 100644 --- a/lib/upgradedb/postgres.2017101103.php +++ b/lib/upgradedb/postgres.2017101103.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" ALTER TABLE nodes ADD CONSTRAINT nodes_netdev_fkey @@ -33,7 +32,3 @@ ALTER TABLE netlinks ADD CONSTRAINT netlinks_dst_fkey FOREIGN KEY (dst) REFERENCES netdevices (id) ON DELETE CASCADE ON UPDATE CASCADE "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017101103', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2017101200.php b/lib/upgradedb/postgres.2017101200.php index 68bbae0b82..9871ff5906 100644 --- a/lib/upgradedb/postgres.2017101200.php +++ b/lib/upgradedb/postgres.2017101200.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" ALTER TABLE documents ALTER COLUMN userid DROP NOT NULL; @@ -80,7 +79,3 @@ $this->Execute("UPDATE messages SET userid = NULL WHERE userid = 0 OR userid NOT IN (" . $sql_userids . ")"); $this->Execute("UPDATE logtransactions SET userid = NULL WHERE userid = 0 OR userid NOT IN (" . $sql_userids . ")"); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017101200', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2017101201.php b/lib/upgradedb/postgres.2017101201.php index f517a2ffaf..fe8b8c6f1c 100644 --- a/lib/upgradedb/postgres.2017101201.php +++ b/lib/upgradedb/postgres.2017101201.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" ALTER TABLE documents ADD CONSTRAINT documents_userid_fkey @@ -62,7 +61,3 @@ ALTER TABLE logtransactions ADD CONSTRAINT logtransactions_userid_fkey FOREIGN KEY (userid) REFERENCES users (id) ON DELETE SET NULL ON UPDATE CASCADE; "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017101201', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2017101202.php b/lib/upgradedb/postgres.2017101202.php index 2093abc8df..e603beb677 100644 --- a/lib/upgradedb/postgres.2017101202.php +++ b/lib/upgradedb/postgres.2017101202.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" ALTER TABLE customers ALTER COLUMN creatorid DROP NOT NULL; @@ -54,7 +53,3 @@ $this->Execute("UPDATE voipaccounts SET modid = NULL WHERE modid = 0 OR modid NOT IN (" . $sql_userids . ")"); $this->Execute("UPDATE rttickets SET creatorid = NULL WHERE creatorid = 0 OR creatorid NOT IN (" . $sql_userids . ")"); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017101202', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2017101203.php b/lib/upgradedb/postgres.2017101203.php index a5e8a4ba69..cba24ddda8 100644 --- a/lib/upgradedb/postgres.2017101203.php +++ b/lib/upgradedb/postgres.2017101203.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" ALTER TABLE customers ADD CONSTRAINT customers_creatorid_fkey @@ -42,7 +41,3 @@ ALTER TABLE rttickets ADD CONSTRAINT rttickets_creatorid_fkey FOREIGN KEY (creatorid) REFERENCES users (id) ON DELETE SET NULL ON UPDATE CASCADE; "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017101203', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2017101204.php b/lib/upgradedb/postgres.2017101204.php index 9ba50969d3..f2e7449bd1 100644 --- a/lib/upgradedb/postgres.2017101204.php +++ b/lib/upgradedb/postgres.2017101204.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" DROP VIEW vnodealltariffs; @@ -426,7 +425,3 @@ $this->Execute("UPDATE up_help SET reference = NULL WHERE reference IS NOT NULL AND reference NOT IN (" . $sql_ids . ")"); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017101204', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2017101205.php b/lib/upgradedb/postgres.2017101205.php index b5c0d8deff..03d87de0ab 100644 --- a/lib/upgradedb/postgres.2017101205.php +++ b/lib/upgradedb/postgres.2017101205.php @@ -24,7 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" ALTER TABLE customers ADD CONSTRAINT customers_divisionid_fkey @@ -235,7 +234,3 @@ OR (t1.nodeid IS NULL AND t2.nodeid IS NOT NULL) OR (t1.nodeid IS NULL AND t2.nodeid IS NULL)); "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017101205', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2017101600.php b/lib/upgradedb/postgres.2017101600.php index 646e00e2f7..4be89ffece 100644 --- a/lib/upgradedb/postgres.2017101600.php +++ b/lib/upgradedb/postgres.2017101600.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" ALTER TABLE ewx_stm_nodes ALTER COLUMN channelid DROP NOT NULL; @@ -40,7 +39,3 @@ $this->Execute("ALTER TABLE ewx_stm_nodes ADD CONSTRAINT ewx_stm_nodes_channelid_fkey FOREIGN KEY (channelid) REFERENCES ewx_stm_channels (id) ON DELETE SET NULL ON UPDATE CASCADE"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017101600', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2017101601.php b/lib/upgradedb/postgres.2017101601.php index 54be64d051..141515c777 100644 --- a/lib/upgradedb/postgres.2017101601.php +++ b/lib/upgradedb/postgres.2017101601.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" ALTER TABLE ewx_stm_channels ALTER COLUMN cid DROP NOT NULL; @@ -40,7 +39,3 @@ $this->Execute("ALTER TABLE ewx_stm_channels ADD CONSTRAINT ewx_stm_channels_cid_fkey FOREIGN KEY (cid) REFERENCES ewx_channels (id) ON DELETE SET NULL ON UPDATE CASCADE"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017101601', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2017101602.php b/lib/upgradedb/postgres.2017101602.php index f46cb37cb8..a0ee1146ac 100644 --- a/lib/upgradedb/postgres.2017101602.php +++ b/lib/upgradedb/postgres.2017101602.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" ALTER TABLE ewx_stm_nodes ALTER COLUMN nodeid DROP NOT NULL; @@ -40,7 +39,3 @@ $this->Execute("ALTER TABLE ewx_stm_nodes ADD CONSTRAINT ewx_stm_nodes_nodeid_fkey FOREIGN KEY (nodeid) REFERENCES nodes (id) ON DELETE SET NULL ON UPDATE CASCADE"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017101602', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2017101800.php b/lib/upgradedb/postgres.2017101800.php index fea15e1106..495edf22c2 100644 --- a/lib/upgradedb/postgres.2017101800.php +++ b/lib/upgradedb/postgres.2017101800.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE rttickets ADD COLUMN requestor_mail varchar(255) DEFAULT NULL"); $this->Execute("ALTER TABLE rttickets ADD COLUMN requestor_phone varchar(32) DEFAULT NULL"); @@ -38,6 +37,3 @@ } } } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017101800', 'dbversion')); -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2017102600.php b/lib/upgradedb/postgres.2017102600.php index 7b31562713..9ed161ba62 100644 --- a/lib/upgradedb/postgres.2017102600.php +++ b/lib/upgradedb/postgres.2017102600.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" DROP VIEW vnodealltariffs; @@ -154,7 +153,3 @@ OR (t1.nodeid IS NULL AND t2.nodeid IS NOT NULL) OR (t1.nodeid IS NULL AND t2.nodeid IS NULL)) "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017102600', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2017103000.php b/lib/upgradedb/postgres.2017103000.php index 98d7b1a1bc..c2f37219f9 100644 --- a/lib/upgradedb/postgres.2017103000.php +++ b/lib/upgradedb/postgres.2017103000.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" ALTER TABLE promotionassignments ALTER COLUMN selectionid DROP NOT NULL; @@ -29,7 +28,3 @@ UPDATE promotionassignments SET selectionid = NULL WHERE selectionid = 0; ALTER TABLE promotionassignments ALTER COLUMN selectionid TYPE varchar(60); "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017103000', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2017103100.php b/lib/upgradedb/postgres.2017103100.php index 1543bdd982..f09be1d9f5 100644 --- a/lib/upgradedb/postgres.2017103100.php +++ b/lib/upgradedb/postgres.2017103100.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE promotionassignments ADD COLUMN orderid integer NOT NULL DEFAULT 0"); @@ -43,7 +42,3 @@ ); } } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017103100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2017103101.php b/lib/upgradedb/postgres.2017103101.php index 9e9bb51417..18fce71d77 100644 --- a/lib/upgradedb/postgres.2017103101.php +++ b/lib/upgradedb/postgres.2017103101.php @@ -51,7 +51,6 @@ define('RECIPIENT_ADDRESS', 4); } -$this->BeginTrans(); $this->Execute("ALTER TABLE documents ADD COLUMN post_address_id integer"); $this->Execute("ALTER TABLE documents ADD CONSTRAINT documents_post_address_id_fkey @@ -76,7 +75,3 @@ } } } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017103101', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2017110300.php b/lib/upgradedb/postgres.2017110300.php index 389076fd2c..e9aef058dd 100644 --- a/lib/upgradedb/postgres.2017110300.php +++ b/lib/upgradedb/postgres.2017110300.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE promotionassignments RENAME COLUMN selectionid TO label"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017110300', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2017111300.php b/lib/upgradedb/postgres.2017111300.php index 3e34422604..1925722acb 100644 --- a/lib/upgradedb/postgres.2017111300.php +++ b/lib/upgradedb/postgres.2017111300.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE tariffs ADD COLUMN authtype smallint DEFAULT 0 NOT NULL"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017111300', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2017112100.php b/lib/upgradedb/postgres.2017112100.php index f303b335a4..e9066f6dd0 100644 --- a/lib/upgradedb/postgres.2017112100.php +++ b/lib/upgradedb/postgres.2017112100.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE documents ADD COLUMN commitflags smallint DEFAULT 0 NOT NULL"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017112100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2017112200.php b/lib/upgradedb/postgres.2017112200.php index 4a7935a751..16e6a001fd 100644 --- a/lib/upgradedb/postgres.2017112200.php +++ b/lib/upgradedb/postgres.2017112200.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" DROP VIEW teryt_simc; @@ -36,7 +35,3 @@ JOIN location_states s ON (d.stateid = s.id) LEFT JOIN location_cities cc ON (c.cityid = cc.id) "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2017112200', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2018010500.php b/lib/upgradedb/postgres.2018010500.php index 937c1a5aaf..ee4bc9ccba 100644 --- a/lib/upgradedb/postgres.2018010500.php +++ b/lib/upgradedb/postgres.2018010500.php @@ -21,12 +21,7 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE assignments ADD COLUMN separatedocument smallint DEFAULT 0 NOT NULL"); $this->Execute("UPDATE assignments SET separatedocument = 1, invoice = 1 WHERE invoice = 2"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2018010500', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2018011700.php b/lib/upgradedb/postgres.2018011700.php index b6f6faa460..9d37377666 100644 --- a/lib/upgradedb/postgres.2018011700.php +++ b/lib/upgradedb/postgres.2018011700.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE rttickets ADD COLUMN priority smallint DEFAULT 0 NOT NULL"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2018011700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2018012200.php b/lib/upgradedb/postgres.2018012200.php index 9420d73fc9..fc6c646861 100644 --- a/lib/upgradedb/postgres.2018012200.php +++ b/lib/upgradedb/postgres.2018012200.php @@ -21,13 +21,8 @@ * */ -$this->BeginTrans(); $this->Execute( "INSERT INTO uiconfig (section, var, value) VALUES (?, ?, ?)", array('userpanel', 'allow_reopen_tickets_newer_than', '0') ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2018012200', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2018020800.php b/lib/upgradedb/postgres.2018020800.php index a943d4a6d9..0551d4a72d 100644 --- a/lib/upgradedb/postgres.2018020800.php +++ b/lib/upgradedb/postgres.2018020800.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" DROP VIEW vdivisions; @@ -32,7 +31,3 @@ FROM divisions d JOIN vaddresses a ON a.id = d.address_id "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2018020800', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2018022200.php b/lib/upgradedb/postgres.2018022200.php index 21b3ae57e0..583b7ddeca 100644 --- a/lib/upgradedb/postgres.2018022200.php +++ b/lib/upgradedb/postgres.2018022200.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("DELETE FROM pna WHERE fromhouse ~ '[a-z]' OR tohouse ~ '[a-z]'"); @@ -50,7 +49,3 @@ CREATE INDEX pna_fromnumber_idx ON pna (fromnumber); CREATE INDEX pna_tonumber_idx ON pna (tonumber) "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2018022200', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2018022400.php b/lib/upgradedb/postgres.2018022400.php index cce963046e..c5ac2a7cd0 100644 --- a/lib/upgradedb/postgres.2018022400.php +++ b/lib/upgradedb/postgres.2018022400.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" ALTER TABLE pna ADD COLUMN streetname varchar(100) DEFAULT NULL; @@ -29,7 +28,3 @@ ALTER TABLE pna ADD CONSTRAINT pna_zip_cityid_streetid_fromnumber_tonumber_parity_key UNIQUE (zip, cityid, streetid, streetname, fromnumber, fromletter, tonumber, toletter, parity) "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2018022400', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2018022500.php b/lib/upgradedb/postgres.2018022500.php index 853f08d84e..2af9b9286b 100644 --- a/lib/upgradedb/postgres.2018022500.php +++ b/lib/upgradedb/postgres.2018022500.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" ALTER TABLE pna ALTER COLUMN cityid DROP NOT NULL; @@ -31,7 +30,3 @@ ALTER TABLE pna ADD CONSTRAINT pna_zip_cityid_streetid_fromnumber_tonumber_parity_key UNIQUE (zip, cityid, cityname, streetid, streetname, fromnumber, fromletter, tonumber, toletter, parity) "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2018022500', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2018022600.php b/lib/upgradedb/postgres.2018022600.php index 6ef1a3f564..894d74d442 100644 --- a/lib/upgradedb/postgres.2018022600.php +++ b/lib/upgradedb/postgres.2018022600.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" ALTER TABLE records ALTER COLUMN type TYPE varchar(10); @@ -68,7 +67,3 @@ CONSTRAINT tsigkeys_name_key UNIQUE (name, algorithm) ); "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2018022600', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2018032100.php b/lib/upgradedb/postgres.2018032100.php index ff129aeac7..b903e01cfa 100644 --- a/lib/upgradedb/postgres.2018032100.php +++ b/lib/upgradedb/postgres.2018032100.php @@ -21,11 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE voip_number_assignments ADD CONSTRAINT voip_number_assignments_assignment_id_key UNIQUE (assignment_id, number_id)"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2018032100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2018032300.php b/lib/upgradedb/postgres.2018032300.php index 59ab424e30..4a385dd00f 100644 --- a/lib/upgradedb/postgres.2018032300.php +++ b/lib/upgradedb/postgres.2018032300.php @@ -21,9 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE networks ADD COLUMN snat bigint"); -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2018032300', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2018032900.php b/lib/upgradedb/postgres.2018032900.php index 8c93959006..10c303c7c9 100644 --- a/lib/upgradedb/postgres.2018032900.php +++ b/lib/upgradedb/postgres.2018032900.php @@ -21,10 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE rttickets ADD COLUMN netdevid integer DEFAULT NULL"); $this->Execute("ALTER TABLE rttickets ADD CONSTRAINT rttickets_netdevid_fkey FOREIGN KEY (netdevid) REFERENCES netdevices (id) ON UPDATE CASCADE ON DELETE SET NULL"); -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2018032900', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2018041400.php b/lib/upgradedb/postgres.2018041400.php index 224c816e45..4f421a5fae 100644 --- a/lib/upgradedb/postgres.2018041400.php +++ b/lib/upgradedb/postgres.2018041400.php @@ -20,9 +20,3 @@ * USA. * */ - -$this->BeginTrans(); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2018041400', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2018042700.php b/lib/upgradedb/postgres.2018042700.php index 78b76ee712..503e21bd5e 100644 --- a/lib/upgradedb/postgres.2018042700.php +++ b/lib/upgradedb/postgres.2018042700.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" DROP VIEW vnodealltariffs; @@ -224,7 +223,3 @@ OR (t1.nodeid IS NULL AND t2.nodeid IS NOT NULL) OR (t1.nodeid IS NULL AND t2.nodeid IS NULL)) "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2018042700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2018051400.php b/lib/upgradedb/postgres.2018051400.php index 917ceea5f3..cb00f57ba7 100644 --- a/lib/upgradedb/postgres.2018051400.php +++ b/lib/upgradedb/postgres.2018051400.php @@ -21,11 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE rttickets ADD COLUMN verifierid integer DEFAULT NULL"); $this->Execute("ALTER TABLE rttickets ADD CONSTRAINT rttickets_verifierid_fkey FOREIGN KEY (verifierid) REFERENCES users (id) ON DELETE SET NULL ON UPDATE CASCADE"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2018051400', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2018051500.php b/lib/upgradedb/postgres.2018051500.php index dd340014d8..22462ed0a0 100644 --- a/lib/upgradedb/postgres.2018051500.php +++ b/lib/upgradedb/postgres.2018051500.php @@ -21,9 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE rttickets ADD COLUMN deadline integer DEFAULT NULL"); -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2018051500', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2018051700.php b/lib/upgradedb/postgres.2018051700.php index b9c811d9c9..0b35da0daa 100644 --- a/lib/upgradedb/postgres.2018051700.php +++ b/lib/upgradedb/postgres.2018051700.php @@ -21,11 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE rtqueues ADD COLUMN verifierid integer DEFAULT NULL"); $this->Execute("ALTER TABLE rtqueues ADD CONSTRAINT rtqueues_verifierid_fkey FOREIGN KEY (verifierid) REFERENCES users (id) ON DELETE SET NULL ON UPDATE CASCADE"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2018051700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2018052000.php b/lib/upgradedb/postgres.2018052000.php index e931d8b7cf..53b80c827c 100644 --- a/lib/upgradedb/postgres.2018052000.php +++ b/lib/upgradedb/postgres.2018052000.php @@ -21,9 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE documents ADD COLUMN comment text DEFAULT NULL"); -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2018052000', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2018052800.php b/lib/upgradedb/postgres.2018052800.php index c2a0f28adf..2f48848348 100644 --- a/lib/upgradedb/postgres.2018052800.php +++ b/lib/upgradedb/postgres.2018052800.php @@ -21,13 +21,8 @@ * */ -$this->BeginTrans(); $this->Execute( "INSERT INTO uiconfig (section, var, value) VALUES (?, ?, ?)", array('userpanel', 'pin_changes', 'true') ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2018052800', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2018062000.php b/lib/upgradedb/postgres.2018062000.php index 4a5c30b1ec..b98a3833ed 100644 --- a/lib/upgradedb/postgres.2018062000.php +++ b/lib/upgradedb/postgres.2018062000.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); if ($this->ResourceExists('rttickets_address_id_fk', LMSDB::RESOURCE_TYPE_CONSTRAINT)) { $this->Execute("ALTER TABLE rttickets DROP CONSTRAINT rttickets_address_id_fk"); @@ -39,7 +38,3 @@ FOREIGN KEY (address_id) REFERENCES addresses (id) ON DELETE SET NULL ON UPDATE CASCADE"); $this->Execute("ALTER TABLE rttickets ADD CONSTRAINT rttickets_nodeid_fkey FOREIGN KEY (nodeid) REFERENCES nodes (id) ON DELETE SET NULL ON UPDATE CASCADE"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2018062000', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2018070200.php b/lib/upgradedb/postgres.2018070200.php index 0a296cc7d8..1d3a47c46e 100644 --- a/lib/upgradedb/postgres.2018070200.php +++ b/lib/upgradedb/postgres.2018070200.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $all_streets = $this->GetAllByKey("SELECT lst.id, lst.name, lst.name2, lstt.name AS typestr FROM location_streets lst @@ -68,7 +67,3 @@ } } } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2018070200', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2018070300.php b/lib/upgradedb/postgres.2018070300.php index 5062a0c4ed..ac90a15333 100644 --- a/lib/upgradedb/postgres.2018070300.php +++ b/lib/upgradedb/postgres.2018070300.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE invoicecontents ALTER COLUMN count TYPE numeric(9,3)"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2018070300', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2018070600.php b/lib/upgradedb/postgres.2018070600.php index fa2e86ca88..073951db90 100644 --- a/lib/upgradedb/postgres.2018070600.php +++ b/lib/upgradedb/postgres.2018070600.php @@ -21,11 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE rttickets ADD COLUMN type integer DEFAULT NULL"); $this->Execute("ALTER TABLE rttickets ADD COLUMN service integer DEFAULT NULL"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2018070600', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2018073100.php b/lib/upgradedb/postgres.2018073100.php index f6cf272429..a48a5225fe 100644 --- a/lib/upgradedb/postgres.2018073100.php +++ b/lib/upgradedb/postgres.2018073100.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" CREATE TABLE rtticketlastview ( @@ -40,7 +39,3 @@ SELECT t.id, u.id, ?NOW? FROM rttickets t, users u ); "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2018073100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2018081400.php b/lib/upgradedb/postgres.2018081400.php index 8bf8b6f05c..21bb50838d 100644 --- a/lib/upgradedb/postgres.2018081400.php +++ b/lib/upgradedb/postgres.2018081400.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE rtmessages ALTER COLUMN type TYPE integer"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2018081400', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2018081401.php b/lib/upgradedb/postgres.2018081401.php index 5366d7a594..7fbab8a0bf 100644 --- a/lib/upgradedb/postgres.2018081401.php +++ b/lib/upgradedb/postgres.2018081401.php @@ -24,13 +24,8 @@ define('RT_RIGHT_NOTICE', 8); define('RT_RIGHT_INDICATOR', 16); -$this->BeginTrans(); $this->Execute( "UPDATE rtrights SET rights = rights | ? WHERE rights & ? > 0", array(RT_RIGHT_INDICATOR, RT_RIGHT_NOTICE) ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2018081401', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2018081600.php b/lib/upgradedb/postgres.2018081600.php index 9cef298a42..927c18791a 100644 --- a/lib/upgradedb/postgres.2018081600.php +++ b/lib/upgradedb/postgres.2018081600.php @@ -21,11 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("UPDATE rttickets SET priority = 3 WHERE priority = 2"); $this->Execute("UPDATE rttickets SET priority = 2 WHERE priority = 1"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2018081600', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2018081700.php b/lib/upgradedb/postgres.2018081700.php index 0aeee11dd5..4672c8844d 100644 --- a/lib/upgradedb/postgres.2018081700.php +++ b/lib/upgradedb/postgres.2018081700.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" DROP VIEW vnetworks; @@ -41,7 +40,3 @@ LEFT JOIN vaddresses a ON no.address_id = a.id WHERE no.ipaddr = 0 AND no.ipaddr_pub = 0 "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2018081700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2018082100.php b/lib/upgradedb/postgres.2018082100.php index 7fce869c34..5663606f99 100644 --- a/lib/upgradedb/postgres.2018082100.php +++ b/lib/upgradedb/postgres.2018082100.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" DROP VIEW customerview; @@ -98,7 +97,3 @@ FROM divisions d JOIN vaddresses a ON a.id = d.address_id "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2018082100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2018082300.php b/lib/upgradedb/postgres.2018082300.php index ce09e61e6f..f7d701dafd 100644 --- a/lib/upgradedb/postgres.2018082300.php +++ b/lib/upgradedb/postgres.2018082300.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" CREATE SEQUENCE filecontainers_id_seq; @@ -50,7 +49,3 @@ ); CREATE INDEX files_md5sum_idx ON files (md5sum) "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2018082300', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2018090100.php b/lib/upgradedb/postgres.2018090100.php index 55a3b9e5b9..4d6b544cff 100644 --- a/lib/upgradedb/postgres.2018090100.php +++ b/lib/upgradedb/postgres.2018090100.php @@ -21,14 +21,9 @@ * */ -$this->BeginTrans(); $this->Execute(" ALTER TABLE aliasassignments ALTER COLUMN id DROP DEFAULT; SELECT setval('aliasassignments_id_seq', (SELECT MAX(id) FROM aliasassignments)); ALTER TABLE aliasassignments ALTER COLUMN id SET DEFAULT nextval('aliasassignments_id_seq'::text) "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2018090100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2018090500.php b/lib/upgradedb/postgres.2018090500.php index c50a6c4055..ebd094dc69 100644 --- a/lib/upgradedb/postgres.2018090500.php +++ b/lib/upgradedb/postgres.2018090500.php @@ -21,11 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("UPDATE rttickets SET type = 9 WHERE type IS NULL"); $this->Execute("UPDATE rttickets SET service = -1 WHERE service IS NULL"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2018090500', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2018090800.php b/lib/upgradedb/postgres.2018090800.php index 22cf9a5cc1..7de1367b1a 100644 --- a/lib/upgradedb/postgres.2018090800.php +++ b/lib/upgradedb/postgres.2018090800.php @@ -21,9 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE netradiosectors ADD COLUMN type smallint DEFAULT 0 NOT NULL"); -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2018090800', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2018091000.php b/lib/upgradedb/postgres.2018091000.php index f5266c4c73..5701170447 100644 --- a/lib/upgradedb/postgres.2018091000.php +++ b/lib/upgradedb/postgres.2018091000.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute('ALTER TABLE events ALTER COLUMN begintime TYPE integer'); $this->Execute('ALTER TABLE events ALTER COLUMN endtime TYPE integer'); @@ -37,7 +36,3 @@ ); } } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2018091000', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2018091100.php b/lib/upgradedb/postgres.2018091100.php index 8cc09e83e3..103c095298 100644 --- a/lib/upgradedb/postgres.2018091100.php +++ b/lib/upgradedb/postgres.2018091100.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("UPDATE events SET endtime = begintime WHERE endtime = 0 AND date = enddate"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2018091100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2018091300.php b/lib/upgradedb/postgres.2018091300.php index e1de809d1e..4ac969035c 100644 --- a/lib/upgradedb/postgres.2018091300.php +++ b/lib/upgradedb/postgres.2018091300.php @@ -21,12 +21,7 @@ * */ -$this->BeginTrans(); $this->Execute('ALTER TABLE netnodes ADD COLUMN ownerid integer DEFAULT NULL'); $this->Execute("ALTER TABLE netnodes ADD CONSTRAINT netnodes_ownerid_fkey FOREIGN KEY (ownerid) REFERENCES customers (id) ON DELETE SET NULL ON UPDATE CASCADE"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2018091300', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2018091301.php b/lib/upgradedb/postgres.2018091301.php index 60078fcafa..0ef21e09ef 100644 --- a/lib/upgradedb/postgres.2018091301.php +++ b/lib/upgradedb/postgres.2018091301.php @@ -21,9 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE netradiosectors ADD COLUMN secret varchar(64) DEFAULT NULL"); -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2018091301', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2018091800.php b/lib/upgradedb/postgres.2018091800.php index 10714864b1..9cbe6f152b 100644 --- a/lib/upgradedb/postgres.2018091800.php +++ b/lib/upgradedb/postgres.2018091800.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); if (!$this->GetOne("SELECT id FROM uiconfig WHERE section = ? AND var = ?", array('userpanel', 'show_last_years'))) { $this->Execute( @@ -29,7 +28,3 @@ array('userpanel', 'show_last_years', '5') ); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2018091800', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2018091801.php b/lib/upgradedb/postgres.2018091801.php index 1d01161356..2e5f6dec46 100644 --- a/lib/upgradedb/postgres.2018091801.php +++ b/lib/upgradedb/postgres.2018091801.php @@ -21,12 +21,7 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE rttickets ADD COLUMN invprojectid integer DEFAULT NULL"); $this->Execute("ALTER TABLE rttickets ADD CONSTRAINT rttickets_invprojectid_fkey FOREIGN KEY (invprojectid) REFERENCES invprojects (id) ON DELETE SET NULL ON UPDATE CASCADE"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2018091801', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2018092600.php b/lib/upgradedb/postgres.2018092600.php index b12898e6a6..25d7dce5d7 100644 --- a/lib/upgradedb/postgres.2018092600.php +++ b/lib/upgradedb/postgres.2018092600.php @@ -21,11 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE nodesessions ADD COLUMN nasipaddr bigint DEFAULT NULL"); $this->Execute("ALTER TABLE nodesessions ADD COLUMN nasport text DEFAULT NULL"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2018092600', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2018092601.php b/lib/upgradedb/postgres.2018092601.php index b35ce9a6f5..113bde1120 100644 --- a/lib/upgradedb/postgres.2018092601.php +++ b/lib/upgradedb/postgres.2018092601.php @@ -21,9 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE rttickets ADD COLUMN verifier_rtime integer DEFAULT NULL"); -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2018092601', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2018093000.php b/lib/upgradedb/postgres.2018093000.php index 2ef3c4d838..f876ce4d81 100644 --- a/lib/upgradedb/postgres.2018093000.php +++ b/lib/upgradedb/postgres.2018093000.php @@ -21,13 +21,8 @@ * */ -$this->BeginTrans(); if ($this->ResourceExists('promotionassignments_promotionschemaid_key', LMSDB::RESOURCE_TYPE_CONSTRAINT)) { $this->Execute('ALTER TABLE promotionassignments DROP CONSTRAINT promotionassignments_promotionschemaid_key'); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2018093000', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2018110700.php b/lib/upgradedb/postgres.2018110700.php index 3e080e99a8..8f765248dc 100644 --- a/lib/upgradedb/postgres.2018110700.php +++ b/lib/upgradedb/postgres.2018110700.php @@ -21,14 +21,9 @@ * */ -$this->BeginTrans(); define('CONFIG_TYPE_POSITIVE_INTEGER_2018110700', 2); $this->Execute( "INSERT INTO uiconfig (section, var, value, type) VALUES (?, ?, ?, ?)", array('phpui', 'networklist_pagelimit', 100, CONFIG_TYPE_POSITIVE_INTEGER_2018110700) ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2018110700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2018111600.php b/lib/upgradedb/postgres.2018111600.php index 592aa5eaaa..4f421a5fae 100644 --- a/lib/upgradedb/postgres.2018111600.php +++ b/lib/upgradedb/postgres.2018111600.php @@ -20,9 +20,3 @@ * USA. * */ - -$this->BeginTrans(); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2018111600', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2018112800.php b/lib/upgradedb/postgres.2018112800.php index 9396ca5922..4f421a5fae 100644 --- a/lib/upgradedb/postgres.2018112800.php +++ b/lib/upgradedb/postgres.2018112800.php @@ -20,9 +20,3 @@ * USA. * */ - -$this->BeginTrans(); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2018112800', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2018121200.php b/lib/upgradedb/postgres.2018121200.php index 7e983050ca..a0ef7a48ea 100644 --- a/lib/upgradedb/postgres.2018121200.php +++ b/lib/upgradedb/postgres.2018121200.php @@ -21,10 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE rtqueues ADD COLUMN verifierticketsubject varchar(255) NOT NULL DEFAULT ''"); $this->Execute("ALTER TABLE rtqueues ADD COLUMN verifierticketbody text NOT NULL DEFAULT ''"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2018121200', 'dbversion')); -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2018121300.php b/lib/upgradedb/postgres.2018121300.php index d8c39af4c4..62151a5f0a 100644 --- a/lib/upgradedb/postgres.2018121300.php +++ b/lib/upgradedb/postgres.2018121300.php @@ -21,10 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE rttickets ADD COLUMN parentid integer DEFAULT NULL"); $this->Execute("ALTER TABLE rttickets ADD CONSTRAINT rttickets_parentid_fkey FOREIGN KEY (id) REFERENCES rttickets (id) ON DELETE SET NULL ON UPDATE CASCADE"); -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2018121300', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2019012100.php b/lib/upgradedb/postgres.2019012100.php index 024a0a35c3..cab2f74121 100644 --- a/lib/upgradedb/postgres.2019012100.php +++ b/lib/upgradedb/postgres.2019012100.php @@ -21,13 +21,8 @@ * */ -$this->BeginTrans(); $this->Execute( "INSERT INTO uiconfig (section, var, value) VALUES (?, ?, ?)", array('userpanel', 'aggregate_documents', '0') ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2019012100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2019013100.php b/lib/upgradedb/postgres.2019013100.php index de7c87e69d..1561842a57 100644 --- a/lib/upgradedb/postgres.2019013100.php +++ b/lib/upgradedb/postgres.2019013100.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $tariffs = $this->GetAllByKey("SELECT id, value FROM tariffs", 'id'); $schemas = $this->GetAllByKey("SELECT id, data, continuation, ctariffid @@ -65,7 +64,3 @@ $this->Execute("ALTER TABLE promotionschemas DROP COLUMN continuation"); $this->Execute("ALTER TABLE promotionschemas DROP COLUMN ctariffid"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2019013100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2019032100.php b/lib/upgradedb/postgres.2019032100.php index 0afc469d69..e994741e79 100644 --- a/lib/upgradedb/postgres.2019032100.php +++ b/lib/upgradedb/postgres.2019032100.php @@ -21,11 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("INSERT INTO uiconfig (section, var, value) VALUES (?, ?, ?)", array('userpanel', 'hide_documentbox', '0')); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2019032100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2019032500.php b/lib/upgradedb/postgres.2019032500.php index 0cdf08e332..6c49737147 100644 --- a/lib/upgradedb/postgres.2019032500.php +++ b/lib/upgradedb/postgres.2019032500.php @@ -21,13 +21,8 @@ * */ -$this->BeginTrans(); $this->Execute("INSERT INTO uiconfig (section, var, value) VALUES (?, ?, ?)", array('userpanel', 'speed_unit_type', '1000')); $this->Execute("INSERT INTO uiconfig (section, var, value) VALUES (?, ?, ?)", array('userpanel', 'speed_unit_aggregation_threshold', '5')); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2019032500', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2019032700.php b/lib/upgradedb/postgres.2019032700.php index f2eb126d70..d75db8dd38 100644 --- a/lib/upgradedb/postgres.2019032700.php +++ b/lib/upgradedb/postgres.2019032700.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); if ($this->ResourceExists('location_buildings_street_id_fkey', LMSDB::RESOURCE_TYPE_CONSTRAINT)) { $this->Execute("ALTER TABLE location_buildings @@ -30,7 +29,3 @@ $this->Execute("ALTER TABLE location_buildings ADD CONSTRAINT location_buildings_street_id_fkey FOREIGN KEY (street_id) REFERENCES location_streets (id) ON DELETE CASCADE ON UPDATE CASCADE"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2019032700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2019040300.php b/lib/upgradedb/postgres.2019040300.php index e67cce2019..297b8310a3 100644 --- a/lib/upgradedb/postgres.2019040300.php +++ b/lib/upgradedb/postgres.2019040300.php @@ -21,11 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("INSERT INTO uiconfig (section, var, value) VALUES (?, ?, ?)", array('userpanel', 'shortcut_icon', '')); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2019040300', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2019040400.php b/lib/upgradedb/postgres.2019040400.php index 2fb7e75598..8d240afdf9 100644 --- a/lib/upgradedb/postgres.2019040400.php +++ b/lib/upgradedb/postgres.2019040400.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE documents ADD COLUMN archived smallint DEFAULT 0 NOT NULL"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2019040400', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2019040500.php b/lib/upgradedb/postgres.2019040500.php index fbdc681baf..6f6040fd5d 100644 --- a/lib/upgradedb/postgres.2019040500.php +++ b/lib/upgradedb/postgres.2019040500.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" ALTER TABLE documents ADD COLUMN auserid integer DEFAULT NULL; @@ -29,7 +28,3 @@ FOREIGN KEY (auserid) REFERENCES users (id) ON DELETE SET NULL ON UPDATE CASCADE; ALTER TABLE documents ADD COLUMN adate integer DEFAULT 0 NOT NULL; "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2019040500', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2019041200.php b/lib/upgradedb/postgres.2019041200.php index 8b78a518f4..6b76de60ae 100644 --- a/lib/upgradedb/postgres.2019041200.php +++ b/lib/upgradedb/postgres.2019041200.php @@ -21,13 +21,8 @@ * */ -$this->BeginTrans(); $this->Execute(" ALTER TABLE cash ADD COLUMN linktechnology integer DEFAULT NULL; CREATE INDEX cash_linktechnology_idx ON cash (linktechnology) "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2019041200', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2019042300.php b/lib/upgradedb/postgres.2019042300.php index 78d511c51c..1c003a6525 100644 --- a/lib/upgradedb/postgres.2019042300.php +++ b/lib/upgradedb/postgres.2019042300.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("UPDATE rtmessages SET body = REPLACE(REPLACE(body, '
', E'\n'), '
', E'\n') WHERE type > 1"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2019042300', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2019042400.php b/lib/upgradedb/postgres.2019042400.php index 0b258e4e2f..e40b17f5cf 100644 --- a/lib/upgradedb/postgres.2019042400.php +++ b/lib/upgradedb/postgres.2019042400.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" CREATE SEQUENCE rttemplatetypes_id_seq; @@ -44,6 +43,3 @@ CONSTRAINT rttemplatequeues_templateid_key UNIQUE (templateid, queueid) ) "); -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2019042400', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2019060300.php b/lib/upgradedb/postgres.2019060300.php index e4a9659030..3a354bd087 100644 --- a/lib/upgradedb/postgres.2019060300.php +++ b/lib/upgradedb/postgres.2019060300.php @@ -24,10 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("INSERT INTO uiconfig (section, var, value, description) VALUES (?, ?, ?, ?)", array('userpanel', 'show_period', '1', '')); -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2019060300', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2019071500.php b/lib/upgradedb/postgres.2019071500.php index 2b947983f9..c230ad8251 100644 --- a/lib/upgradedb/postgres.2019071500.php +++ b/lib/upgradedb/postgres.2019071500.php @@ -24,14 +24,9 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute(" ALTER TABLE ewx_stm_channels DROP CONSTRAINT ewx_stm_channels_cid_fkey; ALTER TABLE ewx_stm_channels ADD CONSTRAINT ewx_stm_channels_cid_fkey FOREIGN KEY (cid) REFERENCES customers(id) ON UPDATE CASCADE ON DELETE SET NULL "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2019071500', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2019072500.php b/lib/upgradedb/postgres.2019072500.php index 6fd53d02db..af234bcb1d 100644 --- a/lib/upgradedb/postgres.2019072500.php +++ b/lib/upgradedb/postgres.2019072500.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); if ($this->ResourceExists('events_address_id_fk', LMSDB::RESOURCE_TYPE_CONSTRAINT)) { $this->Execute(" @@ -30,7 +29,3 @@ FOREIGN KEY (address_id) REFERENCES addresses(id) ON UPDATE CASCADE ON DELETE SET NULL "); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2019072500', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2019080100.php b/lib/upgradedb/postgres.2019080100.php index 0f888e159d..692e608938 100644 --- a/lib/upgradedb/postgres.2019080100.php +++ b/lib/upgradedb/postgres.2019080100.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" ALTER TABLE uiconfig ADD COLUMN userid integer DEFAULT NULL @@ -32,7 +31,3 @@ ALTER TABLE uiconfig DROP CONSTRAINT IF EXISTS uiconfig_section_var_key; ALTER TABLE uiconfig ADD CONSTRAINT uiconfig_section_key UNIQUE (section, var, userid); "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2019080100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2019081200.php b/lib/upgradedb/postgres.2019081200.php index 09752e7fcc..f883fbffee 100644 --- a/lib/upgradedb/postgres.2019081200.php +++ b/lib/upgradedb/postgres.2019081200.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE documents ALTER COLUMN city TYPE varchar(100)"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2019081200', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2019082000.php b/lib/upgradedb/postgres.2019082000.php index d56e06f457..d463a9b374 100644 --- a/lib/upgradedb/postgres.2019082000.php +++ b/lib/upgradedb/postgres.2019082000.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE countries ADD COLUMN ccode varchar(5)"); @@ -31,7 +30,3 @@ $this->Execute("UPDATE countries SET ccode = ? WHERE name = ?", array('sk_SK', 'Slovakia')); $this->Execute("UPDATE countries SET ccode = ? WHERE name = ?", array('en_US', 'USA')); $this->Execute("INSERT INTO countries (name, ccode) VALUES (?, ?)", array('Czech', 'cs_CZ')); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2019082000', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2019082200.php b/lib/upgradedb/postgres.2019082200.php index 7d86d4e789..b26e7e8952 100644 --- a/lib/upgradedb/postgres.2019082200.php +++ b/lib/upgradedb/postgres.2019082200.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE nodesessions ADD COLUMN nasid text DEFAULT NULL"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2019082200', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2019082900.php b/lib/upgradedb/postgres.2019082900.php index 99aa89f7d2..3232883344 100644 --- a/lib/upgradedb/postgres.2019082900.php +++ b/lib/upgradedb/postgres.2019082900.php @@ -21,13 +21,8 @@ * */ -$this->BeginTrans(); $this->Execute( "INSERT INTO uiconfig (section, var, value) VALUES(?, ?, ?)", array('userpanel', 'timeout', intval(ConfigHelper::getConfig('phpui.timeout'))) ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2019082900', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2019083000.php b/lib/upgradedb/postgres.2019083000.php index 0fc9203822..dbd1f83884 100644 --- a/lib/upgradedb/postgres.2019083000.php +++ b/lib/upgradedb/postgres.2019083000.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE assignments ADD COLUMN count numeric(9,3) DEFAULT 1 NOT NULL"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2019083000', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2019083001.php b/lib/upgradedb/postgres.2019083001.php index 07cdc20bd5..e2523025bc 100644 --- a/lib/upgradedb/postgres.2019083001.php +++ b/lib/upgradedb/postgres.2019083001.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" DROP VIEW vnodealltariffs; @@ -255,7 +254,3 @@ OR (t1.nodeid IS NULL AND t2.nodeid IS NOT NULL) OR (t1.nodeid IS NULL AND t2.nodeid IS NULL)) "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2019083001', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2019090200.php b/lib/upgradedb/postgres.2019090200.php index 25a93498e3..d20bcdf067 100644 --- a/lib/upgradedb/postgres.2019090200.php +++ b/lib/upgradedb/postgres.2019090200.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE nodelocks ADD COLUMN disabled smallint NOT NULL DEFAULT 0"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2019090200', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2019091200.php b/lib/upgradedb/postgres.2019091200.php index aa2c42a561..41b2faaf61 100644 --- a/lib/upgradedb/postgres.2019091200.php +++ b/lib/upgradedb/postgres.2019091200.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" DROP VIEW vusers; @@ -31,7 +30,3 @@ SELECT *, (firstname || ' ' || lastname) AS name, (lastname || ' ' || firstname) AS rname FROM users "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2019091200', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2019091300.php b/lib/upgradedb/postgres.2019091300.php index be08bf68c6..b96bcb4921 100644 --- a/lib/upgradedb/postgres.2019091300.php +++ b/lib/upgradedb/postgres.2019091300.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" CREATE SEQUENCE twofactorauthcodehistory_id_seq; @@ -34,7 +33,3 @@ PRIMARY KEY (id) ) "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2019091300', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2019091301.php b/lib/upgradedb/postgres.2019091301.php index ed3be412e4..2b25b1e0ba 100644 --- a/lib/upgradedb/postgres.2019091301.php +++ b/lib/upgradedb/postgres.2019091301.php @@ -21,13 +21,8 @@ * */ -$this->BeginTrans(); $this->Execute(" ALTER TABLE twofactorauthcodehistory ADD COLUMN ipaddr bigint DEFAULT NULL; ALTER TABLE twofactorauthcodehistory ADD COLUMN success smallint NOT NULL DEFAULT 0 "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2019091301', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2019091600.php b/lib/upgradedb/postgres.2019091600.php index 9c72b686cc..0ee90721de 100644 --- a/lib/upgradedb/postgres.2019091600.php +++ b/lib/upgradedb/postgres.2019091600.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" CREATE SEQUENCE twofactorauthtrusteddevices_id_seq; @@ -36,7 +35,3 @@ PRIMARY KEY (id) ); "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2019091600', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2019091700.php b/lib/upgradedb/postgres.2019091700.php index c71b3dc500..3b91d735c3 100644 --- a/lib/upgradedb/postgres.2019091700.php +++ b/lib/upgradedb/postgres.2019091700.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $des_key = ConfigHelper::getConfig('phpui.des_key'); if (!empty($des_key)) { @@ -34,7 +33,3 @@ array('phpui', 'des_key') ); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2019091700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2019091701.php b/lib/upgradedb/postgres.2019091701.php index 7b1c831698..c91ca9b27a 100644 --- a/lib/upgradedb/postgres.2019091701.php +++ b/lib/upgradedb/postgres.2019091701.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" DROP VIEW vusers; @@ -30,7 +29,3 @@ SELECT *, (firstname || ' ' || lastname) AS name, (lastname || ' ' || firstname) AS rname FROM users "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2019091701', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2019091702.php b/lib/upgradedb/postgres.2019091702.php index 8cef43d18f..f11f8deae1 100644 --- a/lib/upgradedb/postgres.2019091702.php +++ b/lib/upgradedb/postgres.2019091702.php @@ -21,12 +21,7 @@ * */ -$this->BeginTrans(); if (!$this->ResourceExists('documents.splitpayment', LMSDB::RESOURCE_TYPE_COLUMN)) { $this->Execute("ALTER TABLE documents ADD COLUMN splitpayment smallint NOT NULL DEFAULT 0"); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2019091702', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2019092000.php b/lib/upgradedb/postgres.2019092000.php index 313751e510..5c9f572825 100644 --- a/lib/upgradedb/postgres.2019092000.php +++ b/lib/upgradedb/postgres.2019092000.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); if ($this->ResourceExists('voip_tariff_rules', LMSDB::RESOURCE_TYPE_TABLE)) { $this->Execute(" @@ -29,7 +28,3 @@ DROP SEQUENCE voip_tariff_rules_id_seq; "); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2019092000', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2019100900.php b/lib/upgradedb/postgres.2019100900.php index fa6a68c702..fe6432f8e2 100644 --- a/lib/upgradedb/postgres.2019100900.php +++ b/lib/upgradedb/postgres.2019100900.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE messageitems ADD COLUMN body text DEFAULT NULL"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2019100900', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2019100901.php b/lib/upgradedb/postgres.2019100901.php index afdb1f0181..5a629733be 100644 --- a/lib/upgradedb/postgres.2019100901.php +++ b/lib/upgradedb/postgres.2019100901.php @@ -21,11 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE messages ADD COLUMN contenttype varchar(255) DEFAULT 'text/plain'"); //$this->Execute("UPDATE messages SET contenttype='text/plain' WHERE contenttype IS NULL"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2019100901', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2019101000.php b/lib/upgradedb/postgres.2019101000.php index 9407f1229a..7e163dffed 100644 --- a/lib/upgradedb/postgres.2019101000.php +++ b/lib/upgradedb/postgres.2019101000.php @@ -21,12 +21,7 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE filecontainers ADD COLUMN messageid integer DEFAULT NULL"); $this->Execute("ALTER TABLE filecontainers ADD CONSTRAINT filecontainers_messageid_fkey FOREIGN KEY (messageid) REFERENCES messages (id) ON DELETE CASCADE ON UPDATE CASCADE"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2019101000', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2019102100.php b/lib/upgradedb/postgres.2019102100.php index aee54cb6b4..30b80af6fe 100644 --- a/lib/upgradedb/postgres.2019102100.php +++ b/lib/upgradedb/postgres.2019102100.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); if (!$this->ResourceExists('rttickets.modtime', LMSDB::RESOURCE_TYPE_COLUMN)) { $this->Execute(" @@ -30,7 +29,3 @@ UPDATE rttickets t SET modtime = (SELECT MAX(createtime) FROM rtmessages m WHERE m.ticketid = t.id) "); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2019102100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2019102400.php b/lib/upgradedb/postgres.2019102400.php index 0cfe6021c8..54c40ada47 100644 --- a/lib/upgradedb/postgres.2019102400.php +++ b/lib/upgradedb/postgres.2019102400.php @@ -21,13 +21,8 @@ * */ -$this->BeginTrans(); $this->Execute(" ALTER TABLE aliasassignments ALTER COLUMN accountid DROP NOT NULL; ALTER TABLE aliasassignments ALTER COLUMN accountid SET DEFAULT NULL "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2019102400', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2019102500.php b/lib/upgradedb/postgres.2019102500.php index 1105fc85ac..9cc6def92b 100644 --- a/lib/upgradedb/postgres.2019102500.php +++ b/lib/upgradedb/postgres.2019102500.php @@ -44,7 +44,6 @@ define('DOC_INVOICE_PRO', 6); } -$this->BeginTrans(); $this->Execute(" ALTER TABLE cash ADD COLUMN currency varchar(3); @@ -67,7 +66,3 @@ foreach (array('tariffs', 'assignments', 'liabilities') as $sql_table) { $this->Execute("UPDATE " . $sql_table . " SET currency = ?", array($_currency)); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2019102500', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2019102900.php b/lib/upgradedb/postgres.2019102900.php index 20a76cfc21..f26971edee 100644 --- a/lib/upgradedb/postgres.2019102900.php +++ b/lib/upgradedb/postgres.2019102900.php @@ -21,12 +21,7 @@ * */ -$this->BeginTrans(); if (!$this->ResourceExists('assignments.splitpayment', LMSDB::RESOURCE_TYPE_COLUMN)) { $this->Execute("ALTER TABLE assignments ADD COLUMN splitpayment smallint NOT NULL DEFAULT 0"); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2019102900', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2019102901.php b/lib/upgradedb/postgres.2019102901.php index 51b60c9f6e..f4785db8cb 100644 --- a/lib/upgradedb/postgres.2019102901.php +++ b/lib/upgradedb/postgres.2019102901.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE voipaccounts ADD COLUMN description text NOT NULL DEFAULT ''"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2019102901', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2019102902.php b/lib/upgradedb/postgres.2019102902.php index b9cc16f6fe..c41a347e23 100644 --- a/lib/upgradedb/postgres.2019102902.php +++ b/lib/upgradedb/postgres.2019102902.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" DROP VIEW vdivisions; @@ -33,7 +32,3 @@ JOIN vaddresses a ON a.id = d.address_id; ALTER TABLE documents ADD COLUMN div_bank varchar(100) DEFAULT NULL "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2019102902', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2019110700.php b/lib/upgradedb/postgres.2019110700.php index 1ae53e302b..c0d3d183e7 100644 --- a/lib/upgradedb/postgres.2019110700.php +++ b/lib/upgradedb/postgres.2019110700.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); if ($this->ResourceExists('assignments.splitpayment', LMSDB::RESOURCE_TYPE_COLUMN)) { $this->Execute("ALTER TABLE assignments DROP COLUMN splitpayment"); @@ -34,7 +33,3 @@ if (!$this->ResourceExists('liabilities.splitpayment', LMSDB::RESOURCE_TYPE_COLUMN)) { $this->Execute("ALTER TABLE liabilities ADD COLUMN splitpayment smallint NOT NULL DEFAULT 0"); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2019110700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2019112000.php b/lib/upgradedb/postgres.2019112000.php index 122a8a0840..8de0bb7810 100644 --- a/lib/upgradedb/postgres.2019112000.php +++ b/lib/upgradedb/postgres.2019112000.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE netdevices ADD COLUMN login varchar(60) DEFAULT '' NOT NULL"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2019112000', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2019121800.php b/lib/upgradedb/postgres.2019121800.php index c0bda6cc88..f7b264cd80 100644 --- a/lib/upgradedb/postgres.2019121800.php +++ b/lib/upgradedb/postgres.2019121800.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" CREATE TABLE customerbalances ( @@ -79,7 +78,3 @@ CREATE TRIGGER cash_customerbalances_truncate_trigger AFTER TRUNCATE ON cash EXECUTE PROCEDURE customerbalances_update() "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2019121800', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2020010400.php b/lib/upgradedb/postgres.2020010400.php index bb2061a2b6..896afbb1ca 100644 --- a/lib/upgradedb/postgres.2020010400.php +++ b/lib/upgradedb/postgres.2020010400.php @@ -21,13 +21,8 @@ * */ -$this->BeginTrans(); $this->Execute( "INSERT INTO uiconfig (section, var, value) VALUES (?, ?, ?)", array('userpanel', 'hide_archived_documents', 'false') ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020010400', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2020011000.php b/lib/upgradedb/postgres.2020011000.php index 94878957c3..227ab4958a 100644 --- a/lib/upgradedb/postgres.2020011000.php +++ b/lib/upgradedb/postgres.2020011000.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" DROP TRIGGER cash_customerbalances_truncate_trigger ON cash; @@ -88,7 +87,3 @@ CREATE TRIGGER cash_customerbalances_truncate_trigger AFTER TRUNCATE ON cash EXECUTE PROCEDURE customerbalances_update() "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020011000', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2020011400.php b/lib/upgradedb/postgres.2020011400.php index 6d2705d864..1d4c23ebb8 100644 --- a/lib/upgradedb/postgres.2020011400.php +++ b/lib/upgradedb/postgres.2020011400.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("INSERT INTO countries (name, ccode) VALUES (?, ?)", array('Guyana', 'en_GY')); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020011400', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2020011401.php b/lib/upgradedb/postgres.2020011401.php index 8d157e82c6..b1c936ee38 100644 --- a/lib/upgradedb/postgres.2020011401.php +++ b/lib/upgradedb/postgres.2020011401.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" DROP TRIGGER cash_customerbalances_truncate_trigger ON cash; @@ -91,7 +90,3 @@ CREATE TRIGGER cash_customerbalances_truncate_trigger AFTER TRUNCATE ON cash EXECUTE PROCEDURE customerbalances_update() "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020011401', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2020011402.php b/lib/upgradedb/postgres.2020011402.php index c77554a254..b4a25a9122 100644 --- a/lib/upgradedb/postgres.2020011402.php +++ b/lib/upgradedb/postgres.2020011402.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE assignments DROP COLUMN currency"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020011402', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2020013100.php b/lib/upgradedb/postgres.2020013100.php index 88fe65cff9..47fecfb666 100644 --- a/lib/upgradedb/postgres.2020013100.php +++ b/lib/upgradedb/postgres.2020013100.php @@ -21,14 +21,9 @@ * */ -$this->BeginTrans(); $this->Execute("INSERT INTO uiconfig (section, var, value) VALUES (?, ?, ?)", array('userpanel', 'sms_credential_reminders', 'true')); $this->Execute("INSERT INTO uiconfig (section, var, value) VALUES (?, ?, ?)", array('userpanel', 'mail_credential_reminders', 'true')); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020013100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2020013101.php b/lib/upgradedb/postgres.2020013101.php index 5cf7c1d083..12741a552f 100644 --- a/lib/upgradedb/postgres.2020013101.php +++ b/lib/upgradedb/postgres.2020013101.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE documents ADD COLUMN senddate integer NOT NULL DEFAULT 0"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020013101', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2020020500.php b/lib/upgradedb/postgres.2020020500.php index 159df623f2..5cbd5d6f64 100644 --- a/lib/upgradedb/postgres.2020020500.php +++ b/lib/upgradedb/postgres.2020020500.php @@ -21,12 +21,7 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE filecontainers ADD COLUMN netdevmodelid integer DEFAULT NULL"); $this->Execute("ALTER TABLE filecontainers ADD CONSTRAINT filecontainers_netdevmodelid_fkey FOREIGN KEY (netdevmodelid) REFERENCES netdevicemodels (id) ON DELETE CASCADE ON UPDATE CASCADE"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020020500', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2020030300.php b/lib/upgradedb/postgres.2020030300.php index 6f2159f31b..2815b8e409 100644 --- a/lib/upgradedb/postgres.2020030300.php +++ b/lib/upgradedb/postgres.2020030300.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" DROP VIEW customerview; @@ -91,7 +90,3 @@ LEFT JOIN vaddresses a2 ON ca2.address_id = a2.id WHERE c.type < 2 "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020030300', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2020030500.php b/lib/upgradedb/postgres.2020030500.php index 7ae7c53ac7..02296ffee2 100644 --- a/lib/upgradedb/postgres.2020030500.php +++ b/lib/upgradedb/postgres.2020030500.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); if (!$this->ResourceExists('tariffs.taxcategory', LMSDB::RESOURCE_TYPE_COLUMN)) { $this->Execute(" @@ -30,7 +29,3 @@ ALTER TABLE invoicecontents ADD taxcategory smallint DEFAULT 0 NOT NULL "); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020030500', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2020031000.php b/lib/upgradedb/postgres.2020031000.php index ff84d37447..779f8e779d 100644 --- a/lib/upgradedb/postgres.2020031000.php +++ b/lib/upgradedb/postgres.2020031000.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); if (!$this->ResourceExists('divisions.email', LMSDB::RESOURCE_TYPE_COLUMN)) { $this->Execute("DROP VIEW vdivisions"); @@ -34,7 +33,3 @@ JOIN vaddresses a ON a.id = d.address_id" ); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020031000', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2020040600.php b/lib/upgradedb/postgres.2020040600.php index 81768d0a87..e58dd566ab 100644 --- a/lib/upgradedb/postgres.2020040600.php +++ b/lib/upgradedb/postgres.2020040600.php @@ -26,7 +26,6 @@ define('CCONSENT_MAILINGNOTICE', 3); define('CCONSENT_EINVOICE', 4); -$this->BeginTrans(); $this->Execute(" CREATE TABLE customerconsents ( @@ -153,7 +152,3 @@ LEFT JOIN customerconsents cc4 ON cc4.customerid = c.id AND cc4.type = 4 WHERE c.type < 2; "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020040600', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2020040800.php b/lib/upgradedb/postgres.2020040800.php index 663af29701..fea1e4e17d 100644 --- a/lib/upgradedb/postgres.2020040800.php +++ b/lib/upgradedb/postgres.2020040800.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE documents ADD COLUMN confirmdate integer NOT NULL DEFAULT 0"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020040800', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2020040900.php b/lib/upgradedb/postgres.2020040900.php index 2f595150da..0a3cb789b0 100644 --- a/lib/upgradedb/postgres.2020040900.php +++ b/lib/upgradedb/postgres.2020040900.php @@ -21,13 +21,8 @@ * */ -$this->BeginTrans(); $this->Execute(" ALTER TABLE documentattachments RENAME COLUMN main TO type; ALTER TABLE documentattachments ADD COLUMN cdate integer NOT NULL DEFAULT 0 "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020040900', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2020040901.php b/lib/upgradedb/postgres.2020040901.php index ac0d46c296..b63ced0208 100644 --- a/lib/upgradedb/postgres.2020040901.php +++ b/lib/upgradedb/postgres.2020040901.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" INSERT INTO uiconfig (section, var, value, description, disabled) VALUES @@ -37,7 +36,3 @@ ('userpanel', 'document_approval_customer_notification_mail_subject', '', '', 0), ('userpanel', 'document_approval_customer_notification_mail_body', '', '', 0) "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020040901', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2020040902.php b/lib/upgradedb/postgres.2020040902.php index e4d5ca85a5..2bbc4c309a 100644 --- a/lib/upgradedb/postgres.2020040902.php +++ b/lib/upgradedb/postgres.2020040902.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute( "UPDATE uiconfig SET var = ? WHERE var = ?", @@ -32,7 +31,3 @@ "INSERT INTO uiconfig (section, var, value, description, type) VALUES (?, ?, ?, ?, ?)", array('userpanel', 'document_notification_mail_sender_name', '', '', 0) ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020040902', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2020040903.php b/lib/upgradedb/postgres.2020040903.php index 1d8a08c99c..137b2d2c50 100644 --- a/lib/upgradedb/postgres.2020040903.php +++ b/lib/upgradedb/postgres.2020040903.php @@ -21,14 +21,9 @@ * */ -$this->BeginTrans(); $this->Execute(" INSERT INTO uiconfig (section, var, value, description, disabled) VALUES ('userpanel', 'document_notification_mail_dsn_address', '', '', 0), ('userpanel', 'document_notification_mail_mdn_address', '', '', 0) "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020040903', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2020041000.php b/lib/upgradedb/postgres.2020041000.php index d031c95fed..1bfbd05ba6 100644 --- a/lib/upgradedb/postgres.2020041000.php +++ b/lib/upgradedb/postgres.2020041000.php @@ -21,13 +21,8 @@ * */ -$this->BeginTrans(); $this->Execute( "INSERT INTO uiconfig (section, var, value, description, type) VALUES (?, ?, ?, ?, ?)", array('userpanel', 'document_notification_mail_reply_address', '', '', 0) ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020041000', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2020041001.php b/lib/upgradedb/postgres.2020041001.php index 211d092bcd..2aabc62269 100644 --- a/lib/upgradedb/postgres.2020041001.php +++ b/lib/upgradedb/postgres.2020041001.php @@ -21,13 +21,8 @@ * */ -$this->BeginTrans(); $this->Execute( "INSERT INTO uiconfig (section, var, value, description, type) VALUES (?, ?, ?, ?, ?)", array('userpanel', 'document_approval_customer_onetime_password_sms_body', '', '', 0) ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020041001', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2020041600.php b/lib/upgradedb/postgres.2020041600.php index 15d9b1d087..4630449311 100644 --- a/lib/upgradedb/postgres.2020041600.php +++ b/lib/upgradedb/postgres.2020041600.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); if (!$this->ResourceExists('cash_importid_ukey', LMSDB::RESOURCE_TYPE_CONSTRAINT)) { $cash_import_duplicates = $this->GetAll( @@ -44,7 +43,3 @@ $this->Execute("ALTER TABLE cash ADD CONSTRAINT cash_importid_ukey UNIQUE (importid)"); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020041600', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2020042000.php b/lib/upgradedb/postgres.2020042000.php index 9e007c39e6..680119e15a 100644 --- a/lib/upgradedb/postgres.2020042000.php +++ b/lib/upgradedb/postgres.2020042000.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE customercontacts ALTER COLUMN name TYPE varchar(10000)"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020042000', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2020042700.php b/lib/upgradedb/postgres.2020042700.php index d84ca8a936..1f8f40c355 100644 --- a/lib/upgradedb/postgres.2020042700.php +++ b/lib/upgradedb/postgres.2020042700.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE netnodes ALTER COLUMN admcontact TYPE text"); $this->Execute("ALTER TABLE messageitems ALTER COLUMN externalmsgid TYPE integer"); @@ -32,7 +31,3 @@ $this->Execute("ALTER TABLE voip_numbers ADD COLUMN tariff_id integer NULL"); $this->Execute("ALTER TABLE voip_numbers ADD CONSTRAINT voip_numbers_tariff_id_fkey FOREIGN KEY (tariff_id) REFERENCES tariffs (id) ON DELETE SET NULL ON UPDATE CASCADE"); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020042700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2020042701.php b/lib/upgradedb/postgres.2020042701.php index cb79fe22da..22781eb3cf 100644 --- a/lib/upgradedb/postgres.2020042701.php +++ b/lib/upgradedb/postgres.2020042701.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE pna ALTER COLUMN zip TYPE varchar(10)"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020042701', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2020050400.php b/lib/upgradedb/postgres.2020050400.php index b1bac12998..140f344bb3 100644 --- a/lib/upgradedb/postgres.2020050400.php +++ b/lib/upgradedb/postgres.2020050400.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" CREATE VIEW customerconsentview AS @@ -113,7 +112,3 @@ LEFT JOIN customerconsentview cc ON cc.customerid = c.id WHERE c.type < 2 "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020050400', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2020051300.php b/lib/upgradedb/postgres.2020051300.php index 99ebf3f9ce..0408c6c409 100644 --- a/lib/upgradedb/postgres.2020051300.php +++ b/lib/upgradedb/postgres.2020051300.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" DROP VIEW vnodealltariffs; @@ -406,7 +405,3 @@ OR (t1.nodeid IS NULL AND t2.nodeid IS NOT NULL) OR (t1.nodeid IS NULL AND t2.nodeid IS NULL)) "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020051300', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2020052900.php b/lib/upgradedb/postgres.2020052900.php index 10957022ba..bfd37c967e 100644 --- a/lib/upgradedb/postgres.2020052900.php +++ b/lib/upgradedb/postgres.2020052900.php @@ -37,7 +37,6 @@ function parseCssProperties($text) return $result; } -$this->BeginTrans(); $categories = $this->GetAll('SELECT id, style FROM rtcategories'); if (!empty($categories)) { @@ -61,7 +60,3 @@ function parseCssProperties($text) ); } } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020052900', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2020060900.php b/lib/upgradedb/postgres.2020060900.php index d3426e228e..bc5be58525 100644 --- a/lib/upgradedb/postgres.2020060900.php +++ b/lib/upgradedb/postgres.2020060900.php @@ -21,9 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("INSERT INTO uiconfig (section, var, value) VALUES ('userpanel', 'startup_module', 'info')"); -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020060900', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2020071600.php b/lib/upgradedb/postgres.2020071600.php index 803e18e020..0740a011b0 100644 --- a/lib/upgradedb/postgres.2020071600.php +++ b/lib/upgradedb/postgres.2020071600.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); define('CCONSENT_TRANSFERFORM', 7); $this->Execute( @@ -29,7 +28,3 @@ (SELECT id, ?NOW?, ? FROM customers)', array(CCONSENT_TRANSFERFORM) ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020071600', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2020073100.php b/lib/upgradedb/postgres.2020073100.php index cf8ac6f6c3..1006be46ba 100644 --- a/lib/upgradedb/postgres.2020073100.php +++ b/lib/upgradedb/postgres.2020073100.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE customerbalances ALTER COLUMN balance TYPE numeric(12,2)"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020073100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2020080300.php b/lib/upgradedb/postgres.2020080300.php index f4969c3c2e..897d90ce1c 100644 --- a/lib/upgradedb/postgres.2020080300.php +++ b/lib/upgradedb/postgres.2020080300.php @@ -20,9 +20,3 @@ * USA. * */ - -$this->BeginTrans(); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020080300', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2020081200.php b/lib/upgradedb/postgres.2020081200.php index a18a5d3755..12af1f9e04 100644 --- a/lib/upgradedb/postgres.2020081200.php +++ b/lib/upgradedb/postgres.2020081200.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" CREATE SEQUENCE userdivisions_id_seq; @@ -96,7 +95,3 @@ WHERE ud2.userid = lms_current_user()) GROUP BY u.id "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020081200', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2020081300.php b/lib/upgradedb/postgres.2020081300.php index 24f0838bfa..901c815c45 100644 --- a/lib/upgradedb/postgres.2020081300.php +++ b/lib/upgradedb/postgres.2020081300.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("DROP VIEW vusers"); @@ -35,7 +34,3 @@ WHERE ud2.userid = lms_current_user()) GROUP BY u.id "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020081300', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2020081400.php b/lib/upgradedb/postgres.2020081400.php index 47f7815bf0..21a9789444 100644 --- a/lib/upgradedb/postgres.2020081400.php +++ b/lib/upgradedb/postgres.2020081400.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" CREATE SEQUENCE customernotes_id_seq; @@ -36,7 +35,3 @@ PRIMARY KEY (id) ) "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020081400', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2020081800.php b/lib/upgradedb/postgres.2020081800.php index 86d73d5f51..4d884235c7 100644 --- a/lib/upgradedb/postgres.2020081800.php +++ b/lib/upgradedb/postgres.2020081800.php @@ -24,7 +24,6 @@ define('CCONSENT_MAILINGNOTICE_2020081800', 3); define('CCONSENT_SMSNOTICE', 8); -$this->BeginTrans(); $this->Execute( "UPDATE uiconfig SET value = REPLACE(value, ?, ?) WHERE section = ? AND var = ?", @@ -145,7 +144,3 @@ LEFT JOIN customerconsentview cc ON cc.customerid = c.id WHERE c.type < 2 "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020081800', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2020081900.php b/lib/upgradedb/postgres.2020081900.php index 2261a51695..1c0beec55f 100644 --- a/lib/upgradedb/postgres.2020081900.php +++ b/lib/upgradedb/postgres.2020081900.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("DROP VIEW IF EXISTS vallusers"); @@ -30,7 +29,3 @@ SELECT *, (firstname || ' ' || lastname) AS name, (lastname || ' ' || firstname) AS rname FROM users "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020081900', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2020082500.php b/lib/upgradedb/postgres.2020082500.php index 9366f3af53..e9d29d3839 100644 --- a/lib/upgradedb/postgres.2020082500.php +++ b/lib/upgradedb/postgres.2020082500.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE templates ALTER COLUMN name TYPE varchar(100)"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020082500', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2020082600.php b/lib/upgradedb/postgres.2020082600.php index e1df3992e8..8730bcd816 100644 --- a/lib/upgradedb/postgres.2020082600.php +++ b/lib/upgradedb/postgres.2020082600.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); if ($this->ResourceExists('tariff_rule_id_fk', LMSDB::RESOURCE_TYPE_CONSTRAINT)) { $this->Execute("ALTER TABLE tariffs DROP CONSTRAINT tariff_rule_id_fk"); @@ -34,7 +33,3 @@ "ALTER TABLE tariffs ADD CONSTRAINT tariffs_voip_tariff_rule_id_fkey FOREIGN KEY (voip_tariff_rule_id) REFERENCES voip_rule_groups (id) ON UPDATE CASCADE ON DELETE SET NULL" ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020082600', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2020082800.php b/lib/upgradedb/postgres.2020082800.php index 4a82ed0e12..69dc5cd3bf 100644 --- a/lib/upgradedb/postgres.2020082800.php +++ b/lib/upgradedb/postgres.2020082800.php @@ -21,12 +21,7 @@ * */ -$this->BeginTrans(); if (!$this->ResourceExists('assignments.backwardperiod', LMSDB::RESOURCE_TYPE_COLUMN)) { $this->Execute("ALTER TABLE assignments ADD COLUMN backwardperiod smallint NOT NULL DEFAULT 0"); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020082800', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2020083100.php b/lib/upgradedb/postgres.2020083100.php index c010deebf4..50cc0c26c5 100644 --- a/lib/upgradedb/postgres.2020083100.php +++ b/lib/upgradedb/postgres.2020083100.php @@ -21,12 +21,7 @@ * */ -$this->BeginTrans(); if (!$this->ResourceExists('promotionassignments.backwardperiod', LMSDB::RESOURCE_TYPE_COLUMN)) { $this->Execute("ALTER TABLE promotionassignments ADD COLUMN backwardperiod smallint DEFAULT 0 NOT NULL"); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020083100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2020090200.php b/lib/upgradedb/postgres.2020090200.php index 9af2b06d6e..1c32ed1584 100644 --- a/lib/upgradedb/postgres.2020090200.php +++ b/lib/upgradedb/postgres.2020090200.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); if ($this->ResourceExists('uiconfig_configid_fkey', LMSDB::RESOURCE_TYPE_CONSTRAINT)) { $this->Execute("ALTER TABLE uiconfig DROP CONSTRAINT uiconfig_configid_fkey"); @@ -38,7 +37,3 @@ $this->Execute("ALTER TABLE uiconfig DROP CONSTRAINT uiconfig_section_key"); } $this->Execute("ALTER TABLE uiconfig ADD CONSTRAINT uiconfig_section_var_userid_divisionid_ukey UNIQUE (section, var, userid, divisionid)"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020090200', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2020091100.php b/lib/upgradedb/postgres.2020091100.php index a7709bc85d..b82f75ba13 100644 --- a/lib/upgradedb/postgres.2020091100.php +++ b/lib/upgradedb/postgres.2020091100.php @@ -21,12 +21,7 @@ * */ -$this->BeginTrans(); if (!$this->ResourceExists('documents.flags', LMSDB::RESOURCE_TYPE_COLUMN)) { $this->Execute("ALTER TABLE documents ADD COLUMN flags smallint NOT NULL DEFAULT 0"); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020091100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2020091600.php b/lib/upgradedb/postgres.2020091600.php index f055eab160..9ffbdab543 100644 --- a/lib/upgradedb/postgres.2020091600.php +++ b/lib/upgradedb/postgres.2020091600.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" CREATE SEQUENCE routednetworks_id_seq; @@ -36,7 +35,3 @@ CONSTRAINT routednetworks_netid_key UNIQUE (netid) ) "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020091600', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2020092100.php b/lib/upgradedb/postgres.2020092100.php index a52fe84483..11249d9a28 100644 --- a/lib/upgradedb/postgres.2020092100.php +++ b/lib/upgradedb/postgres.2020092100.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" CREATE SEQUENCE location_city_types_id_seq; @@ -35,7 +34,3 @@ ALTER TABLE location_cities ADD COLUMN type integer DEFAULT NULL CONSTRAINT location_cities_type_fkey REFERENCES location_city_types (id) ON DELETE CASCADE ON UPDATE CASCADE "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020092100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2020092400.php b/lib/upgradedb/postgres.2020092400.php index 8ca0f16228..783a5cc1e6 100644 --- a/lib/upgradedb/postgres.2020092400.php +++ b/lib/upgradedb/postgres.2020092400.php @@ -21,12 +21,7 @@ * */ -$this->BeginTrans(); if (!$this->ResourceExists('liabilities.type', LMSDB::RESOURCE_TYPE_COLUMN)) { $this->Execute("ALTER TABLE liabilities ADD COLUMN type smallint DEFAULT -1 NOT NULL"); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020092400', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2020100100.php b/lib/upgradedb/postgres.2020100100.php index 8b8bb665d1..c163039b46 100644 --- a/lib/upgradedb/postgres.2020100100.php +++ b/lib/upgradedb/postgres.2020100100.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); if (!$this->ResourceExists('customers.flags', LMSDB::RESOURCE_TYPE_COLUMN)) { $this->Execute(" @@ -128,7 +127,3 @@ WHERE c.type < 2 "); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020100100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2020102200.php b/lib/upgradedb/postgres.2020102200.php index c3d20fcc1a..bbfa2c5a61 100644 --- a/lib/upgradedb/postgres.2020102200.php +++ b/lib/upgradedb/postgres.2020102200.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("DROP VIEW vdivisions"); @@ -34,7 +33,3 @@ FROM divisions d JOIN vaddresses a ON a.id = d.address_id "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020102200', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2020110200.php b/lib/upgradedb/postgres.2020110200.php index b037cd8a87..d8fbb7896f 100644 --- a/lib/upgradedb/postgres.2020110200.php +++ b/lib/upgradedb/postgres.2020110200.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" ALTER TABLE promotionschemas ADD COLUMN deleted smallint DEFAULT 0 NOT NULL; @@ -45,7 +44,3 @@ ); } } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020110200', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2020110201.php b/lib/upgradedb/postgres.2020110201.php index ee14315b1f..0dacc19b45 100644 --- a/lib/upgradedb/postgres.2020110201.php +++ b/lib/upgradedb/postgres.2020110201.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE promotions ADD COLUMN deleted smallint DEFAULT 0 NOT NULL"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020110201', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2020110400.php b/lib/upgradedb/postgres.2020110400.php index eb8be8fb74..798fdfe658 100644 --- a/lib/upgradedb/postgres.2020110400.php +++ b/lib/upgradedb/postgres.2020110400.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" DROP VIEW customeraddressview; @@ -126,7 +125,3 @@ LEFT JOIN customerconsentview cc ON cc.customerid = c.id WHERE c.type < 2; "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020110400', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2020110600.php b/lib/upgradedb/postgres.2020110600.php index bb1add9492..67ddd0a8ca 100644 --- a/lib/upgradedb/postgres.2020110600.php +++ b/lib/upgradedb/postgres.2020110600.php @@ -21,14 +21,9 @@ * */ -$this->BeginTrans(); $this->Execute(" ALTER TABLE rtqueues ADD COLUMN newticketsmsbody text DEFAULT NULL; ALTER TABLE rtqueues ADD COLUMN newmessagesmsbody text DEFAULT NULL; ALTER TABLE rtqueues ADD COLUMN resolveticketsmsbody text DEFAULT NULL "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020110600', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2020111000.php b/lib/upgradedb/postgres.2020111000.php index af5ea2aa68..882db63b2e 100644 --- a/lib/upgradedb/postgres.2020111000.php +++ b/lib/upgradedb/postgres.2020111000.php @@ -21,13 +21,8 @@ * */ -$this->BeginTrans(); $this->Execute(" ALTER TABLE rtmessages ADD COLUMN contenttype varchar(255) DEFAULT 'text/plain'; ALTER TABLE rtattachments ADD COLUMN cid varchar(255) DEFAULT NULL "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020111000', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2020112600.php b/lib/upgradedb/postgres.2020112600.php index 5dca20004a..c05b77e16c 100644 --- a/lib/upgradedb/postgres.2020112600.php +++ b/lib/upgradedb/postgres.2020112600.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE tariffs ADD COLUMN flags smallint DEFAULT 0 NOT NULL"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020112600', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2020112601.php b/lib/upgradedb/postgres.2020112601.php index a59e7e2b91..f9484fea79 100644 --- a/lib/upgradedb/postgres.2020112601.php +++ b/lib/upgradedb/postgres.2020112601.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" CREATE SEQUENCE netdevicetypes_id_seq; @@ -43,7 +42,3 @@ VALUES (?), (?), (?), (?), (?), (?), (?), (?), (?), (?), (?)", array('router', 'switch', 'antenna', 'access-point', 'PON OLT', 'PON ONT', 'PON splitter', 'GSM modem', 'DSL modem', 'power line adapter', 'IPTV decoder') ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020112601', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2020112800.php b/lib/upgradedb/postgres.2020112800.php index 75b9afa43a..7a1ca9bc67 100644 --- a/lib/upgradedb/postgres.2020112800.php +++ b/lib/upgradedb/postgres.2020112800.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE userdivisions DROP CONSTRAINT users_userid_fkey"); $this->Execute("ALTER TABLE userdivisions ADD CONSTRAINT userdivisions_userid_fkey @@ -30,7 +29,3 @@ $this->Execute("ALTER TABLE userdivisions DROP CONSTRAINT divisions_divisionid_fkey"); $this->Execute("ALTER TABLE userdivisions ADD CONSTRAINT userdivisions_divisionid_fkey FOREIGN KEY (divisionid) REFERENCES divisions (id) ON DELETE RESTRICT ON UPDATE CASCADE"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020112800', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2020120800.php b/lib/upgradedb/postgres.2020120800.php index 921bca19e6..62d139547f 100644 --- a/lib/upgradedb/postgres.2020120800.php +++ b/lib/upgradedb/postgres.2020120800.php @@ -21,13 +21,8 @@ * */ -$this->BeginTrans(); $this->Execute( "INSERT INTO uiconfig (section, var, value) VALUES (?, ?, ?)", array('userpanel', 'pin_validation', 'true') ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020120800', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2020121400.php b/lib/upgradedb/postgres.2020121400.php index 1d969a7db6..6fe86e2274 100644 --- a/lib/upgradedb/postgres.2020121400.php +++ b/lib/upgradedb/postgres.2020121400.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); if (!$this->GetOne( "SELECT id FROM uiconfig WHERE section = ? AND var = ?", @@ -35,7 +34,3 @@ ('userpanel', 'new_document_customer_notification_sms_body', '', '', 0) "); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020121400', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2020122200.php b/lib/upgradedb/postgres.2020122200.php index 3e291ddbaf..d9785a7c9b 100644 --- a/lib/upgradedb/postgres.2020122200.php +++ b/lib/upgradedb/postgres.2020122200.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("CREATE SEQUENCE vlans_id_seq"); @@ -43,7 +42,3 @@ $this->Execute("ALTER TABLE networks ADD CONSTRAINT networks_vlanid_fkey FOREIGN KEY (vlanid) REFERENCES vlans (id) ON DELETE SET NULL ON UPDATE CASCADE"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2020122200', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2021010700.php b/lib/upgradedb/postgres.2021010700.php index 4c115c1e87..66d29d92fb 100644 --- a/lib/upgradedb/postgres.2021010700.php +++ b/lib/upgradedb/postgres.2021010700.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" DROP VIEW customeraddressview; @@ -114,7 +113,3 @@ LEFT JOIN customerconsentview cc ON cc.customerid = c.id WHERE c.type < 2; "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021010700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2021012100.php b/lib/upgradedb/postgres.2021012100.php index 597181bfe3..5ce57beceb 100644 --- a/lib/upgradedb/postgres.2021012100.php +++ b/lib/upgradedb/postgres.2021012100.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE vlans ALTER COLUMN customerid TYPE integer"); @@ -32,7 +31,3 @@ $this->Execute("ALTER TABLE vlans DROP CONSTRAINT vlans_ukey"); $this->Execute("ALTER TABLE vlans ADD CONSTRAINT vlans_customerid_ukey UNIQUE (vlanid, customerid)"); $this->Execute("ALTER TABLE vlans ADD CONSTRAINT vlans_netnodeid_ukey UNIQUE (vlanid, netnodeid)"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021012100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2021020300.php b/lib/upgradedb/postgres.2021020300.php index 9c31d88926..7dc6149277 100644 --- a/lib/upgradedb/postgres.2021020300.php +++ b/lib/upgradedb/postgres.2021020300.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" CREATE TABLE numberplanusers ( @@ -33,7 +32,3 @@ ); CREATE INDEX numberplanusers_userid_idx ON numberplanusers (userid); "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021020300', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2021020301.php b/lib/upgradedb/postgres.2021020301.php index 23fca1f2c6..bf59ba432b 100644 --- a/lib/upgradedb/postgres.2021020301.php +++ b/lib/upgradedb/postgres.2021020301.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" CREATE TABLE customercontactproperties ( @@ -34,7 +33,3 @@ CREATE INDEX customercontactproperties_name_idx ON customercontactproperties (name); CREATE INDEX customercontactproperties_value_idx ON customercontactproperties (value); "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021020301', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2021021200.php b/lib/upgradedb/postgres.2021021200.php index 0aabdb99d4..696c0082f5 100644 --- a/lib/upgradedb/postgres.2021021200.php +++ b/lib/upgradedb/postgres.2021021200.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); if (!$this->ResourceExists('divisions.phone', LMSDB::RESOURCE_TYPE_COLUMN)) { $this->Execute("DROP VIEW vdivisions"); @@ -36,7 +35,3 @@ JOIN vaddresses a ON a.id = d.address_id "); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021021200', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2021021600.php b/lib/upgradedb/postgres.2021021600.php index c2a4e9233b..aa2fd4c559 100644 --- a/lib/upgradedb/postgres.2021021600.php +++ b/lib/upgradedb/postgres.2021021600.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE cashimport ADD COLUMN srcaccount varchar(60) DEFAULT NULL"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021021600', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2021021800.php b/lib/upgradedb/postgres.2021021800.php index 4c5e4acf07..3bf22dbdff 100644 --- a/lib/upgradedb/postgres.2021021800.php +++ b/lib/upgradedb/postgres.2021021800.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" DROP VIEW vnodealltariffs; @@ -263,7 +262,3 @@ OR (t1.nodeid IS NULL AND t2.nodeid IS NOT NULL) OR (t1.nodeid IS NULL AND t2.nodeid IS NULL)) "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021021800', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2021022100.php b/lib/upgradedb/postgres.2021022100.php index 0e17fa06ad..05cfed4487 100644 --- a/lib/upgradedb/postgres.2021022100.php +++ b/lib/upgradedb/postgres.2021022100.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); if (!$this->ResourceExists('nodes.login', LMSDB::RESOURCE_TYPE_COLUMN)) { $this->Execute(" @@ -291,7 +290,3 @@ OR (t1.nodeid IS NULL AND t2.nodeid IS NULL)) "); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021022100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2021022500.php b/lib/upgradedb/postgres.2021022500.php index 5ba4129aaa..6f868e46d6 100644 --- a/lib/upgradedb/postgres.2021022500.php +++ b/lib/upgradedb/postgres.2021022500.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); if (!$this->ResourceExists('netdevicemacs', LMSDB::RESOURCE_TYPE_TABLE)) { $this->Execute(" @@ -41,7 +40,3 @@ CREATE INDEX netdevicemacs_label_idx ON netdevicemacs (label) "); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021022500', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2021030900.php b/lib/upgradedb/postgres.2021030900.php index e27056ca52..ebba5679f8 100644 --- a/lib/upgradedb/postgres.2021030900.php +++ b/lib/upgradedb/postgres.2021030900.php @@ -25,7 +25,6 @@ $numberplans = $this->GetAllByKey("SELECT * FROM numberplans ORDER BY id", 'id'); -$this->BeginTrans(); $this->LockTables("documents"); @@ -60,7 +59,3 @@ } while (!$stop); $this->UnLockTables("documents"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021030900', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2021031000.php b/lib/upgradedb/postgres.2021031000.php index b7ad0b4224..a8634b2d62 100644 --- a/lib/upgradedb/postgres.2021031000.php +++ b/lib/upgradedb/postgres.2021031000.php @@ -25,13 +25,8 @@ define('MONTHLY', 3); } -$this->BeginTrans(); if (!$this->ResourceExists('invoicecontents.period', LMSDB::RESOURCE_TYPE_COLUMN)) { $this->Execute("ALTER TABLE invoicecontents ADD COLUMN period smallint DEFAULT NULL"); $this->Execute("ALTER TABLE invoicecontents ALTER COLUMN period SET DEFAULT ?", array(MONTHLY)); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021031000', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2021031800.php b/lib/upgradedb/postgres.2021031800.php index 153fd77d46..95135ce612 100644 --- a/lib/upgradedb/postgres.2021031800.php +++ b/lib/upgradedb/postgres.2021031800.php @@ -21,12 +21,7 @@ * */ -$this->BeginTrans(); $this->Execute(" UPDATE customers SET ict = ict + 1 WHERE icn <> '' "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021031800', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2021032200.php b/lib/upgradedb/postgres.2021032200.php index 5407c00fb8..7bfd0b8bb5 100644 --- a/lib/upgradedb/postgres.2021032200.php +++ b/lib/upgradedb/postgres.2021032200.php @@ -21,14 +21,9 @@ * */ -$this->BeginTrans(); if (!$this->ResourceExists('cash.servicetype', LMSDB::RESOURCE_TYPE_COLUMN)) { $this->Execute("ALTER TABLE cash ADD COLUMN servicetype smallint DEFAULT NULL"); $this->Execute("UPDATE cash SET servicetype = (SELECT t.type FROM invoicecontents ic JOIN tariffs t ON t.id = ic.tariffid WHERE ic.docid = cash.docid AND ic.itemid = cash.itemid LIMIT 1)"); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021032200', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2021032300.php b/lib/upgradedb/postgres.2021032300.php index 1f4ba187e8..e99c774c13 100644 --- a/lib/upgradedb/postgres.2021032300.php +++ b/lib/upgradedb/postgres.2021032300.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute( "INSERT INTO uiconfig (section, var, value) VALUES (?, ?, ?)", @@ -31,7 +30,3 @@ 'false', ) ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021032300', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2021040400.php b/lib/upgradedb/postgres.2021040400.php index ac93970e5d..3d89e251b0 100644 --- a/lib/upgradedb/postgres.2021040400.php +++ b/lib/upgradedb/postgres.2021040400.php @@ -24,13 +24,8 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("INSERT INTO uiconfig (section, var, value, description) VALUES (?, ?, ?, ?)", array('userpanel', 'show_discount', '1', '')); $this->Execute("INSERT INTO uiconfig (section, var, value, description) VALUES (?, ?, ?, ?)", array('userpanel', 'show_invoice_flag', '1', '')); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021040400', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2021040500.php b/lib/upgradedb/postgres.2021040500.php index 13cbc31340..526fd769a9 100644 --- a/lib/upgradedb/postgres.2021040500.php +++ b/lib/upgradedb/postgres.2021040500.php @@ -24,11 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("INSERT INTO uiconfig (section, var, value, description) VALUES (?, ?, ?, ?)", array('userpanel', 'show_discounted_value', '0', '')); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021040500', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2021040900.php b/lib/upgradedb/postgres.2021040900.php index 557a166041..48a373085e 100644 --- a/lib/upgradedb/postgres.2021040900.php +++ b/lib/upgradedb/postgres.2021040900.php @@ -24,11 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("ALTER TABLE rttickets ALTER COLUMN priority DROP NOT NULL"); $this->Execute("ALTER TABLE rttickets ALTER COLUMN priority SET DEFAULT NULL"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021040900', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2021042200.php b/lib/upgradedb/postgres.2021042200.php index 3e8443312a..a19057421a 100644 --- a/lib/upgradedb/postgres.2021042200.php +++ b/lib/upgradedb/postgres.2021042200.php @@ -24,10 +24,6 @@ * $Id$ */ -$this->BeginTrans(); $this->Execute("ALTER TABLE rttickets ALTER COLUMN requestor DROP NOT NULL"); $this->Execute("ALTER TABLE rttickets ALTER COLUMN requestor SET DEFAULT NULL"); -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021042200', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2021042800.php b/lib/upgradedb/postgres.2021042800.php index b9d3170d54..43296045d3 100644 --- a/lib/upgradedb/postgres.2021042800.php +++ b/lib/upgradedb/postgres.2021042800.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("DROP VIEW vusers"); @@ -37,7 +36,3 @@ WHERE ud2.userid = lms_current_user()) GROUP BY u.id "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021042800', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2021050700.php b/lib/upgradedb/postgres.2021050700.php index e4ff24e781..ed94ff81de 100644 --- a/lib/upgradedb/postgres.2021050700.php +++ b/lib/upgradedb/postgres.2021050700.php @@ -21,11 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE netdevices ALTER COLUMN producer TYPE varchar(256)"); $this->Execute("ALTER TABLE netdevices ALTER COLUMN model TYPE varchar(256)"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021050700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2021050701.php b/lib/upgradedb/postgres.2021050701.php index a3791c35d0..ea1b245a1e 100644 --- a/lib/upgradedb/postgres.2021050701.php +++ b/lib/upgradedb/postgres.2021050701.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); if (!$this->ResourceExists('vcustomerassignments', LMSDB::RESOURCE_TYPE_VIEW)) { $this->Execute(" @@ -72,7 +71,3 @@ UPDATE customerassignments SET startdate = NULL "); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021050701', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2021051000.php b/lib/upgradedb/postgres.2021051000.php index ddbbbb580f..603b52c6ca 100644 --- a/lib/upgradedb/postgres.2021051000.php +++ b/lib/upgradedb/postgres.2021051000.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("UPDATE customerassignments SET startdate = 0 WHERE startdate IS NULL"); $this->Execute("ALTER TABLE customerassignments ALTER COLUMN startdate SET NOT NULL"); @@ -68,7 +67,3 @@ WHERE ud.userid = lms_current_user())) AND c.type < 2 "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021051000', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2021051300.php b/lib/upgradedb/postgres.2021051300.php index 80fadd6c40..7be2586d01 100644 --- a/lib/upgradedb/postgres.2021051300.php +++ b/lib/upgradedb/postgres.2021051300.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); if (!$this->ResourceExists('divisions.firstname', LMSDB::RESOURCE_TYPE_COLUMN)) { $this->Execute(" @@ -36,7 +35,3 @@ JOIN vaddresses a ON a.id = d.address_id "); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021051300', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2021051400.php b/lib/upgradedb/postgres.2021051400.php index f947a43a0d..55282fbbee 100644 --- a/lib/upgradedb/postgres.2021051400.php +++ b/lib/upgradedb/postgres.2021051400.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); if (!$this->ResourceExists('divisions.birthdate', LMSDB::RESOURCE_TYPE_COLUMN)) { $this->Execute(" @@ -35,7 +34,3 @@ JOIN vaddresses a ON a.id = d.address_id "); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021051400', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2021051900.php b/lib/upgradedb/postgres.2021051900.php index 3c270c9bc7..14585c6caf 100644 --- a/lib/upgradedb/postgres.2021051900.php +++ b/lib/upgradedb/postgres.2021051900.php @@ -21,14 +21,9 @@ * */ -$this->BeginTrans(); $this->Execute(" ALTER TABLE tariffs ADD COLUMN netflag smallint DEFAULT 0 NOT NULL; ALTER TABLE tariffs ADD COLUMN netvalue numeric(9,2) DEFAULT NULL; UPDATE tariffs SET netvalue = ROUND(value / ((SELECT taxes.value FROM taxes WHERE taxes.id = taxid) / 100 + 1), 2) WHERE netvalue IS NULL "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021051900', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2021052400.php b/lib/upgradedb/postgres.2021052400.php index f78b318096..ab0d87250f 100644 --- a/lib/upgradedb/postgres.2021052400.php +++ b/lib/upgradedb/postgres.2021052400.php @@ -21,14 +21,9 @@ * */ -$this->BeginTrans(); $this->Execute(" ALTER TABLE liabilities ADD COLUMN netflag smallint DEFAULT 0 NOT NULL; ALTER TABLE liabilities ADD COLUMN netvalue numeric(9,2) DEFAULT NULL; UPDATE liabilities SET netvalue = ROUND(value / ((SELECT taxes.value FROM taxes WHERE taxes.id = taxid) / 100 + 1), 2) WHERE netvalue IS NULL "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021052400', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2021061500.php b/lib/upgradedb/postgres.2021061500.php index 9afc784986..0a8218f5e3 100644 --- a/lib/upgradedb/postgres.2021061500.php +++ b/lib/upgradedb/postgres.2021061500.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE assignments ALTER COLUMN pdiscount TYPE numeric(5,2)"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021061500', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2021061600.php b/lib/upgradedb/postgres.2021061600.php index a71982f07c..4c77ef9c5f 100644 --- a/lib/upgradedb/postgres.2021061600.php +++ b/lib/upgradedb/postgres.2021061600.php @@ -21,14 +21,9 @@ * */ -$this->BeginTrans(); if ($this->ResourceExists('vinvoicecontents', LMSDB::RESOURCE_TYPE_VIEW)) { $this->Execute("DROP VIEW vinvoicecontents"); } $this->Execute("ALTER TABLE invoicecontents ALTER COLUMN pdiscount TYPE numeric(5,2)"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021061600', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2021061601.php b/lib/upgradedb/postgres.2021061601.php index d07611be94..42f6b39d35 100644 --- a/lib/upgradedb/postgres.2021061601.php +++ b/lib/upgradedb/postgres.2021061601.php @@ -21,13 +21,8 @@ * */ -$this->BeginTrans(); $this->Execute( "INSERT INTO uiconfig (section, var, value) VALUES (?, ?, ?)", array('userpanel', 'allowed_document_types', '') ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021061601', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2021061700.php b/lib/upgradedb/postgres.2021061700.php index eb3e2b1a2e..d1c65747fc 100644 --- a/lib/upgradedb/postgres.2021061700.php +++ b/lib/upgradedb/postgres.2021061700.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); if (!$this->GetOne( 'SELECT 1 FROM uiconfig WHERE section = ? AND var = ?', @@ -74,7 +73,3 @@ ('userpanel', 'document_approval_operator_notification_mail_body', '', '', 0); "); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021061700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2021070100.php b/lib/upgradedb/postgres.2021070100.php index d2d25e52b3..f2064d9175 100644 --- a/lib/upgradedb/postgres.2021070100.php +++ b/lib/upgradedb/postgres.2021070100.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" DROP VIEW vallusers; @@ -39,7 +38,3 @@ SELECT *, (firstname || ' ' || lastname) AS name, (lastname || ' ' || firstname) AS rname FROM users "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021070100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2021070500.php b/lib/upgradedb/postgres.2021070500.php index 0980bfa9c1..502b1c28d3 100644 --- a/lib/upgradedb/postgres.2021070500.php +++ b/lib/upgradedb/postgres.2021070500.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" CREATE SEQUENCE customercalls_id_seq; @@ -50,7 +49,3 @@ UNIQUE (customercallid, customerid) ) "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021070500', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2021070600.php b/lib/upgradedb/postgres.2021070600.php index a7c704bd1c..34dc896618 100644 --- a/lib/upgradedb/postgres.2021070600.php +++ b/lib/upgradedb/postgres.2021070600.php @@ -21,13 +21,8 @@ * */ -$this->BeginTrans(); $this->Execute(" ALTER TABLE customercalls ADD COLUMN userid integer DEFAULT NULL CONSTRAINT customercalls_userid_fkey REFERENCES users (id) ON UPDATE CASCADE ON DELETE SET NULL "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021070600', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2021070700.php b/lib/upgradedb/postgres.2021070700.php index b62a096b6a..b6d773d380 100644 --- a/lib/upgradedb/postgres.2021070700.php +++ b/lib/upgradedb/postgres.2021070700.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE customercalls ADD COLUMN notes text DEFAULT NULL"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021070700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2021070900.php b/lib/upgradedb/postgres.2021070900.php index 527717cc75..b7691cf29f 100644 --- a/lib/upgradedb/postgres.2021070900.php +++ b/lib/upgradedb/postgres.2021070900.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE customercalls ALTER COLUMN phone TYPE varchar(20)"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021070900', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2021072000.php b/lib/upgradedb/postgres.2021072000.php index 2d53e3639b..6b986f7d0e 100644 --- a/lib/upgradedb/postgres.2021072000.php +++ b/lib/upgradedb/postgres.2021072000.php @@ -23,7 +23,6 @@ define('DOC_FLAG_NET_ACCOUNT_2021072000', 16); -$this->BeginTrans(); if ($this->ResourceExists('vinvoicecontents', LMSDB::RESOURCE_TYPE_VIEW)) { $this->Execute("DROP VIEW vinvoicecontents"); @@ -77,7 +76,3 @@ DOC_FLAG_NET_ACCOUNT_2021072000, ) ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021072000', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2021072100.php b/lib/upgradedb/postgres.2021072100.php index 25467c8a89..08c410d59f 100644 --- a/lib/upgradedb/postgres.2021072100.php +++ b/lib/upgradedb/postgres.2021072100.php @@ -29,7 +29,6 @@ define('LIABILITY_FLAG_NET_ACCOUT', 16); define('LIABILITY_FLAG_SPLIT_PAYMENT', 32); -$this->BeginTrans(); $this->Execute( "UPDATE documents SET flags = (flags | ?) WHERE splitpayment = 1; @@ -61,7 +60,3 @@ LIABILITY_FLAG_SPLIT_PAYMENT, ) ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021072100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2021072101.php b/lib/upgradedb/postgres.2021072101.php index 856c8a3bd8..2d317a3887 100644 --- a/lib/upgradedb/postgres.2021072101.php +++ b/lib/upgradedb/postgres.2021072101.php @@ -23,7 +23,6 @@ define('DOC_FLAG_NET_ACCOUNT_2021072101', 16); -$this->BeginTrans(); if ($this->ResourceExists('vinvoicecontents', LMSDB::RESOURCE_TYPE_VIEW)) { $this->Execute("DROP VIEW vinvoicecontents"); @@ -79,7 +78,3 @@ DOC_FLAG_NET_ACCOUNT_2021072101, ) ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021072101', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2021072102.php b/lib/upgradedb/postgres.2021072102.php index 6c78534407..7ed87abeb8 100644 --- a/lib/upgradedb/postgres.2021072102.php +++ b/lib/upgradedb/postgres.2021072102.php @@ -23,7 +23,6 @@ define('DOC_FLAG_NET_ACCOUNT_2021072102', 16); -$this->BeginTrans(); if ($this->ResourceExists('vinvoicecontents', LMSDB::RESOURCE_TYPE_VIEW)) { $this->Execute("DROP VIEW vinvoicecontents"); @@ -79,7 +78,3 @@ DOC_FLAG_NET_ACCOUNT_2021072102, ) ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021072102', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2021072103.php b/lib/upgradedb/postgres.2021072103.php index 0a9623c4fb..73badb4c82 100644 --- a/lib/upgradedb/postgres.2021072103.php +++ b/lib/upgradedb/postgres.2021072103.php @@ -23,7 +23,6 @@ define('DOC_FLAG_NET_ACCOUNT_2021072103', 16); -$this->BeginTrans(); if ($this->ResourceExists('vinvoicecontents', LMSDB::RESOURCE_TYPE_VIEW)) { $this->Execute("DROP VIEW vinvoicecontents"); @@ -79,7 +78,3 @@ DOC_FLAG_NET_ACCOUNT_2021072103, ) ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021072103', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2021072300.php b/lib/upgradedb/postgres.2021072300.php index 5fcc172855..7876657a13 100644 --- a/lib/upgradedb/postgres.2021072300.php +++ b/lib/upgradedb/postgres.2021072300.php @@ -28,7 +28,6 @@ define('DOC_CNOTE', 3); } -$this->BeginTrans(); $invoicecontents = $this->GetAll( "SELECT @@ -85,7 +84,3 @@ } } } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021072300', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2021072600.php b/lib/upgradedb/postgres.2021072600.php index 3716218d70..3be6c41a90 100644 --- a/lib/upgradedb/postgres.2021072600.php +++ b/lib/upgradedb/postgres.2021072600.php @@ -23,7 +23,6 @@ define('DOC_FLAG_NET_ACCOUNT', 16); -$this->BeginTrans(); if ($this->ResourceExists('vinvoicecontents', LMSDB::RESOURCE_TYPE_VIEW)) { $this->Execute("DROP VIEW vinvoicecontents"); @@ -94,7 +93,3 @@ DOC_FLAG_NET_ACCOUNT, ) ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021072600', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2021072900.php b/lib/upgradedb/postgres.2021072900.php index 7beb81e6d7..9c2c8f0d8a 100644 --- a/lib/upgradedb/postgres.2021072900.php +++ b/lib/upgradedb/postgres.2021072900.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" DROP VIEW customeraddressview; @@ -114,7 +113,3 @@ LEFT JOIN customerconsentview cc ON cc.customerid = c.id WHERE c.type < 2 "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021072900', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2021082800.php b/lib/upgradedb/postgres.2021082800.php index 4da52150f5..b0bd58c0d2 100644 --- a/lib/upgradedb/postgres.2021082800.php +++ b/lib/upgradedb/postgres.2021082800.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute(" CREATE SEQUENCE rtticketwatchers_id_seq; @@ -35,7 +34,3 @@ PRIMARY KEY (id) ) "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021082800', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2021100500.php b/lib/upgradedb/postgres.2021100500.php index 75fed898e2..9ae6412798 100644 --- a/lib/upgradedb/postgres.2021100500.php +++ b/lib/upgradedb/postgres.2021100500.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("UPDATE netdevicemacs SET mac = UPPER(mac)"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021100500', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2021101900.php b/lib/upgradedb/postgres.2021101900.php index eda7a6b0b2..30bde54ff0 100644 --- a/lib/upgradedb/postgres.2021101900.php +++ b/lib/upgradedb/postgres.2021101900.php @@ -21,13 +21,8 @@ * */ -$this->BeginTrans(); $this->Execute(" ALTER TABLE promotionschemas ADD COLUMN datefrom integer DEFAULT 0 NOT NULL; ALTER TABLE promotionschemas ADD COLUMN dateto integer DEFAULT 0 NOT NULL "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021101900', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2021102700.php b/lib/upgradedb/postgres.2021102700.php index 72655f90d7..f32c77c059 100644 --- a/lib/upgradedb/postgres.2021102700.php +++ b/lib/upgradedb/postgres.2021102700.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute( "INSERT INTO uiconfig (section, var, value) VALUES (?, ?, ?)", @@ -31,7 +30,3 @@ '', ) ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021102700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2021110800.php b/lib/upgradedb/postgres.2021110800.php index 56ece69aee..e319d8ce9e 100644 --- a/lib/upgradedb/postgres.2021110800.php +++ b/lib/upgradedb/postgres.2021110800.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); if (!$this->ResourceExists('customers.pinlastchange', LMSDB::RESOURCE_TYPE_COLUMN)) { $this->Execute(" @@ -116,7 +115,3 @@ WHERE c.type < 2 "); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021110800', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2021110900.php b/lib/upgradedb/postgres.2021110900.php index 0866b9d689..58049268cc 100644 --- a/lib/upgradedb/postgres.2021110900.php +++ b/lib/upgradedb/postgres.2021110900.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); if (!$this->ResourceExists('customers', LMSDB::RESOURCE_TYPE_TABLE)) { $this->Execute(" @@ -38,7 +37,3 @@ ) "); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021110900', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2021120100.php b/lib/upgradedb/postgres.2021120100.php index d7438f8dd1..f15e623d39 100644 --- a/lib/upgradedb/postgres.2021120100.php +++ b/lib/upgradedb/postgres.2021120100.php @@ -21,12 +21,7 @@ * */ -$this->BeginTrans(); if (!$this->ResourceExists('dbinfo_keytype_ukey', LMSDB::RESOURCE_TYPE_CONSTRAINT)) { $this->Execute("ALTER TABLE dbinfo ADD CONSTRAINT dbinfo_keytype_ukey UNIQUE (keytype)"); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021120100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2021121000.php b/lib/upgradedb/postgres.2021121000.php index 4e0af297ba..75c962ccb5 100644 --- a/lib/upgradedb/postgres.2021121000.php +++ b/lib/upgradedb/postgres.2021121000.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); if (!$this->Execute( "SELECT 1 FROM uiconfig WHERE section = ? AND var = ?", @@ -32,7 +31,3 @@ array('userpanel', 'document_approval_customer_notification_attachments', '0', '', 0) ); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021121000', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2021121500.php b/lib/upgradedb/postgres.2021121500.php index 461ecf1e89..2765bbdc15 100644 --- a/lib/upgradedb/postgres.2021121500.php +++ b/lib/upgradedb/postgres.2021121500.php @@ -23,7 +23,6 @@ define('DOC_FLAG_NET_ACCOUNT_2021121500', 16); -$this->BeginTrans(); $this->Execute("DROP VIEW vinvoicecontents"); @@ -112,7 +111,3 @@ DOC_FLAG_NET_ACCOUNT_2021121500, ) ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2021121500', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2022011300.php b/lib/upgradedb/postgres.2022011300.php index 557e495749..531d96c26b 100644 --- a/lib/upgradedb/postgres.2022011300.php +++ b/lib/upgradedb/postgres.2022011300.php @@ -23,7 +23,6 @@ define('DOC_FLAG_NET_ACCOUNT_2022011300', 16); -$this->BeginTrans(); $this->Execute("DROP VIEW vinvoicecontents"); @@ -151,7 +150,3 @@ ); $this->Execute("CREATE VIEW vinvoicecontents AS SELECT * FROM get_invoice_contents(NULL)"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2022011300', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2022012000.php b/lib/upgradedb/postgres.2022012000.php index 7d7b14e6b8..68545386fd 100644 --- a/lib/upgradedb/postgres.2022012000.php +++ b/lib/upgradedb/postgres.2022012000.php @@ -21,15 +21,9 @@ * */ -$this->BeginTrans(); - if (!$this->ResourceExists('messageitems.externalmsgid.varchar(64)', LMSDB::RESOURCE_TYPE_COLUMN_TYPE)) { $this->Execute("ALTER TABLE messageitems ALTER COLUMN externalmsgid DROP NOT NULL"); $this->Execute("UPDATE messageitems SET externalmsgid = NULL WHERE externalmsgid = 0"); $this->Execute("ALTER TABLE messageitems ALTER COLUMN externalmsgid TYPE varchar(64)"); $this->Execute("ALTER TABLE messageitems ALTER COLUMN externalmsgid SET DEFAULT NULL"); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2022012000', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2022030100.php b/lib/upgradedb/postgres.2022030100.php index ac533e9b13..0be3738a3d 100644 --- a/lib/upgradedb/postgres.2022030100.php +++ b/lib/upgradedb/postgres.2022030100.php @@ -21,12 +21,7 @@ * */ -$this->BeginTrans(); if (!$this->ResourceExists('rtmessages.extid', LMSDB::RESOURCE_TYPE_COLUMN)) { $this->Execute("ALTER TABLE rtmessages ADD COLUMN extid varchar(64) DEFAULT NULL"); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2022030100', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2022060900.php b/lib/upgradedb/postgres.2022060900.php index 7f30d84d12..fad2475ea7 100644 --- a/lib/upgradedb/postgres.2022060900.php +++ b/lib/upgradedb/postgres.2022060900.php @@ -21,14 +21,9 @@ * */ -$this->BeginTrans(); if (!$this->ResourceExists('voip_cdr.fraction', LMSDB::RESOURCE_TYPE_COLUMN)) { $this->Execute("ALTER TABLE voip_cdr ADD COLUMN fraction varchar(256) DEFAULT NULL"); $this->Execute("ALTER TABLE voip_cdr ADD COLUMN prefix varchar(256) DEFAULT NULL"); $this->Execute("ALTER TABLE voip_cdr ADD COLUMN prefixname varchar(256) DEFAULT NULL"); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2022060900', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2022061300.php b/lib/upgradedb/postgres.2022061300.php index f84e0f92d9..ed63814297 100644 --- a/lib/upgradedb/postgres.2022061300.php +++ b/lib/upgradedb/postgres.2022061300.php @@ -21,14 +21,9 @@ * */ -$this->BeginTrans(); if (!$this->ResourceExists('voip_cdr.cdate', LMSDB::RESOURCE_TYPE_COLUMN)) { $this->Execute("ALTER TABLE voip_cdr ADD COLUMN cdate integer DEFAULT EXTRACT(EPOCH FROM CURRENT_TIMESTAMP(0))::integer NOT NULL"); $this->Execute("CREATE INDEX voip_cdr_cdate_idx ON voip_cdr (cdate)"); $this->Execute("UPDATE voip_cdr SET cdate = call_start_time + totaltime"); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2022061300', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2022061301.php b/lib/upgradedb/postgres.2022061301.php index 0370fab14d..fea80a7fc4 100644 --- a/lib/upgradedb/postgres.2022061301.php +++ b/lib/upgradedb/postgres.2022061301.php @@ -21,12 +21,7 @@ * */ -$this->BeginTrans(); if ($this->ResourceExists('voip_cdr.cdate', LMSDB::RESOURCE_TYPE_COLUMN)) { $this->Execute("ALTER TABLE voip_cdr DROP COLUMN cdate"); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2022061301', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2022062400.php b/lib/upgradedb/postgres.2022062400.php index eccbd80f53..2b433cf57e 100644 --- a/lib/upgradedb/postgres.2022062400.php +++ b/lib/upgradedb/postgres.2022062400.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute( "UPDATE uiconfig SET section = ?, var = ? WHERE section = ? AND var = ?", @@ -32,7 +31,3 @@ 'timetable_days_forward', ) ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2022062400', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2022062401.php b/lib/upgradedb/postgres.2022062401.php index 9c23e63983..7d121c762f 100644 --- a/lib/upgradedb/postgres.2022062401.php +++ b/lib/upgradedb/postgres.2022062401.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute( "UPDATE uiconfig SET section = ? WHERE section = ? AND var = ?", @@ -31,7 +30,3 @@ 'event_max_userlist_size', ) ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2022062401', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2022062402.php b/lib/upgradedb/postgres.2022062402.php index 80475f96e5..ac6c067e35 100644 --- a/lib/upgradedb/postgres.2022062402.php +++ b/lib/upgradedb/postgres.2022062402.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute( "UPDATE uiconfig SET section = ? WHERE section = ? AND var = ?", @@ -31,7 +30,3 @@ 'event_usergroup_selection_type', ) ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2022062402', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2022062700.php b/lib/upgradedb/postgres.2022062700.php index a5dfc871ac..8c2cb9fdb2 100644 --- a/lib/upgradedb/postgres.2022062700.php +++ b/lib/upgradedb/postgres.2022062700.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute( "UPDATE uiconfig SET section = ?, var = ? WHERE section = ? AND var = ?", @@ -32,7 +31,3 @@ 'helpdesk_sender_name', ) ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2022062700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2022062701.php b/lib/upgradedb/postgres.2022062701.php index d1191da783..1300230ada 100644 --- a/lib/upgradedb/postgres.2022062701.php +++ b/lib/upgradedb/postgres.2022062701.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute( "UPDATE uiconfig SET section = ?, var = ? WHERE section = ? AND var = ?", @@ -32,7 +31,3 @@ 'helpdesk_backend_mode', ) ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2022062701', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2022062702.php b/lib/upgradedb/postgres.2022062702.php index 7f9e10ebe4..bd4cfe4e2e 100644 --- a/lib/upgradedb/postgres.2022062702.php +++ b/lib/upgradedb/postgres.2022062702.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute( "UPDATE uiconfig SET section = ?, var = ? WHERE section = ? AND var = ?", @@ -32,7 +31,3 @@ 'helpdesk_notify', ) ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2022062702', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2022062703.php b/lib/upgradedb/postgres.2022062703.php index 21b4f8ae06..802ad2437a 100644 --- a/lib/upgradedb/postgres.2022062703.php +++ b/lib/upgradedb/postgres.2022062703.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute( "UPDATE uiconfig SET section = ?, var = ? WHERE section = ? AND var = ?", @@ -32,7 +31,3 @@ 'helpdesk_reply_body', ) ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2022062703', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2022062704.php b/lib/upgradedb/postgres.2022062704.php index ea831a6d16..4a5ce7021c 100644 --- a/lib/upgradedb/postgres.2022062704.php +++ b/lib/upgradedb/postgres.2022062704.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute( "UPDATE uiconfig SET section = ?, var = ? WHERE section = ? AND var = ?", @@ -32,7 +31,3 @@ 'reply_body', ) ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2022062704', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2022062705.php b/lib/upgradedb/postgres.2022062705.php index 32c4f6381a..87225f5633 100644 --- a/lib/upgradedb/postgres.2022062705.php +++ b/lib/upgradedb/postgres.2022062705.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute( "UPDATE uiconfig SET section = ?, var = ? WHERE section = ? AND var = ?", @@ -52,7 +51,3 @@ 'helpdesk_notification_sms_body', ) ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2022062705', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2022062706.php b/lib/upgradedb/postgres.2022062706.php index a47aa0670f..9ba855cf03 100644 --- a/lib/upgradedb/postgres.2022062706.php +++ b/lib/upgradedb/postgres.2022062706.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute( "UPDATE uiconfig SET section = ?, var = ? WHERE section = ? AND var = ?", @@ -42,7 +41,3 @@ 'helpdesk_customerinfo_sms_body', ) ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2022062706', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2022062800.php b/lib/upgradedb/postgres.2022062800.php index 735e34c2a7..e3a564bd23 100644 --- a/lib/upgradedb/postgres.2022062800.php +++ b/lib/upgradedb/postgres.2022062800.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute( "UPDATE uiconfig SET section = ?, var = ? WHERE section = ? AND var = ?", @@ -32,7 +31,3 @@ 'helpdesk_customerinfo', ) ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2022062800', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2022062801.php b/lib/upgradedb/postgres.2022062801.php index 3ac3f40996..535e2fbf9e 100644 --- a/lib/upgradedb/postgres.2022062801.php +++ b/lib/upgradedb/postgres.2022062801.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute( "UPDATE uiconfig SET section = ?, var = ? WHERE section = ? AND var = ?", @@ -32,7 +31,3 @@ 'helpdesk_stats', ) ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2022062801', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2022062802.php b/lib/upgradedb/postgres.2022062802.php index 644539e96b..9a758900ac 100644 --- a/lib/upgradedb/postgres.2022062802.php +++ b/lib/upgradedb/postgres.2022062802.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute( "UPDATE uiconfig SET section = ?, var = ? WHERE section = ? AND var = ?", @@ -32,7 +31,3 @@ 'newticket_notify', ) ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2022062802', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2022062803.php b/lib/upgradedb/postgres.2022062803.php index d1aac9f47a..b95bbe3ee9 100644 --- a/lib/upgradedb/postgres.2022062803.php +++ b/lib/upgradedb/postgres.2022062803.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute( "UPDATE uiconfig SET section = ?, var = ? WHERE section = ? AND var = ?", @@ -32,7 +31,3 @@ 'ticket_template_file', ) ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2022062803', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2022062804.php b/lib/upgradedb/postgres.2022062804.php index bcac4c72e5..3489026c69 100644 --- a/lib/upgradedb/postgres.2022062804.php +++ b/lib/upgradedb/postgres.2022062804.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute( "UPDATE uiconfig SET section = ?, var = ? WHERE section = ? AND var = ?", @@ -52,7 +51,3 @@ 'ticketlist_pagelimit', ) ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2022062804', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2022062805.php b/lib/upgradedb/postgres.2022062805.php index 4eb0fcbac0..ce7f4da5ff 100644 --- a/lib/upgradedb/postgres.2022062805.php +++ b/lib/upgradedb/postgres.2022062805.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute( "UPDATE uiconfig SET section = ?, var = ? WHERE section = ? AND var = ?", @@ -325,7 +324,3 @@ 'ticket_property_change_notify', ) ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2022062805', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2022062806.php b/lib/upgradedb/postgres.2022062806.php index 0955a422ca..6e8bd81707 100644 --- a/lib/upgradedb/postgres.2022062806.php +++ b/lib/upgradedb/postgres.2022062806.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute( "UPDATE uiconfig SET section = ? WHERE section = ? AND var = ?", @@ -31,7 +30,3 @@ 'allow_modify_closed_events_newer_than', ) ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2022062806', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2022062807.php b/lib/upgradedb/postgres.2022062807.php index 447463aaa2..92dbb32200 100644 --- a/lib/upgradedb/postgres.2022062807.php +++ b/lib/upgradedb/postgres.2022062807.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute( "UPDATE uiconfig SET section = ? WHERE section = ? AND var = ?", @@ -31,7 +30,3 @@ 'default_show_closed_events', ) ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2022062807', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2022062808.php b/lib/upgradedb/postgres.2022062808.php index 966eb79462..c0050e1784 100644 --- a/lib/upgradedb/postgres.2022062808.php +++ b/lib/upgradedb/postgres.2022062808.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); if ($this->ResourceExists('voip_cdr_uniqueid_key', LMSDB::RESOURCE_TYPE_CONSTRAINT)) { $this->Execute("ALTER TABLE voip_cdr DROP CONSTRAINT voip_cdr_uniqueid_key"); @@ -29,7 +28,3 @@ if (!$this->ResourceExists('voip_cdr_type_uniqueid_ukey', LMSDB::RESOURCE_TYPE_CONSTRAINT)) { $this->Execute("ALTER TABLE voip_cdr ADD CONSTRAINT voip_cdr_type_uniqueid_ukey UNIQUE (type, uniqueid)"); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2022062808', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2022070400.php b/lib/upgradedb/postgres.2022070400.php index a93782d6c0..373347c318 100644 --- a/lib/upgradedb/postgres.2022070400.php +++ b/lib/upgradedb/postgres.2022070400.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); if (!$this->ResourceExists('voip_cdr_caller_idx', LMSDB::RESOURCE_TYPE_INDEX)) { $this->Execute("CREATE INDEX voip_cdr_caller_idx ON voip_cdr (caller)"); @@ -29,7 +28,3 @@ if (!$this->ResourceExists('voip_cdr_callee_idx', LMSDB::RESOURCE_TYPE_INDEX)) { $this->Execute("CREATE INDEX voip_cdr_callee_idx ON voip_cdr (callee)"); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2022070400', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2022070401.php b/lib/upgradedb/postgres.2022070401.php index 82f443f2ec..6dd86b6358 100644 --- a/lib/upgradedb/postgres.2022070401.php +++ b/lib/upgradedb/postgres.2022070401.php @@ -24,7 +24,6 @@ //define('CCONSENT_PHONE_BILLING', 11); //define('CCONSENT_FULL_PHONE_BILLING', 13); -$this->BeginTrans(); $this->Execute( "UPDATE customerconsents SET type = ? WHERE type = ?", @@ -33,7 +32,3 @@ 11, ) ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2022070401', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2022070700.php b/lib/upgradedb/postgres.2022070700.php index 32271ae48f..0533558a6e 100644 --- a/lib/upgradedb/postgres.2022070700.php +++ b/lib/upgradedb/postgres.2022070700.php @@ -21,12 +21,7 @@ * */ -$this->BeginTrans(); if (!$this->ResourceExists('voip_numbers.info', LMSDB::RESOURCE_TYPE_COLUMN)) { $this->Execute("ALTER TABLE voip_numbers ADD COLUMN info varchar(255) DEFAULT NULL"); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2022070700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2022071800.php b/lib/upgradedb/postgres.2022071800.php index 8ca89dfafb..28604cd52c 100644 --- a/lib/upgradedb/postgres.2022071800.php +++ b/lib/upgradedb/postgres.2022071800.php @@ -21,10 +21,5 @@ * */ -$this->BeginTrans(); $this->Execute("ALTER TABLE cashsources ADD COLUMN isdefault smallint NOT NULL DEFAULT 0"); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2022071800', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2022081700.php b/lib/upgradedb/postgres.2022081700.php index 1f6e56028e..24c166e981 100644 --- a/lib/upgradedb/postgres.2022081700.php +++ b/lib/upgradedb/postgres.2022081700.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute( "UPDATE uiconfig SET section = ?, var = ? WHERE section = ? AND var = ?", @@ -52,7 +51,3 @@ 'cache_documents', ) ); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2022081700', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2022081800.php b/lib/upgradedb/postgres.2022081800.php index 85c87f07af..0c568801f7 100644 --- a/lib/upgradedb/postgres.2022081800.php +++ b/lib/upgradedb/postgres.2022081800.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); $this->Execute("DROP VIEW customerview"); $this->Execute("DROP VIEW contractorview"); @@ -118,7 +117,3 @@ LEFT JOIN customerconsentview cc ON cc.customerid = c.id WHERE c.type < 2; "); - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2022081800', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2022082600.php b/lib/upgradedb/postgres.2022082600.php index 170841ec84..966322cb34 100644 --- a/lib/upgradedb/postgres.2022082600.php +++ b/lib/upgradedb/postgres.2022082600.php @@ -21,13 +21,8 @@ * */ -$this->BeginTrans(); if (!$this->ResourceExists('voip_cdr.subtype', LMSDB::RESOURCE_TYPE_COLUMN)) { $this->Execute("ALTER TABLE voip_cdr ADD COLUMN subtype smallint NOT NULL DEFAULT 0"); $this->Execute("CREATE INDEX voip_cdr_subtype_idx ON voip_cdr (subtype)"); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2022082600', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2022082601.php b/lib/upgradedb/postgres.2022082601.php index fa6d3887b7..b599f0f618 100644 --- a/lib/upgradedb/postgres.2022082601.php +++ b/lib/upgradedb/postgres.2022082601.php @@ -21,12 +21,7 @@ * */ -$this->BeginTrans(); if (!$this->ResourceExists('voip_cdr_call_start_time_idx', LMSDB::RESOURCE_TYPE_INDEX)) { $this->Execute("CREATE INDEX voip_cdr_call_start_time_idx ON voip_cdr (call_start_time)"); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2022082601', 'dbversion')); - -$this->CommitTrans(); diff --git a/lib/upgradedb/postgres.2022090800.php b/lib/upgradedb/postgres.2022090800.php index fbb3f2de73..90185010f1 100644 --- a/lib/upgradedb/postgres.2022090800.php +++ b/lib/upgradedb/postgres.2022090800.php @@ -21,7 +21,6 @@ * */ -$this->BeginTrans(); if ($this->ResourceExists('voip_cdr_type_uniqueid_ukey', LMSDB::RESOURCE_TYPE_CONSTRAINT)) { $this->Execute("ALTER TABLE voip_cdr DROP CONSTRAINT voip_cdr_type_uniqueid_ukey"); @@ -37,7 +36,3 @@ $this->Execute("DROP INDEX voip_cdr_subtype_idx"); $this->Execute("ALTER TABLE voip_cdr RENAME COLUMN subtype TO incremental"); } - -$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2022090800', 'dbversion')); - -$this->CommitTrans();