From 8928b339393d2b51263ad3b601d140110f9c8d96 Mon Sep 17 00:00:00 2001 From: Sebastian Grewe Date: Sat, 19 Jul 2014 08:20:22 +0200 Subject: [PATCH] [SQL] Moved to 0.0.13 SQL structure --- include/version.inc.php | 2 +- sql/000_base_structure.sql | 2 +- .../{0.0.11_to_0.0.12.inc.php => 0.0.12_to_0.0.13.inc.php} | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) rename upgrade/definitions/{0.0.11_to_0.0.12.inc.php => 0.0.12_to_0.0.13.inc.php} (85%) diff --git a/include/version.inc.php b/include/version.inc.php index a4e0d533..2b7ea18a 100644 --- a/include/version.inc.php +++ b/include/version.inc.php @@ -2,7 +2,7 @@ $defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1; define('MPOS_VERSION', '0.0.4'); -define('DB_VERSION', '0.0.12'); +define('DB_VERSION', '0.0.13'); define('CONFIG_VERSION', '0.0.8'); define('HASH_VERSION', 1); diff --git a/sql/000_base_structure.sql b/sql/000_base_structure.sql index c9773c5f..742b3634 100644 --- a/sql/000_base_structure.sql +++ b/sql/000_base_structure.sql @@ -134,7 +134,7 @@ CREATE TABLE IF NOT EXISTS `settings` ( UNIQUE KEY `setting` (`name`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -INSERT INTO `settings` (`name`, `value`) VALUES ('DB_VERSION', '0.0.12'); +INSERT INTO `settings` (`name`, `value`) VALUES ('DB_VERSION', '0.0.13'); CREATE TABLE IF NOT EXISTS `shares` ( `id` bigint(30) NOT NULL AUTO_INCREMENT, diff --git a/upgrade/definitions/0.0.11_to_0.0.12.inc.php b/upgrade/definitions/0.0.12_to_0.0.13.inc.php similarity index 85% rename from upgrade/definitions/0.0.11_to_0.0.12.inc.php rename to upgrade/definitions/0.0.12_to_0.0.13.inc.php index 7d8d7c6d..b81b87ce 100644 --- a/upgrade/definitions/0.0.11_to_0.0.12.inc.php +++ b/upgrade/definitions/0.0.12_to_0.0.13.inc.php @@ -4,13 +4,13 @@ function run_0012() { global $setting, $config, $user, $mysqli, $transaction; // Version information - $db_version_old = '0.0.11'; // What version do we expect - $db_version_new = '0.0.12'; // What is the new version we wish to upgrade to + $db_version_old = '0.0.12'; // What version do we expect + $db_version_new = '0.0.13'; // What is the new version we wish to upgrade to $db_version_now = $setting->getValue('DB_VERSION'); // Our actual version installed // Upgrade specific variables $aSql[] = "ALTER TABLE " . $transaction->getTableName() . " CHANGE `amount` `amount` DOUBLE(60,30) NULL DEFAULT '0'"; - $aSql[] = "UPDATE " . $setting->getTableName() . " SET value = '0.0.12' WHERE name = 'DB_VERSION'"; + $aSql[] = "UPDATE " . $setting->getTableName() . " SET value = '0.0.13' WHERE name = 'DB_VERSION'"; if ($db_version_now == $db_version_old && version_compare($db_version_now, DB_VERSION, '<')) { // Run the upgrade