mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
add default value to timestamps
This commit is contained in:
parent
6120749cfd
commit
b8cefcb493
1 changed files with 2 additions and 0 deletions
|
|
@ -15,10 +15,12 @@ public virtual void Configure(EntityTypeBuilder<TBase> entityTypeBuilder)
|
|||
|
||||
entityTypeBuilder.Property(b => b.CreatedDateUtc)
|
||||
.HasColumnType("TIMESTAMP")
|
||||
.HasDefaultValueSql("CURRENT_TIMESTAMP")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
entityTypeBuilder.Property(b => b.ModifiedDateUtc)
|
||||
.HasColumnType("TIMESTAMP")
|
||||
.HasDefaultValueSql("CURRENT_TIMESTAMP")
|
||||
.ValueGeneratedOnUpdate();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue