use test_ln_scene;
#创建集合
db.createCollection("AdamUserInfoVo");
db.createCollection("AdamRealInfoVo");
db.createCollection("AdamThirdPartInfoVo");
db.createCollection("AdamUserMemberVo");
db.createCollection("AdamMemberVo");

#创建索引
db.AdamUserInfoVo.createIndex({uid:"hashed"});
db.AdamUserInfoVo.createIndex({state:"hashed"});
db.AdamRealInfoVo.createIndex({uid:"hashed"});
db.AdamRealInfoVo.createIndex({state:"hashed"});
db.AdamThirdPartInfoVo.createIndex({uid:"hashed"});
db.AdamThirdPartInfoVo.createIndex({state:"hashed"});
db.AdamUserMemberVo.createIndex({uid:"hashed"});
db.AdamMemberVo.createIndex({memberId:"hashed"});


#创建分片
sh.enableSharding("test_ln_scene");

sh.shardCollection("test_ln_scene.AdamUserInfoVo",{"uid":"hashed"});
sh.shardCollection("test_ln_scene.AdamRealInfoVo",{"uid":"hashed"});
sh.shardCollection("test_ln_scene.AdamThirdPartInfoVo",{"uid":"hashed"});
sh.shardCollection("test_ln_scene.AdamUserMemberVo",{"uid":"hashed"});
sh.shardCollection("test_ln_scene.AdamMemberVo",{"memberId":"hashed"});