同步操作将从 alchemystar/Lancer 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
同步两个DB之间的schema,配置如下:
sourceHost=127.0.0.1:3306
sourceUser=root
sourcePass=123123123
sourceSchema=mystique_db
sourceCharset=utf8
targetHost=127.0.0.1:3306
targetUser=root
targetPass=123123123
targetSchema=mystique_test
targetCharset=utf8
autoExecute=YES //此处表明自动同步
原理:
通过捞取information_schema来比较source_schema和target_schema(可在不同实例)的表结构是否一致,
如果target_schema没有则这张表则创建,
如果target_schema表里面没有这个字段则alter add(保证顺序),
如果表里面有这个字段、但属性不一样则alter change,
另外还同步索引的元数据.
可以指定进行自动执行,也可以指定打印出对应的执行语句,语句如下所例:
alter table mystique_test.t_test_3 change id id bigint(20) NOT NULL AUTO_INCREMENT COMMENT ''
alter table mystique_test.t_test_3 add index (name
)
alter table mystique_test.t_test_3 drop index name_id
alter table mystique_test.t_test_3 add id_2 varchar(50) NULL DEFAULT '' COMMENT '' after name
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。