[FIX] Properly run the upgrade
This commit is contained in:
parent
4bf899bb84
commit
da08b6a217
@ -1,9 +1,9 @@
|
||||
<?php
|
||||
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||
|
||||
define('MPOS_VERSION', '0.0.4');
|
||||
define('DB_VERSION', '0.0.15');
|
||||
define('CONFIG_VERSION', '0.0.8');
|
||||
define('MPOS_VERSION', '1.0.0');
|
||||
define('DB_VERSION', '1.0.0');
|
||||
define('CONFIG_VERSION', '1.0.0');
|
||||
define('HASH_VERSION', 1);
|
||||
|
||||
// Fetch installed database version
|
||||
|
||||
@ -9,7 +9,8 @@ function run_100() {
|
||||
$db_version_now = $setting->getValue('DB_VERSION'); // Our actual version installed
|
||||
|
||||
// Upgrade specific variables
|
||||
$aSql[] = "ALTER TABLE `blocks` CHANGE `shares` `shares` BIGINT(30) unsigned NOT NULL AUTO_INCREMENT";
|
||||
$aSql[] = "ALTER TABLE `blocks` CHANGE `shares` `shares` BIGINT(30) unsigned DEFAULT NULL";
|
||||
$aSql[] = "UPDATE " . $setting->getTableName() . " SET value = '1.0.0' WHERE name = 'DB_VERSION'";
|
||||
|
||||
if ($db_version_now == $db_version_old && version_compare($db_version_now, DB_VERSION, '<')) {
|
||||
// Run the upgrade
|
||||
|
||||
Loading…
Reference in New Issue
Block a user