using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace SVSim.Database.Migrations
{
///
public partial class AddViewerLoginBonusState : Migration
{
///
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "DailyLoginBonuses");
migrationBuilder.AddColumn(
name: "LastLoginBonusClaimedAt",
table: "Viewers",
type: "timestamp with time zone",
nullable: true);
migrationBuilder.AddColumn(
name: "LoginBonusStreak",
table: "Viewers",
type: "integer",
nullable: false,
defaultValue: 0);
}
///
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "LastLoginBonusClaimedAt",
table: "Viewers");
migrationBuilder.DropColumn(
name: "LoginBonusStreak",
table: "Viewers");
migrationBuilder.CreateTable(
name: "DailyLoginBonuses",
columns: table => new
{
Id = table.Column(type: "integer", nullable: false),
BonusData = table.Column(type: "jsonb", nullable: false),
BonusId = table.Column(type: "integer", nullable: false),
DateCreated = table.Column(type: "timestamp with time zone", nullable: false),
DateUpdated = table.Column(type: "timestamp with time zone", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_DailyLoginBonuses", x => x.Id);
});
}
}
}