removed obsolete xp database columns

This commit is contained in:
Kwoth
2022-08-08 17:36:39 +02:00
parent 6b9a858f28
commit cf876a4148
9 changed files with 11646 additions and 127 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,49 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace NadekoBot.Migrations
{
public partial class removeobsoletexpcolumns : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "LastLevelUp",
table: "UserXpStats");
migrationBuilder.DropColumn(
name: "LastLevelUp",
table: "DiscordUser");
migrationBuilder.DropColumn(
name: "LastXpGain",
table: "DiscordUser");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<DateTime>(
name: "LastLevelUp",
table: "UserXpStats",
type: "TEXT",
nullable: false,
defaultValueSql: "datetime('now')");
migrationBuilder.AddColumn<DateTime>(
name: "LastLevelUp",
table: "DiscordUser",
type: "TEXT",
nullable: false,
defaultValueSql: "datetime('now')");
migrationBuilder.AddColumn<DateTime>(
name: "LastXpGain",
table: "DiscordUser",
type: "TEXT",
nullable: false,
defaultValueSql: "datetime('now', '-1 years')");
}
}
}

View File

@@ -134,16 +134,6 @@ namespace NadekoBot.Migrations
.HasColumnType("INTEGER")
.HasDefaultValue(false);
b.Property<DateTime>("LastLevelUp")
.ValueGeneratedOnAdd()
.HasColumnType("TEXT")
.HasDefaultValueSql("datetime('now')");
b.Property<DateTime>("LastXpGain")
.ValueGeneratedOnAdd()
.HasColumnType("TEXT")
.HasDefaultValueSql("datetime('now', '-1 years')");
b.Property<int>("NotifyOnLevelUp")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER")
@@ -2003,11 +1993,6 @@ namespace NadekoBot.Migrations
b.Property<ulong>("GuildId")
.HasColumnType("INTEGER");
b.Property<DateTime>("LastLevelUp")
.ValueGeneratedOnAdd()
.HasColumnType("TEXT")
.HasDefaultValueSql("datetime('now')");
b.Property<int>("NotifyOnLevelUp")
.HasColumnType("INTEGER");