From d3779bd58e851c0b119787f51e844224f8820f17 Mon Sep 17 00:00:00 2001 From: Sebastian Grewe Date: Thu, 10 Jul 2014 08:56:29 +0200 Subject: [PATCH] [FIX] Wrong sql data length --- upgrade/definitions/0.0.11_to_0.0.12.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/upgrade/definitions/0.0.11_to_0.0.12.inc.php b/upgrade/definitions/0.0.11_to_0.0.12.inc.php index 3f8a2c53..00328165 100644 --- a/upgrade/definitions/0.0.11_to_0.0.12.inc.php +++ b/upgrade/definitions/0.0.11_to_0.0.12.inc.php @@ -9,7 +9,7 @@ function run_0012() { $db_version_now = $setting->getValue('DB_VERSION'); // Our actual version installed // Upgrade specific variables - $aSql[] = "CREATE TABLE `coin_addresses` ( `id` int(11) NOT NULL AUTO_INCREMENT, `account_id` int(11) NOT NULL, `currency` varchar(55555) NOT NULL, `coin_address` varchar(255) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `coin_address` (`coin_address`), KEY `account_id` (`account_id`)) ENGINE=InnoDB DEFAULT CHARSET=utf8"; + $aSql[] = "CREATE TABLE `coin_addresses` ( `id` int(11) NOT NULL AUTO_INCREMENT, `account_id` int(11) NOT NULL, `currency` varchar(5) NOT NULL, `coin_address` varchar(255) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `coin_address` (`coin_address`), KEY `account_id` (`account_id`)) ENGINE=InnoDB DEFAULT CHARSET=utf8"; $aSql[] = "INSERT IGNORE INTO coin_addresses (account_id, currency, coin_address) SELECT id, '" . $config['currency'] . "', coin_address FROM " . $user->getTableName() . " WHERE coin_address IS NOT NULL"; $aSql[] = "ALTER TABLE `" . $user->getTableName() . "` DROP `coin_address`"; $aSql[] = "UPDATE " . $setting->getTableName() . " SET value = '0.0.12' WHERE name = 'DB_VERSION'";