forked from space-wizards/space-station-14
-
Notifications
You must be signed in to change notification settings - Fork 155
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Менеджер для привязки игрового профиля к дискорду (#2)
- Loading branch information
1 parent
ad74165
commit 3578a90
Showing
13 changed files
with
3,129 additions
and
6 deletions.
There are no files selected for viewing
1,413 changes: 1,413 additions & 0 deletions
1,413
Content.Server.Database/Migrations/Postgres/20230512083253_DiscordLink.Designer.cs
Large diffs are not rendered by default.
Oops, something went wrong.
50 changes: 50 additions & 0 deletions
50
Content.Server.Database/Migrations/Postgres/20230512083253_DiscordLink.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,50 @@ | ||
using System; | ||
using Microsoft.EntityFrameworkCore.Migrations; | ||
|
||
#nullable disable | ||
|
||
namespace Content.Server.Database.Migrations.Postgres | ||
{ | ||
/// <inheritdoc /> | ||
public partial class DiscordLink : Migration | ||
{ | ||
/// <inheritdoc /> | ||
protected override void Up(MigrationBuilder migrationBuilder) | ||
{ | ||
migrationBuilder.CreateTable( | ||
name: "discord_players", | ||
columns: table => new | ||
{ | ||
discord_players_id = table.Column<Guid>(type: "uuid", nullable: false), | ||
ss14_id = table.Column<Guid>(type: "uuid", nullable: false), | ||
hash_key = table.Column<string>(type: "text", nullable: false), | ||
ckey = table.Column<string>(type: "text", nullable: false), | ||
discord_id = table.Column<string>(type: "text", nullable: true), | ||
discord_name = table.Column<string>(type: "text", nullable: true) | ||
}, | ||
constraints: table => | ||
{ | ||
table.PrimaryKey("PK_discord_players", x => x.discord_players_id); | ||
table.UniqueConstraint("ak_discord_players_ss14_id", x => x.ss14_id); | ||
}); | ||
|
||
migrationBuilder.CreateIndex( | ||
name: "IX_discord_players_ckey_discord_id", | ||
table: "discord_players", | ||
columns: new[] { "ckey", "discord_id" }); | ||
|
||
migrationBuilder.CreateIndex( | ||
name: "IX_discord_players_discord_players_id", | ||
table: "discord_players", | ||
column: "discord_players_id", | ||
unique: true); | ||
} | ||
|
||
/// <inheritdoc /> | ||
protected override void Down(MigrationBuilder migrationBuilder) | ||
{ | ||
migrationBuilder.DropTable( | ||
name: "discord_players"); | ||
} | ||
} | ||
} |
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.