Migrations fix

пофиксил миграции путём... комментирования кода?
ахуенно да
This commit is contained in:
LEVELcat
2025-04-01 20:30:06 +03:00
parent c19c0f2a45
commit 06e0b9731d
6 changed files with 5155 additions and 16 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,193 @@
using System;
using System.Net;
using Microsoft.EntityFrameworkCore.Migrations;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable
namespace Content.Server.Database.Migrations.Postgres
{
/// <inheritdoc />
public partial class WLfixedUpstram_1 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
//Duplicate column
//migrationBuilder.AddColumn<int>(
// name: "height",
// table: "profile",
// type: "integer",
// nullable: false,
// defaultValue: 0);
//Duplicate column
//migrationBuilder.AddColumn<string>(
// name: "ooc_text",
// table: "profile",
// type: "text",
// nullable: false,
// defaultValue: "");
//Duplicate column
//migrationBuilder.AddColumn<string>(
// name: "voice",
// table: "profile",
// type: "text",
// nullable: false,
// defaultValue: "");
//Duplicate column
//migrationBuilder.AddColumn<bool>(
// name: "deadminned",
// table: "admin",
// type: "boolean",
// nullable: false,
// defaultValue: false);
//Duplicate column
//migrationBuilder.AddColumn<bool>(
// name: "suspended",
// table: "admin",
// type: "boolean",
// nullable: false,
// defaultValue: false);
//migrationBuilder.CreateTable(
// name: "discord_connections",
// columns: table => new
// {
// discord_connections_id = table.Column<int>(type: "integer", nullable: false)
// .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
// discord_id = table.Column<string>(type: "text", nullable: false),
// user_guid = table.Column<Guid>(type: "uuid", nullable: false)
// },
// constraints: table =>
// {
// table.PrimaryKey("PK_discord_connections", x => x.discord_connections_id);
// });
//migrationBuilder.CreateTable(
// name: "ipintel_cache",
// columns: table => new
// {
// ipintel_cache_id = table.Column<int>(type: "integer", nullable: false)
// .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
// address = table.Column<IPAddress>(type: "inet", nullable: false),
// time = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
// score = table.Column<float>(type: "real", nullable: false)
// },
// constraints: table =>
// {
// table.PrimaryKey("PK_ipintel_cache", x => x.ipintel_cache_id);
// });
//migrationBuilder.CreateTable(
// name: "job_subname",
// columns: table => new
// {
// job_subname_id = table.Column<int>(type: "integer", nullable: false)
// .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
// profile_id = table.Column<int>(type: "integer", nullable: false),
// job_name = table.Column<string>(type: "text", nullable: false),
// subname = table.Column<string>(type: "text", nullable: false)
// },
// constraints: table =>
// {
// table.PrimaryKey("PK_job_subname", x => x.job_subname_id);
// table.ForeignKey(
// name: "FK_job_subname_profile_profile_id",
// column: x => x.profile_id,
// principalTable: "profile",
// principalColumn: "profile_id",
// onDelete: ReferentialAction.Cascade);
// });
//migrationBuilder.CreateTable(
// name: "job_unblocking",
// columns: table => new
// {
// job_unblocking_id = table.Column<int>(type: "integer", nullable: false)
// .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
// profile_id = table.Column<int>(type: "integer", nullable: false),
// job_name = table.Column<string>(type: "text", nullable: false),
// force_unblocked = table.Column<bool>(type: "boolean", nullable: false)
// },
// constraints: table =>
// {
// table.PrimaryKey("PK_job_unblocking", x => x.job_unblocking_id);
// table.ForeignKey(
// name: "FK_job_unblocking_profile_profile_id",
// column: x => x.profile_id,
// principalTable: "profile",
// principalColumn: "profile_id",
// onDelete: ReferentialAction.Cascade);
// });
//migrationBuilder.CreateIndex(
// name: "IX_discord_connections_discord_id",
// table: "discord_connections",
// column: "discord_id",
// unique: true);
//migrationBuilder.CreateIndex(
// name: "IX_discord_connections_user_guid",
// table: "discord_connections",
// column: "user_guid",
// unique: true);
//migrationBuilder.CreateIndex(
// name: "IX_job_subname_profile_id_job_name",
// table: "job_subname",
// columns: new[] { "profile_id", "job_name" },
// unique: true);
//migrationBuilder.CreateIndex(
// name: "IX_job_unblocking_profile_id_job_name",
// table: "job_unblocking",
// columns: new[] { "profile_id", "job_name" },
// unique: true);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
//migrationBuilder.DropTable(
// name: "discord_connections");
//migrationBuilder.DropTable(
// name: "ipintel_cache");
//migrationBuilder.DropTable(
// name: "job_subname");
//migrationBuilder.DropTable(
// name: "job_unblocking");
//Duplicate column
//migrationBuilder.DropColumn(
// name: "height",
// table: "profile");
//Duplicate column
//migrationBuilder.DropColumn(
// name: "ooc_text",
// table: "profile");
//Duplicate column
//migrationBuilder.DropColumn(
// name: "voice",
// table: "profile");
//Duplicate column
//migrationBuilder.DropColumn(
// name: "deadminned",
// table: "admin");
//Duplicate column
//migrationBuilder.DropColumn(
// name: "suspended",
// table: "admin");
}
}
}

View File

@@ -36,6 +36,14 @@ namespace Content.Server.Database.Migrations.Postgres
.HasColumnType("integer")
.HasColumnName("admin_rank_id");
b.Property<bool>("Deadminned")
.HasColumnType("boolean")
.HasColumnName("deadminned");
b.Property<bool>("Suspended")
.HasColumnType("boolean")
.HasColumnName("suspended");
b.Property<string>("Title")
.HasColumnType("text")
.HasColumnName("title");
@@ -627,6 +635,64 @@ namespace Content.Server.Database.Migrations.Postgres
});
});
modelBuilder.Entity("Content.Server.Database.DiscordConnection", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasColumnName("discord_connections_id");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("DiscordId")
.IsRequired()
.HasColumnType("text")
.HasColumnName("discord_id");
b.Property<Guid>("UserGuid")
.HasColumnType("uuid")
.HasColumnName("user_guid");
b.HasKey("Id")
.HasName("PK_discord_connections");
b.HasIndex("DiscordId")
.IsUnique();
b.HasIndex("UserGuid")
.IsUnique();
b.ToTable("discord_connections", (string)null);
});
modelBuilder.Entity("Content.Server.Database.IPIntelCache", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasColumnName("ipintel_cache_id");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<IPAddress>("Address")
.IsRequired()
.HasColumnType("inet")
.HasColumnName("address");
b.Property<float>("Score")
.HasColumnType("real")
.HasColumnName("score");
b.Property<DateTime>("Time")
.HasColumnType("timestamp with time zone")
.HasColumnName("time");
b.HasKey("Id")
.HasName("PK_ipintel_cache");
b.ToTable("ipintel_cache", (string)null);
});
modelBuilder.Entity("Content.Server.Database.Job", b =>
{
b.Property<int>("Id")
@@ -664,6 +730,69 @@ namespace Content.Server.Database.Migrations.Postgres
b.ToTable("job", (string)null);
});
modelBuilder.Entity("Content.Server.Database.JobSubname", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasColumnName("job_subname_id");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("JobName")
.IsRequired()
.HasColumnType("text")
.HasColumnName("job_name");
b.Property<int>("ProfileId")
.HasColumnType("integer")
.HasColumnName("profile_id");
b.Property<string>("Subname")
.IsRequired()
.HasColumnType("text")
.HasColumnName("subname");
b.HasKey("Id")
.HasName("PK_job_subname");
b.HasIndex("ProfileId", "JobName")
.IsUnique();
b.ToTable("job_subname", (string)null);
});
modelBuilder.Entity("Content.Server.Database.JobUnblocking", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasColumnName("job_unblocking_id");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<bool>("ForceUnblocked")
.HasColumnType("boolean")
.HasColumnName("force_unblocked");
b.Property<string>("JobName")
.IsRequired()
.HasColumnType("text")
.HasColumnName("job_name");
b.Property<int>("ProfileId")
.HasColumnType("integer")
.HasColumnName("profile_id");
b.HasKey("Id")
.HasName("PK_job_unblocking");
b.HasIndex("ProfileId", "JobName")
.IsUnique();
b.ToTable("job_unblocking", (string)null);
});
modelBuilder.Entity("Content.Server.Database.PlayTime", b =>
{
b.Property<int>("Id")
@@ -831,10 +960,19 @@ namespace Content.Server.Database.Migrations.Postgres
.HasColumnType("text")
.HasColumnName("hair_name");
b.Property<int>("Height")
.HasColumnType("integer")
.HasColumnName("height");
b.Property<JsonDocument>("Markings")
.HasColumnType("jsonb")
.HasColumnName("markings");
b.Property<string>("OocText")
.IsRequired()
.HasColumnType("text")
.HasColumnName("ooc_text");
b.Property<int>("PreferenceId")
.HasColumnType("integer")
.HasColumnName("preference_id");
@@ -866,6 +1004,11 @@ namespace Content.Server.Database.Migrations.Postgres
.HasColumnType("text")
.HasColumnName("species");
b.Property<string>("Voice")
.IsRequired()
.HasColumnType("text")
.HasColumnName("voice");
b.HasKey("Id")
.HasName("PK_profile");
@@ -1624,7 +1767,7 @@ namespace Content.Server.Database.Migrations.Postgres
.IsRequired()
.HasConstraintName("FK_connection_log_server_server_id");
b.OwnsOne("Content.Server.Database.ConnectionLog.HWId#Content.Server.Database.TypedHwid", "HWId", b1 =>
b.OwnsOne("Content.Server.Database.TypedHwid", "HWId", b1 =>
{
b1.Property<int>("ConnectionLogId")
.HasColumnType("integer")
@@ -1643,7 +1786,7 @@ namespace Content.Server.Database.Migrations.Postgres
b1.HasKey("ConnectionLogId");
b1.ToTable("connection_log", (string)null);
b1.ToTable("connection_log");
b1.WithOwner()
.HasForeignKey("ConnectionLogId")
@@ -1667,9 +1810,33 @@ namespace Content.Server.Database.Migrations.Postgres
b.Navigation("Profile");
});
modelBuilder.Entity("Content.Server.Database.JobSubname", b =>
{
b.HasOne("Content.Server.Database.Profile", "Profile")
.WithMany("JobSubnames")
.HasForeignKey("ProfileId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired()
.HasConstraintName("FK_job_subname_profile_profile_id");
b.Navigation("Profile");
});
modelBuilder.Entity("Content.Server.Database.JobUnblocking", b =>
{
b.HasOne("Content.Server.Database.Profile", "Profile")
.WithMany("JobUnblockings")
.HasForeignKey("ProfileId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired()
.HasConstraintName("FK_job_unblocking_profile_profile_id");
b.Navigation("Profile");
});
modelBuilder.Entity("Content.Server.Database.Player", b =>
{
b.OwnsOne("Content.Server.Database.Player.LastSeenHWId#Content.Server.Database.TypedHwid", "LastSeenHWId", b1 =>
b.OwnsOne("Content.Server.Database.TypedHwid", "LastSeenHWId", b1 =>
{
b1.Property<int>("PlayerId")
.HasColumnType("integer")
@@ -1688,7 +1855,7 @@ namespace Content.Server.Database.Migrations.Postgres
b1.HasKey("PlayerId");
b1.ToTable("player", (string)null);
b1.ToTable("player");
b1.WithOwner()
.HasForeignKey("PlayerId")
@@ -1792,7 +1959,7 @@ namespace Content.Server.Database.Migrations.Postgres
.HasForeignKey("RoundId")
.HasConstraintName("FK_server_ban_round_round_id");
b.OwnsOne("Content.Server.Database.ServerBan.HWId#Content.Server.Database.TypedHwid", "HWId", b1 =>
b.OwnsOne("Content.Server.Database.TypedHwid", "HWId", b1 =>
{
b1.Property<int>("ServerBanId")
.HasColumnType("integer")
@@ -1811,7 +1978,7 @@ namespace Content.Server.Database.Migrations.Postgres
b1.HasKey("ServerBanId");
b1.ToTable("server_ban", (string)null);
b1.ToTable("server_ban");
b1.WithOwner()
.HasForeignKey("ServerBanId")
@@ -1869,7 +2036,7 @@ namespace Content.Server.Database.Migrations.Postgres
.HasForeignKey("RoundId")
.HasConstraintName("FK_server_role_ban_round_round_id");
b.OwnsOne("Content.Server.Database.ServerRoleBan.HWId#Content.Server.Database.TypedHwid", "HWId", b1 =>
b.OwnsOne("Content.Server.Database.TypedHwid", "HWId", b1 =>
{
b1.Property<int>("ServerRoleBanId")
.HasColumnType("integer")
@@ -1888,7 +2055,7 @@ namespace Content.Server.Database.Migrations.Postgres
b1.HasKey("ServerRoleBanId");
b1.ToTable("server_role_ban", (string)null);
b1.ToTable("server_role_ban");
b1.WithOwner()
.HasForeignKey("ServerRoleBanId")
@@ -2027,6 +2194,10 @@ namespace Content.Server.Database.Migrations.Postgres
{
b.Navigation("Antags");
b.Navigation("JobSubnames");
b.Navigation("JobUnblockings");
b.Navigation("Jobs");
b.Navigation("Loadouts");

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,197 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Content.Server.Database.Migrations.Sqlite
{
/// <inheritdoc />
public partial class WLfixedUpstram_1 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
//Duplicate column
//migrationBuilder.AddColumn<int>(
// name: "height",
// table: "profile",
// type: "INTEGER",
// nullable: false,
// defaultValue: 0);
//Duplicate column
//migrationBuilder.AddColumn<string>(
// name: "ooc_text",
// table: "profile",
// type: "TEXT",
// nullable: false,
// defaultValue: "");
//Duplicate column
//migrationBuilder.AddColumn<string>(
// name: "voice",
// table: "profile",
// type: "TEXT",
// nullable: false,
// defaultValue: "");
//Duplicate column
//migrationBuilder.AddColumn<bool>(
// name: "deadminned",
// table: "admin",
// type: "INTEGER",
// nullable: false,
// defaultValue: false);
//Duplicate column
//migrationBuilder.AddColumn<bool>(
// name: "suspended",
// table: "admin",
// type: "INTEGER",
// nullable: false,
// defaultValue: false);
//migrationBuilder.CreateTable(
// name: "discord_connections",
// columns: table => new
// {
// discord_connections_id = table.Column<int>(type: "INTEGER", nullable: false)
// .Annotation("Sqlite:Autoincrement", true),
// discord_id = table.Column<string>(type: "TEXT", nullable: false),
// user_guid = table.Column<Guid>(type: "TEXT", nullable: false)
// },
// constraints: table =>
// {
// table.PrimaryKey("PK_discord_connections", x => x.discord_connections_id);
// });
//migrationBuilder.CreateTable(
// name: "ipintel_cache",
// columns: table => new
// {
// ipintel_cache_id = table.Column<int>(type: "INTEGER", nullable: false)
// .Annotation("Sqlite:Autoincrement", true),
// address = table.Column<string>(type: "TEXT", nullable: false),
// time = table.Column<DateTime>(type: "TEXT", nullable: false),
// score = table.Column<float>(type: "REAL", nullable: false)
// },
// constraints: table =>
// {
// table.PrimaryKey("PK_ipintel_cache", x => x.ipintel_cache_id);
// });
//migrationBuilder.CreateTable(
// name: "job_subname",
// columns: table => new
// {
// job_subname_id = table.Column<int>(type: "INTEGER", nullable: false)
// .Annotation("Sqlite:Autoincrement", true),
// profile_id = table.Column<int>(type: "INTEGER", nullable: false),
// job_name = table.Column<string>(type: "TEXT", nullable: false),
// subname = table.Column<string>(type: "TEXT", nullable: false)
// },
// constraints: table =>
// {
// table.PrimaryKey("PK_job_subname", x => x.job_subname_id);
// table.ForeignKey(
// name: "FK_job_subname_profile_profile_id",
// column: x => x.profile_id,
// principalTable: "profile",
// principalColumn: "profile_id",
// onDelete: ReferentialAction.Cascade);
// });
//migrationBuilder.CreateTable(
// name: "job_unblocking",
// columns: table => new
// {
// job_unblocking_id = table.Column<int>(type: "INTEGER", nullable: false)
// .Annotation("Sqlite:Autoincrement", true),
// profile_id = table.Column<int>(type: "INTEGER", nullable: false),
// job_name = table.Column<string>(type: "TEXT", nullable: false),
// force_unblocked = table.Column<bool>(type: "INTEGER", nullable: false)
// },
// constraints: table =>
// {
// table.PrimaryKey("PK_job_unblocking", x => x.job_unblocking_id);
// table.ForeignKey(
// name: "FK_job_unblocking_profile_profile_id",
// column: x => x.profile_id,
// principalTable: "profile",
// principalColumn: "profile_id",
// onDelete: ReferentialAction.Cascade);
// });
//migrationBuilder.CreateIndex(
// name: "IX_discord_connections_discord_id",
// table: "discord_connections",
// column: "discord_id",
// unique: true);
//migrationBuilder.CreateIndex(
// name: "IX_discord_connections_user_guid",
// table: "discord_connections",
// column: "user_guid",
// unique: true);
//migrationBuilder.CreateIndex(
// name: "IX_ipintel_cache_address",
// table: "ipintel_cache",
// column: "address",
// unique: true);
//migrationBuilder.CreateIndex(
// name: "IX_job_subname_profile_id_job_name",
// table: "job_subname",
// columns: new[] { "profile_id", "job_name" },
// unique: true);
//migrationBuilder.CreateIndex(
// name: "IX_job_unblocking_profile_id_job_name",
// table: "job_unblocking",
// columns: new[] { "profile_id", "job_name" },
// unique: true);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
//migrationBuilder.DropTable(
// name: "discord_connections");
//migrationBuilder.DropTable(
// name: "ipintel_cache");
//migrationBuilder.DropTable(
// name: "job_subname");
//migrationBuilder.DropTable(
// name: "job_unblocking");
//Duplicate column
//migrationBuilder.DropColumn(
// name: "height",
// table: "profile");
//Duplicate column
//migrationBuilder.DropColumn(
// name: "ooc_text",
// table: "profile");
//Duplicate column
//migrationBuilder.DropColumn(
// name: "voice",
// table: "profile");
//Duplicate column
//migrationBuilder.DropColumn(
// name: "deadminned",
// table: "admin");
//Duplicate column
//migrationBuilder.DropColumn(
// name: "suspended",
// table: "admin");
}
}
}

View File

@@ -28,6 +28,14 @@ namespace Content.Server.Database.Migrations.Sqlite
.HasColumnType("INTEGER")
.HasColumnName("admin_rank_id");
b.Property<bool>("Deadminned")
.HasColumnType("INTEGER")
.HasColumnName("deadminned");
b.Property<bool>("Suspended")
.HasColumnType("INTEGER")
.HasColumnName("suspended");
b.Property<string>("Title")
.HasColumnType("TEXT")
.HasColumnName("title");
@@ -591,6 +599,63 @@ namespace Content.Server.Database.Migrations.Sqlite
b.ToTable("connection_log", (string)null);
});
modelBuilder.Entity("Content.Server.Database.DiscordConnection", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER")
.HasColumnName("discord_connections_id");
b.Property<string>("DiscordId")
.IsRequired()
.HasColumnType("TEXT")
.HasColumnName("discord_id");
b.Property<Guid>("UserGuid")
.HasColumnType("TEXT")
.HasColumnName("user_guid");
b.HasKey("Id")
.HasName("PK_discord_connections");
b.HasIndex("DiscordId")
.IsUnique();
b.HasIndex("UserGuid")
.IsUnique();
b.ToTable("discord_connections", (string)null);
});
modelBuilder.Entity("Content.Server.Database.IPIntelCache", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER")
.HasColumnName("ipintel_cache_id");
b.Property<string>("Address")
.IsRequired()
.HasColumnType("TEXT")
.HasColumnName("address");
b.Property<float>("Score")
.HasColumnType("REAL")
.HasColumnName("score");
b.Property<DateTime>("Time")
.HasColumnType("TEXT")
.HasColumnName("time");
b.HasKey("Id")
.HasName("PK_ipintel_cache");
b.HasIndex("Address")
.IsUnique();
b.ToTable("ipintel_cache", (string)null);
});
modelBuilder.Entity("Content.Server.Database.Job", b =>
{
b.Property<int>("Id")
@@ -626,6 +691,65 @@ namespace Content.Server.Database.Migrations.Sqlite
b.ToTable("job", (string)null);
});
modelBuilder.Entity("Content.Server.Database.JobSubname", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER")
.HasColumnName("job_subname_id");
b.Property<string>("JobName")
.IsRequired()
.HasColumnType("TEXT")
.HasColumnName("job_name");
b.Property<int>("ProfileId")
.HasColumnType("INTEGER")
.HasColumnName("profile_id");
b.Property<string>("Subname")
.IsRequired()
.HasColumnType("TEXT")
.HasColumnName("subname");
b.HasKey("Id")
.HasName("PK_job_subname");
b.HasIndex("ProfileId", "JobName")
.IsUnique();
b.ToTable("job_subname", (string)null);
});
modelBuilder.Entity("Content.Server.Database.JobUnblocking", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER")
.HasColumnName("job_unblocking_id");
b.Property<bool>("ForceUnblocked")
.HasColumnType("INTEGER")
.HasColumnName("force_unblocked");
b.Property<string>("JobName")
.IsRequired()
.HasColumnType("TEXT")
.HasColumnName("job_name");
b.Property<int>("ProfileId")
.HasColumnType("INTEGER")
.HasColumnName("profile_id");
b.HasKey("Id")
.HasName("PK_job_unblocking");
b.HasIndex("ProfileId", "JobName")
.IsUnique();
b.ToTable("job_unblocking", (string)null);
});
modelBuilder.Entity("Content.Server.Database.PlayTime", b =>
{
b.Property<int>("Id")
@@ -782,10 +906,19 @@ namespace Content.Server.Database.Migrations.Sqlite
.HasColumnType("TEXT")
.HasColumnName("hair_name");
b.Property<int>("Height")
.HasColumnType("INTEGER")
.HasColumnName("height");
b.Property<byte[]>("Markings")
.HasColumnType("jsonb")
.HasColumnName("markings");
b.Property<string>("OocText")
.IsRequired()
.HasColumnType("TEXT")
.HasColumnName("ooc_text");
b.Property<int>("PreferenceId")
.HasColumnType("INTEGER")
.HasColumnName("preference_id");
@@ -817,6 +950,11 @@ namespace Content.Server.Database.Migrations.Sqlite
.HasColumnType("TEXT")
.HasColumnName("species");
b.Property<string>("Voice")
.IsRequired()
.HasColumnType("TEXT")
.HasColumnName("voice");
b.HasKey("Id")
.HasName("PK_profile");
@@ -1547,7 +1685,7 @@ namespace Content.Server.Database.Migrations.Sqlite
.IsRequired()
.HasConstraintName("FK_connection_log_server_server_id");
b.OwnsOne("Content.Server.Database.ConnectionLog.HWId#Content.Server.Database.TypedHwid", "HWId", b1 =>
b.OwnsOne("Content.Server.Database.TypedHwid", "HWId", b1 =>
{
b1.Property<int>("ConnectionLogId")
.HasColumnType("INTEGER")
@@ -1566,7 +1704,7 @@ namespace Content.Server.Database.Migrations.Sqlite
b1.HasKey("ConnectionLogId");
b1.ToTable("connection_log", (string)null);
b1.ToTable("connection_log");
b1.WithOwner()
.HasForeignKey("ConnectionLogId")
@@ -1590,9 +1728,33 @@ namespace Content.Server.Database.Migrations.Sqlite
b.Navigation("Profile");
});
modelBuilder.Entity("Content.Server.Database.JobSubname", b =>
{
b.HasOne("Content.Server.Database.Profile", "Profile")
.WithMany("JobSubnames")
.HasForeignKey("ProfileId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired()
.HasConstraintName("FK_job_subname_profile_profile_id");
b.Navigation("Profile");
});
modelBuilder.Entity("Content.Server.Database.JobUnblocking", b =>
{
b.HasOne("Content.Server.Database.Profile", "Profile")
.WithMany("JobUnblockings")
.HasForeignKey("ProfileId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired()
.HasConstraintName("FK_job_unblocking_profile_profile_id");
b.Navigation("Profile");
});
modelBuilder.Entity("Content.Server.Database.Player", b =>
{
b.OwnsOne("Content.Server.Database.Player.LastSeenHWId#Content.Server.Database.TypedHwid", "LastSeenHWId", b1 =>
b.OwnsOne("Content.Server.Database.TypedHwid", "LastSeenHWId", b1 =>
{
b1.Property<int>("PlayerId")
.HasColumnType("INTEGER")
@@ -1611,7 +1773,7 @@ namespace Content.Server.Database.Migrations.Sqlite
b1.HasKey("PlayerId");
b1.ToTable("player", (string)null);
b1.ToTable("player");
b1.WithOwner()
.HasForeignKey("PlayerId")
@@ -1715,7 +1877,7 @@ namespace Content.Server.Database.Migrations.Sqlite
.HasForeignKey("RoundId")
.HasConstraintName("FK_server_ban_round_round_id");
b.OwnsOne("Content.Server.Database.ServerBan.HWId#Content.Server.Database.TypedHwid", "HWId", b1 =>
b.OwnsOne("Content.Server.Database.TypedHwid", "HWId", b1 =>
{
b1.Property<int>("ServerBanId")
.HasColumnType("INTEGER")
@@ -1734,7 +1896,7 @@ namespace Content.Server.Database.Migrations.Sqlite
b1.HasKey("ServerBanId");
b1.ToTable("server_ban", (string)null);
b1.ToTable("server_ban");
b1.WithOwner()
.HasForeignKey("ServerBanId")
@@ -1792,7 +1954,7 @@ namespace Content.Server.Database.Migrations.Sqlite
.HasForeignKey("RoundId")
.HasConstraintName("FK_server_role_ban_round_round_id");
b.OwnsOne("Content.Server.Database.ServerRoleBan.HWId#Content.Server.Database.TypedHwid", "HWId", b1 =>
b.OwnsOne("Content.Server.Database.TypedHwid", "HWId", b1 =>
{
b1.Property<int>("ServerRoleBanId")
.HasColumnType("INTEGER")
@@ -1811,7 +1973,7 @@ namespace Content.Server.Database.Migrations.Sqlite
b1.HasKey("ServerRoleBanId");
b1.ToTable("server_role_ban", (string)null);
b1.ToTable("server_role_ban");
b1.WithOwner()
.HasForeignKey("ServerRoleBanId")
@@ -1950,6 +2112,10 @@ namespace Content.Server.Database.Migrations.Sqlite
{
b.Navigation("Antags");
b.Navigation("JobSubnames");
b.Navigation("JobUnblockings");
b.Navigation("Jobs");
b.Navigation("Loadouts");