Skip to content

Commit 47505c3

Browse files
authored
Make default value '{}' for non-nullable JSON columns (#32354)
Fixes #32353
1 parent 5488f27 commit 47505c3

File tree

4 files changed

+1367
-1125
lines changed

4 files changed

+1367
-1125
lines changed

src/EFCore.Relational/Migrations/Internal/MigrationsModelDiffer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1283,7 +1283,7 @@ private void InitializeJsonColumn(
12831283
columnOperation.ClrType = typeof(string);
12841284
columnOperation.DefaultValue = inline || isNullable
12851285
? null
1286-
: GetDefaultValue(columnOperation.ClrType);
1286+
: "{}";
12871287

12881288
columnOperation.AddAnnotations(migrationsAnnotations);
12891289
}

0 commit comments

Comments
 (0)