Skip to content

Commit 7fb6d40

Browse files
committed
temporary comment out setting decimal for ef migration to work
1 parent 7cb6e13 commit 7fb6d40

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

src/Modules/SimplCommerce.Module.Core/Data/SimplDbContext.cs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,13 @@ protected override void OnModelCreating(ModelBuilder modelBuilder)
4949

5050
RegisterCustomMappings(modelBuilder, typeToRegisters);
5151

52-
foreach (var property in modelBuilder.Model.GetEntityTypes()
53-
.SelectMany(t => t.GetProperties())
54-
.Where(p => p.ClrType == typeof(decimal) || p.ClrType == typeof(decimal?)))
55-
{
56-
property.SetColumnType("decimal(18,2)");
57-
}
52+
//foreach (var property in modelBuilder.Model.GetEntityTypes()
53+
// .SelectMany(t => t.GetProperties())
54+
// .Where(p => p.ClrType == typeof(decimal) || p.ClrType == typeof(decimal?)))
55+
//{
56+
// Console.WriteLine("decimal property: " + property.Name);
57+
// //property.SetColumnType("decimal(18,2)");
58+
//}
5859

5960
if (Database.ProviderName == "Microsoft.EntityFrameworkCore.Sqlite")
6061
{

0 commit comments

Comments
 (0)