mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-19 10:08:19 +08:00
Sqlite CodeFirst Enable Drop Column
This commit is contained in:
@@ -28,6 +28,7 @@ namespace SqlSugar
|
||||
public bool EnableModelFuncMappingColumn { get; set; }
|
||||
public bool EnableOracleIdentity { get; set; }
|
||||
public bool EnableCodeFirstUpdatePrecision { get; set; }
|
||||
public bool SqliteCodeFirstEnableDropColumn { get; set; }
|
||||
public bool IsCorrectErrorSqlParameterName { get; set; }
|
||||
}
|
||||
}
|
||||
|
@@ -49,8 +49,12 @@ namespace SqlSugar
|
||||
}
|
||||
foreach (var item in dropColumns)
|
||||
{
|
||||
//this.Context.DbMaintenance.DropColumn(tableName, item.DbColumnName);
|
||||
//isChange = true;
|
||||
//only support .net core
|
||||
if (this.Context.CurrentConnectionConfig?.MoreSettings?.SqliteCodeFirstEnableDropColumn == true)
|
||||
{
|
||||
this.Context.DbMaintenance.DropColumn(tableName, item.DbColumnName);
|
||||
isChange = true;
|
||||
}
|
||||
}
|
||||
//foreach (var item in alterColumns)
|
||||
//{
|
||||
|
@@ -525,7 +525,8 @@ namespace SqlSugar
|
||||
EnableCodeFirstUpdatePrecision=it.MoreSettings.EnableCodeFirstUpdatePrecision,
|
||||
SqliteCodeFirstEnableDefaultValue=it.MoreSettings.SqliteCodeFirstEnableDefaultValue,
|
||||
SqliteCodeFirstEnableDescription=it.MoreSettings.SqliteCodeFirstEnableDescription,
|
||||
IsCorrectErrorSqlParameterName = it.MoreSettings.IsCorrectErrorSqlParameterName
|
||||
IsCorrectErrorSqlParameterName = it.MoreSettings.IsCorrectErrorSqlParameterName,
|
||||
SqliteCodeFirstEnableDropColumn=it.MoreSettings.SqliteCodeFirstEnableDropColumn
|
||||
|
||||
},
|
||||
SqlMiddle = it.SqlMiddle == null ? null : new SqlMiddle
|
||||
|
Reference in New Issue
Block a user