mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-25 19:17:13 +08:00
Fixing that DateTime.MinValue as default value for LastPasswordChangeUtc causes exception during setup
This commit is contained in:
@@ -23,7 +23,7 @@ namespace Orchard.Users {
|
||||
.Column<DateTime>("CreatedUtc")
|
||||
.Column<DateTime>("LastLoginUtc")
|
||||
.Column<DateTime>("LastLogoutUtc")
|
||||
.Column<DateTime>("LastPasswordChangeUtc", c => c.WithDefault(DateTime.MinValue))
|
||||
.Column<DateTime>("LastPasswordChangeUtc", c => c.WithDefault(new DateTime(1990, 1, 1)))
|
||||
);
|
||||
|
||||
ContentDefinitionManager.AlterTypeDefinition("User", cfg => cfg.Creatable(false));
|
||||
@@ -59,7 +59,7 @@ namespace Orchard.Users {
|
||||
public int UpdateFrom4() {
|
||||
SchemaBuilder.AlterTable("UserPartRecord",
|
||||
table => {
|
||||
table.AddColumn<DateTime>("LastPasswordChangeUtc", c => c.WithDefault(DateTime.MinValue));
|
||||
table.AddColumn<DateTime>("LastPasswordChangeUtc", c => c.WithDefault(new DateTime(1990, 1, 1)));
|
||||
});
|
||||
|
||||
return 5;
|
||||
|
||||
Reference in New Issue
Block a user