fixed bug of update script
This commit is contained in:
parent
cb6ef24038
commit
ca2cd43df3
|
|
@ -3,7 +3,7 @@
|
|||
* @Author: printempw
|
||||
* @Date: 2016-04-05 14:33:00
|
||||
* @Last Modified by: printempw
|
||||
* @Last Modified time: 2016-04-05 14:46:17
|
||||
* @Last Modified time: 2016-04-05 14:58:04
|
||||
*/
|
||||
|
||||
if (!defined('BASE_DIR')) exit('请运行 /setup/update.php 来升级');
|
||||
|
|
@ -12,13 +12,13 @@ if (Option::get('current_version') == "2.4.1") {
|
|||
|
||||
if (Option::get('encryption') == "") Option::set('encryption', 'MD5');
|
||||
|
||||
$db = new Database('options');
|
||||
$db = new Database\Database('options');
|
||||
|
||||
$table_name = DB_PREFIX."users";
|
||||
$sqls[0] = "ALTER TABLE `$table_name` CHANGE `hash_steve` `hash_steve` VARCHAR(64) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT ''";
|
||||
$sqls[1] = "ALTER TABLE `$table_name` CHANGE `hash_alex` `hash_alex` VARCHAR(64) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT ''";
|
||||
$sqls[2] = "ALTER TABLE `$table_name` CHANGE `hash_cape` `hash_cape` VARCHAR(64) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT ''";
|
||||
$sqls[2] = "ALTER TABLE `$table_name` CHANGE `last_modified` `last_modified` DATETIME DEFAULT CURRENT_TIMESTAMP";
|
||||
$sqls[3] = "ALTER TABLE `$table_name` CHANGE `last_modified` `last_modified` DATETIME DEFAULT CURRENT_TIMESTAMP";
|
||||
|
||||
foreach ($sqls as $sql) {
|
||||
$db->query($sql);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user