upgrade.php
1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?php
/**
* [Discuz!] (C)2001-2099 Comsenz Inc.
* This is NOT a freeware, use is subject to license terms
*
* $Id: upgrade.php 34702 2014-07-10 10:08:30Z nemohou $
*/
if(!defined('IN_DISCUZ')) {
exit('Access Denied');
}
$sql = '';
$sql .= <<<EOF
CREATE TABLE IF NOT EXISTS pre_common_devicetoken (
`uid` mediumint(8) unsigned NOT NULL,
`token` char(50) NOT NULL,
PRIMARY KEY (`uid`),
KEY `token` (`token`)
) ENGINE=MyISAM;
CREATE TABLE IF NOT EXISTS pre_mobile_setting (
`skey` varchar(255) NOT NULL DEFAULT '',
`svalue` text NOT NULL,
PRIMARY KEY (`skey`)
) ENGINE=MyISAM;
CREATE TABLE IF NOT EXISTS pre_mobile_wsq_threadlist (
`skey` int(10) unsigned NOT NULL,
`svalue` text NOT NULL,
PRIMARY KEY (`skey`)
) ENGINE=MyISAM;
REPLACE INTO pre_mobile_setting VALUES ('extend_used', '1');
REPLACE INTO pre_mobile_setting VALUES ('extend_lastupdate', '1343182299');
EOF;
runquery($sql);
DB::query( "REPLACE INTO ".DB::table("common_credit_rule")." VALUES (NULL, '".$installlang['mobilesign']."', 'mobilesign', '1', '0', '1', '0', '0', '2', '0', '0', '0', '0', '0', '0', '');"
);
$finish = true;