From 41d262c67a74867adac7422c9857c9c9e72d99d5 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Mon, 31 Aug 2020 20:34:48 +0800 Subject: [PATCH] 1 --- tools/migratedb/common/mysql_rule.json | 46 +++++++++++++++++++++++++- tools/migratedb/migratedb.py | 2 +- 2 files changed, 46 insertions(+), 2 deletions(-) diff --git a/tools/migratedb/common/mysql_rule.json b/tools/migratedb/common/mysql_rule.json index d647b98..e3e4003 100644 --- a/tools/migratedb/common/mysql_rule.json +++ b/tools/migratedb/common/mysql_rule.json @@ -1,6 +1,50 @@ [ { "table_name": "version", - "where": " accountid LIKE '$channel_'" + "where": "" + }, + { + "table_name": "user", + "where": "accountid LIKE '$channel_'" + }, + { + "table_name": "bag", + "where": "accountid LIKE '$channel_'" + }, + { + "table_name": "sign", + "where": "accountid LIKE '$channel_'" + }, + { + "table_name": "quest", + "where": "accountid LIKE '$channel_'" + }, + { + "table_name": "share_achievement", + "where": "accountid LIKE '$channel_'" + }, + { + "table_name": "activity", + "where": "accountid LIKE '$channel_'" + }, + { + "table_name": "passinfo", + "where": "accountid LIKE '$channel_'" + }, + { + "table_name": "shop", + "where": "accountid LIKE '$channel_'" + }, + { + "table_name": "additem_log", + "where": "accountid LIKE '$channel_'" + }, + { + "table_name": "equip", + "where": "accountid LIKE '$channel_'" + }, + { + "table_name": "shop_data", + "where": "accountid LIKE '$channel_'" } ] diff --git a/tools/migratedb/migratedb.py b/tools/migratedb/migratedb.py index 4010e2a..7028ff0 100644 --- a/tools/migratedb/migratedb.py +++ b/tools/migratedb/migratedb.py @@ -78,7 +78,7 @@ def exportMysql(context, db_conf, db_rule_conf): for conf in db_conf: for rule in db_rule_conf: line = '' - if rule['where'] != '': + if rule['where'] == '': line = 'mysqldump -h %s -P %d -u%s -p%s %s %s > %s.sql' % ( conf['host'], conf['port'],