Add timely reminder button*

* Add a check in Timely command that removes the reminder button if there already is a timely reminder in DB.
* Add ReminderType in db/models. As well as migrations.
* Set Normal reminders to be of `ReminderType.User`, and Timely reminders to be of `ReminderType.Timely`
This commit is contained in:
Cata
2023-08-20 13:28:16 +00:00
committed by Kwoth
parent 3c3d082112
commit cdf9adc8a4
15 changed files with 10478 additions and 19 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,29 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace NadekoBot.Db.Migrations
{
/// <inheritdoc />
public partial class timelyremindertype : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<int>(
name: "type",
table: "reminders",
type: "integer",
nullable: false,
defaultValue: 0);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "type",
table: "reminders");
}
}
}

View File

@@ -17,7 +17,7 @@ namespace NadekoBot.Db.Migrations
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "6.0.7")
.HasAnnotation("ProductVersion", "7.0.4")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
@@ -2212,6 +2212,10 @@ namespace NadekoBot.Db.Migrations
.HasColumnType("numeric(20,0)")
.HasColumnName("serverid");
b.Property<int>("Type")
.HasColumnType("integer")
.HasColumnName("type");
b.Property<decimal>("UserId")
.HasColumnType("numeric(20,0)")
.HasColumnName("userid");