- Recreated cleanup migration with discorduser default values

- Using LinqToDb UpdateOrInsert for .EnsureUserCreated
This commit is contained in:
Kwoth
2021-07-07 02:32:56 +02:00
parent 0fc5f540d8
commit ac9f84715b
7 changed files with 132 additions and 37 deletions

View File

@@ -110,18 +110,24 @@ namespace NadekoBot.Migrations
.HasColumnType("TEXT");
b.Property<bool>("IsClubAdmin")
.HasColumnType("INTEGER");
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER")
.HasDefaultValue(false);
b.Property<DateTime>("LastLevelUp")
.ValueGeneratedOnAdd()
.HasColumnType("TEXT")
.HasDefaultValue(new DateTime(2017, 9, 21, 20, 53, 13, 305, DateTimeKind.Local));
.HasDefaultValueSql("datetime('now')");
b.Property<DateTime>("LastXpGain")
.HasColumnType("TEXT");
.ValueGeneratedOnAdd()
.HasColumnType("TEXT")
.HasDefaultValueSql("datetime('now', '-1 years')");
b.Property<int>("NotifyOnLevelUp")
.HasColumnType("INTEGER");
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER")
.HasDefaultValue(0);
b.Property<int>("TotalXp")
.HasColumnType("INTEGER");