mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-11 09:48:26 -04:00
fix: revert patron migration temporarily as ef core is bugging out hard
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -1,58 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace NadekoBot.Migrations.PostgreSql
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class patronfix : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropPrimaryKey(
|
||||
name: "pk_patrons",
|
||||
table: "patrons");
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "id",
|
||||
table: "patrons",
|
||||
type: "integer",
|
||||
nullable: false,
|
||||
defaultValue: 0)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||
|
||||
migrationBuilder.AddPrimaryKey(
|
||||
name: "pk_patrons",
|
||||
table: "patrons",
|
||||
column: "id");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "ix_patrons_userid",
|
||||
table: "patrons",
|
||||
column: "userid");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropPrimaryKey(
|
||||
name: "pk_patrons",
|
||||
table: "patrons");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "ix_patrons_userid",
|
||||
table: "patrons");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "id",
|
||||
table: "patrons");
|
||||
|
||||
migrationBuilder.AddPrimaryKey(
|
||||
name: "pk_patrons",
|
||||
table: "patrons",
|
||||
column: "userid");
|
||||
}
|
||||
}
|
||||
}
|
@@ -1753,12 +1753,10 @@ namespace NadekoBot.Migrations.PostgreSql
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.PatronUser", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
b.Property<decimal>("UserId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("id");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
.HasColumnType("numeric(20,0)")
|
||||
.HasColumnName("userid");
|
||||
|
||||
b.Property<int>("AmountCents")
|
||||
.HasColumnType("integer")
|
||||
@@ -1772,24 +1770,17 @@ namespace NadekoBot.Migrations.PostgreSql
|
||||
.HasColumnType("text")
|
||||
.HasColumnName("uniqueplatformuserid");
|
||||
|
||||
b.Property<decimal>("UserId")
|
||||
.HasColumnType("numeric(20,0)")
|
||||
.HasColumnName("userid");
|
||||
|
||||
b.Property<DateTime>("ValidThru")
|
||||
.HasColumnType("timestamp without time zone")
|
||||
.HasColumnName("validthru");
|
||||
|
||||
b.HasKey("Id")
|
||||
b.HasKey("UserId")
|
||||
.HasName("pk_patrons");
|
||||
|
||||
b.HasIndex("UniquePlatformUserId")
|
||||
.IsUnique()
|
||||
.HasDatabaseName("ix_patrons_uniqueplatformuserid");
|
||||
|
||||
b.HasIndex("UserId")
|
||||
.HasDatabaseName("ix_patrons_userid");
|
||||
|
||||
b.ToTable("patrons", (string)null);
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user