create_global_pay.py 868 Bytes
#!/usr/bin/python
# coding: utf-8
import config
dbname_fix="USER"
tablename_fix="t_pay"
db_name= "%s_%s"%(config.server_index,dbname_fix)

print """
drop table if exists %s.%s;create table %s.%s(
		order_id char(64) not null comment '充值订单号',
		platform int(11) unsigned not null comment '账号登陆平台',
		account char(64) not null comment '账号',
		uid bigint(18) unsigned not null comment'用户id',
		order_status int(11) unsigned not null comment '订单状态[0:新单,1:F失败,2:完成,3:完成测试]',
		time_sec int(11) unsigned not null comment '时间',
		consume_stream_id char(64) not null comment '消费流水号',
		pay_channel char(32) not null comment '支付渠道',
		product char(32) not null comment 'product',
		PRIMARY KEY (`order_id`)
		)engine=innodb default charset=utf8;
""" %(db_name,tablename_fix,db_name,tablename_fix)