create_global_account.py
756 Bytes
#!/usr/bin/python
# coding: utf-8
import config
dbname_fix="USER"
tablename_fix="t_account"
db_name= "%s_%s"%(config.server_index,dbname_fix)
print """
drop table if exists %s.%s;create table %s.%s(
platform int(11) unsigned not null comment '账号登陆平台',
account char(64) not null comment '账号',
uid bigint(18) unsigned not null comment'用户id',
status int(11) unsigned not null comment '账号状态(是否被冻结等)',
nick char(32) not null default '' comment '昵称',
three int(11) unsigned not null default '0' comment '1:wx',
u_account char(64) not null comment 'user账号',
primary key (platform, account),
key uid (uid)
)engine=innodb default charset=utf8;
""" %(db_name,tablename_fix,db_name,tablename_fix)