This commit is contained in:
xuejiaming 2021-03-23 17:44:25 +08:00
parent b40075be47
commit 3f8edb65e0
2 changed files with 6 additions and 3 deletions

View File

@ -33,7 +33,7 @@ namespace Sample.MySql
{
o.EnsureCreatedWithOutShardingTable = true;
o.CreateShardingTableOnStart = true;
o.AddShardingDbContextWithShardingTable<DefaultTableDbContext>("conn1", "server=106.54.131.109;userid=xjm;password=mysqlXJM#qwe;database=sharding_db123;Charset=utf8;Allow Zero Datetime=True; Pooling=true; Max Pool Size=512;sslmode=none;Allow User Variables=True;", dbConfig =>
o.AddShardingDbContextWithShardingTable<DefaultTableDbContext>("conn1", "server=xxx;userid=xxx;password=xxx;database=sharding_db123;Charset=utf8;Allow Zero Datetime=True; Pooling=true; Max Pool Size=512;sslmode=none;Allow User Variables=True;", dbConfig =>
{
dbConfig.AddShardingTableRoute<SysUserModVirtualTableRoute>();
dbConfig.AddShardingTableRoute<SysUserLogByMonthRoute>();

View File

@ -224,8 +224,11 @@ namespace ShardingCore
}
catch (Exception)
{
_logger.LogWarning(
$"table :{virtualTable.GetOriginalTableName()}{shardingConfig.TailPrefix}{tail} will created");
if (!_shardingCoreOptions.IgnoreCreateTableError.GetValueOrDefault())
{
_logger.LogWarning(
$"table :{virtualTable.GetOriginalTableName()}{shardingConfig.TailPrefix}{tail} will created");
}
}
}