|
|
|
@ -717,10 +717,17 @@ namespace Microsoft.EntityFrameworkCore.Migrations
|
|
|
|
Check.NotNull(builder, nameof(builder));
|
|
|
|
Check.NotNull(builder, nameof(builder));
|
|
|
|
|
|
|
|
|
|
|
|
if (operation.ComputedColumnSql != null)
|
|
|
|
if (operation.ComputedColumnSql != null)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (decimal.TryParse(operation.ComputedColumnSql, out decimal result))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
operation.DefaultValue = result;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
ComputedColumnDefinition(schema, table, name, operation, model, builder);
|
|
|
|
ComputedColumnDefinition(schema, table, name, operation, model, builder);
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var columnType = GetColumnType(schema, table, name, operation, model);
|
|
|
|
var columnType = GetColumnType(schema, table, name, operation, model);
|
|
|
|
//int has no size - ignore
|
|
|
|
//int has no size - ignore
|
|
|
|
|