getDB(); switch ($STEP) { case 1: echo '
the table log will be altered
'; echo 'Upgrade'; break; case 2: $db->isTransactionSupported() and $db->startTransaction(); // TODO: add foreign keys $db->table('installinfo')->delete(array('type' =>'system', 'key' => 'mcms')); $db->table('installinfo')->delete(array('type' =>'system', 'key' => 'mcmsdb')); $db->table('installinfo')->insert(array('type' =>'system', 'key' => 'mcms', 'version' => MCMS, 'attrib' => 0)); $db->table('installinfo')->insert(array('type' =>'system', 'key' => 'mcmsdb', 'version' => $TABLESDEF['version'], 'attrib' => 0)); $db->isTransactionSupported() and $db->commit(); echo 'upgrade finished, remove the install folder and return to your system
'; echo 'Back to main page'; break; }