Merge pull request #2414 from MPOS/development

UPDATE : Development to Master
This commit is contained in:
Sebastian Grewe 2015-04-29 22:29:45 +02:00
commit e511ba2ece
2 changed files with 8 additions and 2 deletions

View File

@ -1,3 +1,9 @@
1.0.3 (Apr 29th 2015)
---------------------
* HOTFIX: Database upgrade from `1.0.0` to `1.0.1` did not work as
intended
1.0.2 (Apr 28th 2015)
---------------------

View File

@ -9,9 +9,9 @@ function run_101() {
$db_version_now = $setting->getValue('DB_VERSION'); // Our actual version installed
// Upgrade specific variables
$aSql[] = "ALTER TABLE `" . $coin_address->getTableName() . "` ADD ap_threshold float DEFAULT '0'";
$aSql[] = "ALTER TABLE " . $coin_address->getTableName() . " ADD ap_threshold float DEFAULT '0'";
$aSql[] = "UPDATE " . $coin_address->getTableName() . " AS ca LEFT JOIN " . $user->getTableName() . " AS a ON a.id = ca.account_id SET ca.ap_threshold = a.ap_threshold";
$aSql[] = "ALTER TABLE `" . $user->getTableName() . "` DROP `ap_threshold`";
$aSql[] = "ALTER TABLE " . $user->getTableName() . " DROP `ap_threshold`";
$aSql[] = "UPDATE " . $setting->getTableName() . " SET value = '1.0.1' WHERE name = 'DB_VERSION'";
if ($db_version_now == $db_version_old && version_compare($db_version_now, DB_VERSION, '<')) {