|
|
@@ -125,31 +125,30 @@ else:
|
|
|
load_conn(conn)
|
|
|
|
|
|
create_data = {}
|
|
|
-create_data['all_data'] = [
|
|
|
- 'data',
|
|
|
- 'cache_data',
|
|
|
- 'history',
|
|
|
- 'rd',
|
|
|
- 'user',
|
|
|
- 'user_set',
|
|
|
- 'topic',
|
|
|
- 'rb',
|
|
|
- 'back',
|
|
|
- 'custom',
|
|
|
- 'other',
|
|
|
- 'alist',
|
|
|
- 're_admin',
|
|
|
- 'alarm',
|
|
|
- 'ua_d',
|
|
|
- 'filter',
|
|
|
- 'scan',
|
|
|
- 'acl',
|
|
|
- 'inter',
|
|
|
- 'html_filter',
|
|
|
- 'oauth_conn',
|
|
|
- 'user_application'
|
|
|
-]
|
|
|
-for i in create_data['all_data']:
|
|
|
+create_data['data'] = ['title', 'data']
|
|
|
+create_data['cache_data'] = ['title', 'data', 'id']
|
|
|
+create_data['history'] = ['id', 'title', 'data', 'date', 'ip', 'send', 'leng', 'hide', 'type']
|
|
|
+create_data['rc'] = ['id', 'title', 'date', 'type']
|
|
|
+create_data['rd'] = ['title', 'sub', 'code', 'date', 'band', 'stop', 'agree', 'acl']
|
|
|
+create_data['user'] = ['id', 'pw', 'acl', 'date', 'encode']
|
|
|
+create_data['user_set'] = ['name', 'id', 'data']
|
|
|
+create_data['user_application'] = ['id', 'pw', 'date', 'encode', 'question', 'answer', 'ip', 'ua', 'token', 'email']
|
|
|
+create_data['topic'] = ['id', 'data', 'date', 'ip', 'block', 'top', 'code']
|
|
|
+create_data['rb'] = ['block', 'end', 'today', 'blocker', 'why', 'band', 'login', 'ongoing']
|
|
|
+create_data['back'] = ['title', 'link', 'type']
|
|
|
+create_data['custom'] = ['user', 'css']
|
|
|
+create_data['other'] = ['name', 'data', 'coverage']
|
|
|
+create_data['alist'] = ['name', 'acl']
|
|
|
+create_data['re_admin'] = ['who', 'what', 'time']
|
|
|
+create_data['alarm'] = ['name', 'data', 'date']
|
|
|
+create_data['ua_d'] = ['name', 'ip', 'ua', 'today', 'sub']
|
|
|
+create_data['filter'] = ['name', 'regex', 'sub']
|
|
|
+create_data['scan'] = ['user', 'title', 'type']
|
|
|
+create_data['acl'] = ['title', 'decu', 'dis', 'view', 'why']
|
|
|
+create_data['inter'] = ['title', 'link', 'icon']
|
|
|
+create_data['html_filter'] = ['html', 'kind', 'plus']
|
|
|
+create_data['oauth_conn'] = ['provider', 'wiki_id', 'sns_id', 'name', 'picture']
|
|
|
+for i in create_data:
|
|
|
try:
|
|
|
curs.execute(db_change('select test from ' + i + ' limit 1'))
|
|
|
except:
|
|
|
@@ -171,30 +170,7 @@ except:
|
|
|
setup_tool = 2
|
|
|
|
|
|
if setup_tool != 0:
|
|
|
- create_data['data'] = ['title', 'data']
|
|
|
- create_data['cache_data'] = ['title', 'data', 'id']
|
|
|
- create_data['history'] = ['id', 'title', 'data', 'date', 'ip', 'send', 'leng', 'hide', 'type']
|
|
|
- create_data['rd'] = ['title', 'sub', 'code', 'date', 'band', 'stop', 'agree', 'acl']
|
|
|
- create_data['user'] = ['id', 'pw', 'acl', 'date', 'encode']
|
|
|
- create_data['user_set'] = ['name', 'id', 'data']
|
|
|
- create_data['user_application'] = ['id', 'pw', 'date', 'encode', 'question', 'answer', 'ip', 'ua', 'token', 'email']
|
|
|
- create_data['topic'] = ['id', 'data', 'date', 'ip', 'block', 'top', 'code']
|
|
|
- create_data['rb'] = ['block', 'end', 'today', 'blocker', 'why', 'band', 'login', 'ongoing']
|
|
|
- create_data['back'] = ['title', 'link', 'type']
|
|
|
- create_data['custom'] = ['user', 'css']
|
|
|
- create_data['other'] = ['name', 'data', 'coverage']
|
|
|
- create_data['alist'] = ['name', 'acl']
|
|
|
- create_data['re_admin'] = ['who', 'what', 'time']
|
|
|
- create_data['alarm'] = ['name', 'data', 'date']
|
|
|
- create_data['ua_d'] = ['name', 'ip', 'ua', 'today', 'sub']
|
|
|
- create_data['filter'] = ['name', 'regex', 'sub']
|
|
|
- create_data['scan'] = ['user', 'title', 'type']
|
|
|
- create_data['acl'] = ['title', 'decu', 'dis', 'view', 'why']
|
|
|
- create_data['inter'] = ['title', 'link', 'icon']
|
|
|
- create_data['html_filter'] = ['html', 'kind', 'plus']
|
|
|
- create_data['oauth_conn'] = ['provider', 'wiki_id', 'sns_id', 'name', 'picture']
|
|
|
-
|
|
|
- for create_table in create_data['all_data']:
|
|
|
+ for create_table in create_data:
|
|
|
for create in create_data[create_table]:
|
|
|
try:
|
|
|
curs.execute(db_change('select ' + create + ' from ' + create_table + ' limit 1'))
|