mirror of
				https://gitlab.com/Kwoth/nadekobot.git
				synced 2025-11-03 16:24:27 -05:00 
			
		
		
		
	Added gambling stats migrations for postgres and mysql
This commit is contained in:
		
							
								
								
									
										3612
									
								
								src/NadekoBot/Migrations/Mysql/20221003175743_gambling-stats.Designer.cs
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										3612
									
								
								src/NadekoBot/Migrations/Mysql/20221003175743_gambling-stats.Designer.cs
									
									
									
										generated
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@@ -0,0 +1,44 @@
 | 
			
		||||
using System;
 | 
			
		||||
using Microsoft.EntityFrameworkCore.Metadata;
 | 
			
		||||
using Microsoft.EntityFrameworkCore.Migrations;
 | 
			
		||||
 | 
			
		||||
#nullable disable
 | 
			
		||||
 | 
			
		||||
namespace NadekoBot.Migrations.Mysql
 | 
			
		||||
{
 | 
			
		||||
    public partial class gamblingstats : Migration
 | 
			
		||||
    {
 | 
			
		||||
        protected override void Up(MigrationBuilder migrationBuilder)
 | 
			
		||||
        {
 | 
			
		||||
            migrationBuilder.CreateTable(
 | 
			
		||||
                name: "gamblingstats",
 | 
			
		||||
                columns: table => new
 | 
			
		||||
                {
 | 
			
		||||
                    id = table.Column<int>(type: "int", nullable: false)
 | 
			
		||||
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
 | 
			
		||||
                    feature = table.Column<string>(type: "varchar(255)", nullable: true)
 | 
			
		||||
                        .Annotation("MySql:CharSet", "utf8mb4"),
 | 
			
		||||
                    bet = table.Column<decimal>(type: "decimal(65,30)", nullable: false),
 | 
			
		||||
                    paidout = table.Column<decimal>(type: "decimal(65,30)", nullable: false),
 | 
			
		||||
                    dateadded = table.Column<DateTime>(type: "datetime(6)", nullable: true)
 | 
			
		||||
                },
 | 
			
		||||
                constraints: table =>
 | 
			
		||||
                {
 | 
			
		||||
                    table.PrimaryKey("pk_gamblingstats", x => x.id);
 | 
			
		||||
                })
 | 
			
		||||
                .Annotation("MySql:CharSet", "utf8mb4");
 | 
			
		||||
 | 
			
		||||
            migrationBuilder.CreateIndex(
 | 
			
		||||
                name: "ix_gamblingstats_feature",
 | 
			
		||||
                table: "gamblingstats",
 | 
			
		||||
                column: "feature",
 | 
			
		||||
                unique: true);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        protected override void Down(MigrationBuilder migrationBuilder)
 | 
			
		||||
        {
 | 
			
		||||
            migrationBuilder.DropTable(
 | 
			
		||||
                name: "gamblingstats");
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@@ -1101,6 +1101,39 @@ namespace NadekoBot.Migrations.Mysql
 | 
			
		||||
                    b.ToTable("filterwordschannelid", (string)null);
 | 
			
		||||
                });
 | 
			
		||||
 | 
			
		||||
            modelBuilder.Entity("NadekoBot.Services.Database.Models.GamblingStats", b =>
 | 
			
		||||
                {
 | 
			
		||||
                    b.Property<int>("Id")
 | 
			
		||||
                        .ValueGeneratedOnAdd()
 | 
			
		||||
                        .HasColumnType("int")
 | 
			
		||||
                        .HasColumnName("id");
 | 
			
		||||
 | 
			
		||||
                    b.Property<decimal>("Bet")
 | 
			
		||||
                        .HasColumnType("decimal(65,30)")
 | 
			
		||||
                        .HasColumnName("bet");
 | 
			
		||||
 | 
			
		||||
                    b.Property<DateTime?>("DateAdded")
 | 
			
		||||
                        .HasColumnType("datetime(6)")
 | 
			
		||||
                        .HasColumnName("dateadded");
 | 
			
		||||
 | 
			
		||||
                    b.Property<string>("Feature")
 | 
			
		||||
                        .HasColumnType("varchar(255)")
 | 
			
		||||
                        .HasColumnName("feature");
 | 
			
		||||
 | 
			
		||||
                    b.Property<decimal>("PaidOut")
 | 
			
		||||
                        .HasColumnType("decimal(65,30)")
 | 
			
		||||
                        .HasColumnName("paidout");
 | 
			
		||||
 | 
			
		||||
                    b.HasKey("Id")
 | 
			
		||||
                        .HasName("pk_gamblingstats");
 | 
			
		||||
 | 
			
		||||
                    b.HasIndex("Feature")
 | 
			
		||||
                        .IsUnique()
 | 
			
		||||
                        .HasDatabaseName("ix_gamblingstats_feature");
 | 
			
		||||
 | 
			
		||||
                    b.ToTable("gamblingstats", (string)null);
 | 
			
		||||
                });
 | 
			
		||||
 | 
			
		||||
            modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b =>
 | 
			
		||||
                {
 | 
			
		||||
                    b.Property<int>("Id")
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										3760
									
								
								src/NadekoBot/Migrations/PostgreSql/20221003175752_gambling-stats.Designer.cs
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										3760
									
								
								src/NadekoBot/Migrations/PostgreSql/20221003175752_gambling-stats.Designer.cs
									
									
									
										generated
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@@ -0,0 +1,42 @@
 | 
			
		||||
using System;
 | 
			
		||||
using Microsoft.EntityFrameworkCore.Migrations;
 | 
			
		||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
 | 
			
		||||
 | 
			
		||||
#nullable disable
 | 
			
		||||
 | 
			
		||||
namespace NadekoBot.Migrations.PostgreSql
 | 
			
		||||
{
 | 
			
		||||
    public partial class gamblingstats : Migration
 | 
			
		||||
    {
 | 
			
		||||
        protected override void Up(MigrationBuilder migrationBuilder)
 | 
			
		||||
        {
 | 
			
		||||
            migrationBuilder.CreateTable(
 | 
			
		||||
                name: "gamblingstats",
 | 
			
		||||
                columns: table => new
 | 
			
		||||
                {
 | 
			
		||||
                    id = table.Column<int>(type: "integer", nullable: false)
 | 
			
		||||
                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
 | 
			
		||||
                    feature = table.Column<string>(type: "text", nullable: true),
 | 
			
		||||
                    bet = table.Column<decimal>(type: "numeric", nullable: false),
 | 
			
		||||
                    paidout = table.Column<decimal>(type: "numeric", nullable: false),
 | 
			
		||||
                    dateadded = table.Column<DateTime>(type: "timestamp without time zone", nullable: true)
 | 
			
		||||
                },
 | 
			
		||||
                constraints: table =>
 | 
			
		||||
                {
 | 
			
		||||
                    table.PrimaryKey("pk_gamblingstats", x => x.id);
 | 
			
		||||
                });
 | 
			
		||||
 | 
			
		||||
            migrationBuilder.CreateIndex(
 | 
			
		||||
                name: "ix_gamblingstats_feature",
 | 
			
		||||
                table: "gamblingstats",
 | 
			
		||||
                column: "feature",
 | 
			
		||||
                unique: true);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        protected override void Down(MigrationBuilder migrationBuilder)
 | 
			
		||||
        {
 | 
			
		||||
            migrationBuilder.DropTable(
 | 
			
		||||
                name: "gamblingstats");
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@@ -1157,6 +1157,41 @@ namespace NadekoBot.Migrations.PostgreSql
 | 
			
		||||
                    b.ToTable("filterwordschannelid", (string)null);
 | 
			
		||||
                });
 | 
			
		||||
 | 
			
		||||
            modelBuilder.Entity("NadekoBot.Services.Database.Models.GamblingStats", b =>
 | 
			
		||||
                {
 | 
			
		||||
                    b.Property<int>("Id")
 | 
			
		||||
                        .ValueGeneratedOnAdd()
 | 
			
		||||
                        .HasColumnType("integer")
 | 
			
		||||
                        .HasColumnName("id");
 | 
			
		||||
 | 
			
		||||
                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
 | 
			
		||||
 | 
			
		||||
                    b.Property<decimal>("Bet")
 | 
			
		||||
                        .HasColumnType("numeric")
 | 
			
		||||
                        .HasColumnName("bet");
 | 
			
		||||
 | 
			
		||||
                    b.Property<DateTime?>("DateAdded")
 | 
			
		||||
                        .HasColumnType("timestamp without time zone")
 | 
			
		||||
                        .HasColumnName("dateadded");
 | 
			
		||||
 | 
			
		||||
                    b.Property<string>("Feature")
 | 
			
		||||
                        .HasColumnType("text")
 | 
			
		||||
                        .HasColumnName("feature");
 | 
			
		||||
 | 
			
		||||
                    b.Property<decimal>("PaidOut")
 | 
			
		||||
                        .HasColumnType("numeric")
 | 
			
		||||
                        .HasColumnName("paidout");
 | 
			
		||||
 | 
			
		||||
                    b.HasKey("Id")
 | 
			
		||||
                        .HasName("pk_gamblingstats");
 | 
			
		||||
 | 
			
		||||
                    b.HasIndex("Feature")
 | 
			
		||||
                        .IsUnique()
 | 
			
		||||
                        .HasDatabaseName("ix_gamblingstats_feature");
 | 
			
		||||
 | 
			
		||||
                    b.ToTable("gamblingstats", (string)null);
 | 
			
		||||
                });
 | 
			
		||||
 | 
			
		||||
            modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b =>
 | 
			
		||||
                {
 | 
			
		||||
                    b.Property<int>("Id")
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user