mirror of
https://github.com/DorkSquadRR/DorkNet.git
synced 2026-10-27 16:08:47 -07:00
d471b418b9
Targets Rec Room 2020.03.10 client (also serves 2020.03.06).
Re-import after adding:
- DorkNet.ClientMod/dorknet-clientmod.json.template — config schema
the launcher's manifest-driven patcher renders into UserData/.
- tools/build-patcher-zip.ps1 — produces dorknet-clientpatch-{key}.zip
for v1-march-* Release uploads.
- .github/workflows/release.yml — on tag push publishes both
dorknet-server-march_2020_03_10-win-x64.zip and
dorknet-clientpatch-march_2020_03_10.zip as Release assets.
Same scrub rules as december; tools/build-patcher-zip.ps1 added to
the maintainer-side allow-list so it survives.
85 lines
3.4 KiB
C#
85 lines
3.4 KiB
C#
using System;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace DorkNet.Server.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class Phase9ReportsAndIpBans : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.CreateTable(
|
|
name: "IpBans",
|
|
columns: table => new
|
|
{
|
|
Id = table.Column<long>(type: "INTEGER", nullable: false)
|
|
.Annotation("Sqlite:Autoincrement", true),
|
|
Cidr = table.Column<string>(type: "TEXT", maxLength: 64, nullable: false),
|
|
Reason = table.Column<string>(type: "TEXT", maxLength: 512, nullable: false),
|
|
BannedByAdminId = table.Column<long>(type: "INTEGER", nullable: false),
|
|
BannedAt = table.Column<DateTime>(type: "TEXT", nullable: false),
|
|
Until = table.Column<DateTime>(type: "TEXT", nullable: true)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_IpBans", x => x.Id);
|
|
});
|
|
|
|
migrationBuilder.CreateTable(
|
|
name: "Reports",
|
|
columns: table => new
|
|
{
|
|
Id = table.Column<long>(type: "INTEGER", nullable: false)
|
|
.Annotation("Sqlite:Autoincrement", true),
|
|
ReporterPlayerId = table.Column<long>(type: "INTEGER", nullable: false),
|
|
TargetPlayerId = table.Column<long>(type: "INTEGER", nullable: false),
|
|
Category = table.Column<int>(type: "INTEGER", nullable: false),
|
|
Message = table.Column<string>(type: "TEXT", maxLength: 1000, nullable: false),
|
|
GameSessionId = table.Column<long>(type: "INTEGER", nullable: false),
|
|
RoomId = table.Column<long>(type: "INTEGER", nullable: false),
|
|
CreatedAt = table.Column<DateTime>(type: "TEXT", nullable: false),
|
|
ResolvedAt = table.Column<DateTime>(type: "TEXT", nullable: true),
|
|
ResolverAdminId = table.Column<long>(type: "INTEGER", nullable: true),
|
|
ResolutionNote = table.Column<string>(type: "TEXT", maxLength: 512, nullable: false)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_Reports", x => x.Id);
|
|
});
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_IpBans_Cidr",
|
|
table: "IpBans",
|
|
column: "Cidr");
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_Reports_ReporterPlayerId",
|
|
table: "Reports",
|
|
column: "ReporterPlayerId");
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_Reports_ResolvedAt",
|
|
table: "Reports",
|
|
column: "ResolvedAt");
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_Reports_TargetPlayerId",
|
|
table: "Reports",
|
|
column: "TargetPlayerId");
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropTable(
|
|
name: "IpBans");
|
|
|
|
migrationBuilder.DropTable(
|
|
name: "Reports");
|
|
}
|
|
}
|
|
}
|