Drop admin log entity db table (#21216)
This commit is contained in:
1735
Content.Server.Database/Migrations/Postgres/20231024041204_DropAdminLogEntity.Designer.cs
generated
Normal file
1735
Content.Server.Database/Migrations/Postgres/20231024041204_DropAdminLogEntity.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,47 @@
|
||||
#nullable disable
|
||||
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
|
||||
namespace Content.Server.Database.Migrations.Postgres
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class DropAdminLogEntity : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "admin_log_entity");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "admin_log_entity",
|
||||
columns: table => new
|
||||
{
|
||||
uid = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
admin_log_id = table.Column<int>(type: "integer", nullable: true),
|
||||
admin_log_round_id = table.Column<int>(type: "integer", nullable: true),
|
||||
name = table.Column<string>(type: "text", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_admin_log_entity", x => x.uid);
|
||||
table.ForeignKey(
|
||||
name: "FK_admin_log_entity_admin_log_admin_log_id_admin_log_round_id",
|
||||
columns: x => new { x.admin_log_id, x.admin_log_round_id },
|
||||
principalTable: "admin_log",
|
||||
principalColumns: new[] { "admin_log_id", "round_id" });
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_admin_log_entity_admin_log_id_admin_log_round_id",
|
||||
table: "admin_log_entity",
|
||||
columns: new[] { "admin_log_id", "admin_log_round_id" });
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -133,36 +133,6 @@ namespace Content.Server.Database.Migrations.Postgres
|
||||
b.ToTable("admin_log", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Content.Server.Database.AdminLogEntity", b =>
|
||||
{
|
||||
b.Property<int>("Uid")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("uid");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Uid"));
|
||||
|
||||
b.Property<int?>("AdminLogId")
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("admin_log_id");
|
||||
|
||||
b.Property<int?>("AdminLogRoundId")
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("admin_log_round_id");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.HasColumnType("text")
|
||||
.HasColumnName("name");
|
||||
|
||||
b.HasKey("Uid")
|
||||
.HasName("PK_admin_log_entity");
|
||||
|
||||
b.HasIndex("AdminLogId", "AdminLogRoundId")
|
||||
.HasDatabaseName("IX_admin_log_entity_admin_log_id_admin_log_round_id");
|
||||
|
||||
b.ToTable("admin_log_entity", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Content.Server.Database.AdminLogPlayer", b =>
|
||||
{
|
||||
b.Property<Guid>("PlayerUserId")
|
||||
@@ -1312,14 +1282,6 @@ namespace Content.Server.Database.Migrations.Postgres
|
||||
b.Navigation("Round");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Content.Server.Database.AdminLogEntity", b =>
|
||||
{
|
||||
b.HasOne("Content.Server.Database.AdminLog", null)
|
||||
.WithMany("Entities")
|
||||
.HasForeignKey("AdminLogId", "AdminLogRoundId")
|
||||
.HasConstraintName("FK_admin_log_entity_admin_log_admin_log_id_admin_log_round_id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Content.Server.Database.AdminLogPlayer", b =>
|
||||
{
|
||||
b.HasOne("Content.Server.Database.Player", "Player")
|
||||
@@ -1677,8 +1639,6 @@ namespace Content.Server.Database.Migrations.Postgres
|
||||
|
||||
modelBuilder.Entity("Content.Server.Database.AdminLog", b =>
|
||||
{
|
||||
b.Navigation("Entities");
|
||||
|
||||
b.Navigation("Players");
|
||||
});
|
||||
|
||||
|
||||
1667
Content.Server.Database/Migrations/Sqlite/20231024041159_DropAdminLogEntity.Designer.cs
generated
Normal file
1667
Content.Server.Database/Migrations/Sqlite/20231024041159_DropAdminLogEntity.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,46 @@
|
||||
#nullable disable
|
||||
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace Content.Server.Database.Migrations.Sqlite
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class DropAdminLogEntity : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "admin_log_entity");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "admin_log_entity",
|
||||
columns: table => new
|
||||
{
|
||||
uid = table.Column<int>(type: "INTEGER", nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
admin_log_id = table.Column<int>(type: "INTEGER", nullable: true),
|
||||
admin_log_round_id = table.Column<int>(type: "INTEGER", nullable: true),
|
||||
name = table.Column<string>(type: "TEXT", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_admin_log_entity", x => x.uid);
|
||||
table.ForeignKey(
|
||||
name: "FK_admin_log_entity_admin_log_admin_log_id_admin_log_round_id",
|
||||
columns: x => new { x.admin_log_id, x.admin_log_round_id },
|
||||
principalTable: "admin_log",
|
||||
principalColumns: new[] { "admin_log_id", "round_id" });
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_admin_log_entity_admin_log_id_admin_log_round_id",
|
||||
table: "admin_log_entity",
|
||||
columns: new[] { "admin_log_id", "admin_log_round_id" });
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -119,34 +119,6 @@ namespace Content.Server.Database.Migrations.Sqlite
|
||||
b.ToTable("admin_log", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Content.Server.Database.AdminLogEntity", b =>
|
||||
{
|
||||
b.Property<int>("Uid")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER")
|
||||
.HasColumnName("uid");
|
||||
|
||||
b.Property<int?>("AdminLogId")
|
||||
.HasColumnType("INTEGER")
|
||||
.HasColumnName("admin_log_id");
|
||||
|
||||
b.Property<int?>("AdminLogRoundId")
|
||||
.HasColumnType("INTEGER")
|
||||
.HasColumnName("admin_log_round_id");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("name");
|
||||
|
||||
b.HasKey("Uid")
|
||||
.HasName("PK_admin_log_entity");
|
||||
|
||||
b.HasIndex("AdminLogId", "AdminLogRoundId")
|
||||
.HasDatabaseName("IX_admin_log_entity_admin_log_id_admin_log_round_id");
|
||||
|
||||
b.ToTable("admin_log_entity", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Content.Server.Database.AdminLogPlayer", b =>
|
||||
{
|
||||
b.Property<Guid>("PlayerUserId")
|
||||
@@ -1242,14 +1214,6 @@ namespace Content.Server.Database.Migrations.Sqlite
|
||||
b.Navigation("Round");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Content.Server.Database.AdminLogEntity", b =>
|
||||
{
|
||||
b.HasOne("Content.Server.Database.AdminLog", null)
|
||||
.WithMany("Entities")
|
||||
.HasForeignKey("AdminLogId", "AdminLogRoundId")
|
||||
.HasConstraintName("FK_admin_log_entity_admin_log_admin_log_id_admin_log_round_id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Content.Server.Database.AdminLogPlayer", b =>
|
||||
{
|
||||
b.HasOne("Content.Server.Database.Player", "Player")
|
||||
@@ -1607,8 +1571,6 @@ namespace Content.Server.Database.Migrations.Sqlite
|
||||
|
||||
modelBuilder.Entity("Content.Server.Database.AdminLog", b =>
|
||||
{
|
||||
b.Navigation("Entities");
|
||||
|
||||
b.Navigation("Players");
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user