mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-20 02:29:39 +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 EnableModelFuncMappingColumn { get; set; }
|
||||||
public bool EnableOracleIdentity { get; set; }
|
public bool EnableOracleIdentity { get; set; }
|
||||||
public bool EnableCodeFirstUpdatePrecision { get; set; }
|
public bool EnableCodeFirstUpdatePrecision { get; set; }
|
||||||
|
public bool SqliteCodeFirstEnableDropColumn { get; set; }
|
||||||
public bool IsCorrectErrorSqlParameterName { get; set; }
|
public bool IsCorrectErrorSqlParameterName { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -49,8 +49,12 @@ namespace SqlSugar
|
|||||||
}
|
}
|
||||||
foreach (var item in dropColumns)
|
foreach (var item in dropColumns)
|
||||||
{
|
{
|
||||||
//this.Context.DbMaintenance.DropColumn(tableName, item.DbColumnName);
|
//only support .net core
|
||||||
//isChange = true;
|
if (this.Context.CurrentConnectionConfig?.MoreSettings?.SqliteCodeFirstEnableDropColumn == true)
|
||||||
|
{
|
||||||
|
this.Context.DbMaintenance.DropColumn(tableName, item.DbColumnName);
|
||||||
|
isChange = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
//foreach (var item in alterColumns)
|
//foreach (var item in alterColumns)
|
||||||
//{
|
//{
|
||||||
|
@@ -525,7 +525,8 @@ namespace SqlSugar
|
|||||||
EnableCodeFirstUpdatePrecision=it.MoreSettings.EnableCodeFirstUpdatePrecision,
|
EnableCodeFirstUpdatePrecision=it.MoreSettings.EnableCodeFirstUpdatePrecision,
|
||||||
SqliteCodeFirstEnableDefaultValue=it.MoreSettings.SqliteCodeFirstEnableDefaultValue,
|
SqliteCodeFirstEnableDefaultValue=it.MoreSettings.SqliteCodeFirstEnableDefaultValue,
|
||||||
SqliteCodeFirstEnableDescription=it.MoreSettings.SqliteCodeFirstEnableDescription,
|
SqliteCodeFirstEnableDescription=it.MoreSettings.SqliteCodeFirstEnableDescription,
|
||||||
IsCorrectErrorSqlParameterName = it.MoreSettings.IsCorrectErrorSqlParameterName
|
IsCorrectErrorSqlParameterName = it.MoreSettings.IsCorrectErrorSqlParameterName,
|
||||||
|
SqliteCodeFirstEnableDropColumn=it.MoreSettings.SqliteCodeFirstEnableDropColumn
|
||||||
|
|
||||||
},
|
},
|
||||||
SqlMiddle = it.SqlMiddle == null ? null : new SqlMiddle
|
SqlMiddle = it.SqlMiddle == null ? null : new SqlMiddle
|
||||||
|
Reference in New Issue
Block a user