Skip to content

Commit da08b6a

Browse files
author
Sebastian Grewe
committed
[FIX] Properly run the upgrade
1 parent 4bf899b commit da08b6a

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

include/version.inc.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?php
22
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
33

4-
define('MPOS_VERSION', '0.0.4');
5-
define('DB_VERSION', '0.0.15');
6-
define('CONFIG_VERSION', '0.0.8');
4+
define('MPOS_VERSION', '1.0.0');
5+
define('DB_VERSION', '1.0.0');
6+
define('CONFIG_VERSION', '1.0.0');
77
define('HASH_VERSION', 1);
88

99
// Fetch installed database version

upgrade/definitions/0.0.15_to_1.0.0.inc.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ function run_100() {
99
$db_version_now = $setting->getValue('DB_VERSION'); // Our actual version installed
1010

1111
// Upgrade specific variables
12-
$aSql[] = "ALTER TABLE `blocks` CHANGE `shares` `shares` BIGINT(30) unsigned NOT NULL AUTO_INCREMENT";
12+
$aSql[] = "ALTER TABLE `blocks` CHANGE `shares` `shares` BIGINT(30) unsigned DEFAULT NULL";
13+
$aSql[] = "UPDATE " . $setting->getTableName() . " SET value = '1.0.0' WHERE name = 'DB_VERSION'";
1314

1415
if ($db_version_now == $db_version_old && version_compare($db_version_now, DB_VERSION, '<')) {
1516
// Run the upgrade

0 commit comments

Comments
 (0)