Skip to content

Commit

Permalink
Make default value '{}' for non-nullable JSON columns (#32354)
Browse files Browse the repository at this point in the history
Fixes #32353
  • Loading branch information
roji authored Nov 20, 2023
1 parent 5488f27 commit 47505c3
Show file tree
Hide file tree
Showing 4 changed files with 1,367 additions and 1,125 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1283,7 +1283,7 @@ private void InitializeJsonColumn(
columnOperation.ClrType = typeof(string);
columnOperation.DefaultValue = inline || isNullable
? null
: GetDefaultValue(columnOperation.ClrType);
: "{}";

columnOperation.AddAnnotations(migrationsAnnotations);
}
Expand Down
Loading

0 comments on commit 47505c3

Please sign in to comment.