Update schema to PSR-2
This commit is contained in:
@@ -1,7 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
// when db schema modifications are done, this function is run.
|
// when db schema modifications are done, this function is run.
|
||||||
|
|
||||||
$dbversion = intval($_config['dbversion']);
|
$dbversion = intval($_config['dbversion']);
|
||||||
$db->beginTransaction();
|
$db->beginTransaction();
|
||||||
if ($dbversion == 0) {
|
if ($dbversion == 0) {
|
||||||
@@ -142,8 +141,7 @@ if($dbversion==6){
|
|||||||
$dbversion++;
|
$dbversion++;
|
||||||
}
|
}
|
||||||
// update the db version to the latest one
|
// update the db version to the latest one
|
||||||
if($dbversion!=$_config['dbversion']) $db->run("UPDATE config SET val=:val WHERE cfg='dbversion'",array(":val"=>$dbversion));
|
if ($dbversion != $_config['dbversion']) {
|
||||||
|
$db->run("UPDATE config SET val=:val WHERE cfg='dbversion'", [":val" => $dbversion]);
|
||||||
|
}
|
||||||
$db->commit();
|
$db->commit();
|
||||||
|
|
||||||
|
|
||||||
?>
|
|
||||||
|
|||||||
Reference in New Issue
Block a user