mirror of
				https://gitlab.com/Kwoth/nadekobot.git
				synced 2025-11-04 08:34:27 -05:00 
			
		
		
		
	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:
		
							
								
								
									
										3633
									
								
								src/NadekoBot/Migrations/Mysql/20230813113816_timely-reminder-type.Designer.cs
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										3633
									
								
								src/NadekoBot/Migrations/Mysql/20230813113816_timely-reminder-type.Designer.cs
									
									
									
										generated
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@@ -0,0 +1,29 @@
 | 
			
		||||
using Microsoft.EntityFrameworkCore.Migrations;
 | 
			
		||||
 | 
			
		||||
#nullable disable
 | 
			
		||||
 | 
			
		||||
namespace NadekoBot.Db.Migrations.Mysql
 | 
			
		||||
{
 | 
			
		||||
    /// <inheritdoc />
 | 
			
		||||
    public partial class timelyremindertype : Migration
 | 
			
		||||
    {
 | 
			
		||||
        /// <inheritdoc />
 | 
			
		||||
        protected override void Up(MigrationBuilder migrationBuilder)
 | 
			
		||||
        {
 | 
			
		||||
            migrationBuilder.AddColumn<int>(
 | 
			
		||||
                name: "type",
 | 
			
		||||
                table: "reminders",
 | 
			
		||||
                type: "int",
 | 
			
		||||
                nullable: false,
 | 
			
		||||
                defaultValue: 0);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        /// <inheritdoc />
 | 
			
		||||
        protected override void Down(MigrationBuilder migrationBuilder)
 | 
			
		||||
        {
 | 
			
		||||
            migrationBuilder.DropColumn(
 | 
			
		||||
                name: "type",
 | 
			
		||||
                table: "reminders");
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@@ -2112,6 +2112,10 @@ namespace NadekoBot.Db.Migrations.Mysql
 | 
			
		||||
                        .HasColumnType("bigint unsigned")
 | 
			
		||||
                        .HasColumnName("serverid");
 | 
			
		||||
 | 
			
		||||
                    b.Property<int>("Type")
 | 
			
		||||
                        .HasColumnType("int")
 | 
			
		||||
                        .HasColumnName("type");
 | 
			
		||||
 | 
			
		||||
                    b.Property<ulong>("UserId")
 | 
			
		||||
                        .HasColumnType("bigint unsigned")
 | 
			
		||||
                        .HasColumnName("userid");
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										3781
									
								
								src/NadekoBot/Migrations/Postgresql/20230813113832_timely-reminder-type.Designer.cs
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										3781
									
								
								src/NadekoBot/Migrations/Postgresql/20230813113832_timely-reminder-type.Designer.cs
									
									
									
										generated
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@@ -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");
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@@ -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");
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										2914
									
								
								src/NadekoBot/Migrations/Sqlite/20230813110732_timely-reminder-type.Designer.cs
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										2914
									
								
								src/NadekoBot/Migrations/Sqlite/20230813110732_timely-reminder-type.Designer.cs
									
									
									
										generated
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@@ -0,0 +1,29 @@
 | 
			
		||||
using Microsoft.EntityFrameworkCore.Migrations;
 | 
			
		||||
 | 
			
		||||
#nullable disable
 | 
			
		||||
 | 
			
		||||
namespace NadekoBot.Db.Migrations.Sqlite
 | 
			
		||||
{
 | 
			
		||||
    /// <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");
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@@ -1648,6 +1648,9 @@ namespace NadekoBot.Db.Migrations.Sqlite
 | 
			
		||||
                    b.Property<ulong>("ServerId")
 | 
			
		||||
                        .HasColumnType("INTEGER");
 | 
			
		||||
 | 
			
		||||
                    b.Property<int>("Type")
 | 
			
		||||
                        .HasColumnType("INTEGER");
 | 
			
		||||
 | 
			
		||||
                    b.Property<ulong>("UserId")
 | 
			
		||||
                        .HasColumnType("INTEGER");
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user