forked from Simple-Station/Einstein-Engines
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
To help out admins, so they can easily fill out datacenter bans and stuff. Supports ban exemption flags and everything. This is for use with SS14.Admin so it's just DB models here. (cherry picked from commit 0c34eb6138b9f7d1698b546d1591096fc517d989)
- Loading branch information
Showing
8 changed files
with
4,081 additions
and
1 deletion.
There are no files selected for viewing
1,960 changes: 1,960 additions & 0 deletions
1,960
Content.Server.Database/Migrations/Postgres/20240623005121_BanTemplate.Designer.cs
Large diffs are not rendered by default.
Oops, something went wrong.
42 changes: 42 additions & 0 deletions
42
Content.Server.Database/Migrations/Postgres/20240623005121_BanTemplate.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
using System; | ||
using Microsoft.EntityFrameworkCore.Migrations; | ||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; | ||
|
||
#nullable disable | ||
|
||
namespace Content.Server.Database.Migrations.Postgres | ||
{ | ||
/// <inheritdoc /> | ||
public partial class BanTemplate : Migration | ||
{ | ||
/// <inheritdoc /> | ||
protected override void Up(MigrationBuilder migrationBuilder) | ||
{ | ||
migrationBuilder.CreateTable( | ||
name: "ban_template", | ||
columns: table => new | ||
{ | ||
ban_template_id = table.Column<int>(type: "integer", nullable: false) | ||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), | ||
title = table.Column<string>(type: "text", nullable: false), | ||
length = table.Column<TimeSpan>(type: "interval", nullable: false), | ||
reason = table.Column<string>(type: "text", nullable: false), | ||
exempt_flags = table.Column<int>(type: "integer", nullable: false), | ||
severity = table.Column<int>(type: "integer", nullable: false), | ||
auto_delete = table.Column<bool>(type: "boolean", nullable: false), | ||
hidden = table.Column<bool>(type: "boolean", nullable: false) | ||
}, | ||
constraints: table => | ||
{ | ||
table.PrimaryKey("PK_ban_template", x => x.ban_template_id); | ||
}); | ||
} | ||
|
||
/// <inheritdoc /> | ||
protected override void Down(MigrationBuilder migrationBuilder) | ||
{ | ||
migrationBuilder.DropTable( | ||
name: "ban_template"); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.