mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-04-22 02:32:50 +08:00
- 修复 QuestDB CodeFirst 自定义表名的问题;
This commit is contained in:
parent
b2eb165182
commit
4a3e1260c1
@ -91,14 +91,17 @@ namespace FreeSql.QuestDb
|
|||||||
if (tb == null) throw new Exception(CoreStrings.S_Type_IsNot_Migrable(obj.entityType.FullName));
|
if (tb == null) throw new Exception(CoreStrings.S_Type_IsNot_Migrable(obj.entityType.FullName));
|
||||||
if (tb.Columns.Any() == false)
|
if (tb.Columns.Any() == false)
|
||||||
throw new Exception(CoreStrings.S_Type_IsNot_Migrable_0Attributes(obj.entityType.FullName));
|
throw new Exception(CoreStrings.S_Type_IsNot_Migrable_0Attributes(obj.entityType.FullName));
|
||||||
var tbnameArray = _commonUtils.SplitTableName(tb.DbName);
|
var tbname = tb.DbName;
|
||||||
var tbname = string.Empty;
|
var tboldname = tb.DbOldName;
|
||||||
if (tbnameArray?.Length == 1) tbname = tbnameArray.FirstOrDefault();
|
if (string.IsNullOrEmpty(obj.tableName) == false)
|
||||||
|
{
|
||||||
var tboldnameArray = _commonUtils.SplitTableName(tb.DbOldName);
|
var tbtmpname = obj.tableName;
|
||||||
var tboldname = string.Empty;
|
if (tbname != tbtmpname)
|
||||||
if (tboldnameArray?.Length == 1)
|
{
|
||||||
tboldname = tboldnameArray.FirstOrDefault();
|
tbname = tbtmpname;
|
||||||
|
tboldname = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
var sbalter = new StringBuilder();
|
var sbalter = new StringBuilder();
|
||||||
var allTable = _orm.Ado.Query<string>(CommandType.Text,
|
var allTable = _orm.Ado.Query<string>(CommandType.Text,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user