Skip to content

Commit f91a76b

Browse files
committed
Fix test computed column
1 parent db4266b commit f91a76b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/MR.EntityFrameworkCore.KeysetPagination.Tests/TestModels/TestDbContext.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,15 @@ protected override void OnModelCreating(ModelBuilder builder)
4444
computedPropertyBuilder
4545
// Has to be deterministic to be able to create an index for it, that's why we need
4646
// to use CONVERT.
47-
.HasComputedColumnSql("COALESCE(Created, CONVERT(datetime2, '9999-12-31', 102))");
47+
.HasComputedColumnSql("COALESCE(CreatedNullable, CONVERT(datetime2, '1900-01-01', 102))");
4848
}
4949
else
5050
{
5151
// For sqlite:
5252
computedPropertyBuilder
5353
// This is how EF formats dates for sqlite. Be careful, you'll have to put the
5454
// right format or you might get wrong results.
55-
.HasComputedColumnSql("COALESCE(Created, '9999-12-31 00:00:00')");
55+
.HasComputedColumnSql("COALESCE(CreatedNullable, '1900-01-01 00:00:00')");
5656
}
5757
}
5858
}

0 commit comments

Comments
 (0)