mirror of
https://github.com/chylex/Minecraft-Phantom-Panel.git
synced 2025-08-16 12:31:43 +02:00
.config
.run
.workdir
Agent
Common
Controller
Phantom.Controller
Phantom.Controller.Database
Phantom.Controller.Database.Postgres
Migrations
20221007033307_Agents.Designer.cs
20221007033307_Agents.cs
20221007095438_Instances.Designer.cs
20221007095438_Instances.cs
20221008163849_Identity.Designer.cs
20221008163849_Identity.cs
20221010193220_InstanceJvmArguments.Designer.cs
20221010193220_InstanceJvmArguments.cs
20221016035515_AuditLog.Designer.cs
20221016035515_AuditLog.cs
20221018231328_AgentVersion.Designer.cs
20221018231328_AgentVersion.cs
20221021125232_Permissions.Designer.cs
20221021125232_Permissions.cs
20230213040522_AuditLogRename.Designer.cs
20230213040522_AuditLogRename.cs
20230215101444_EventLog.Designer.cs
20230215101444_EventLog.cs
20231008122637_ReplaceIdentity.Designer.cs
20231008122637_ReplaceIdentity.cs
20231008123315_ReplaceIdentity2.Designer.cs
20231008123315_ReplaceIdentity2.cs
20240407211636_UserAgentAccess.Designer.cs
20240407211636_UserAgentAccess.cs
ApplicationDbContextModelSnapshot.cs
ApplicationDbContextDesignFactory.cs
ApplicationDbContextFactory.cs
LazyDbContext.cs
Phantom.Controller.Database.Postgres.csproj
Phantom.Controller.Minecraft
Phantom.Controller.Services
Docker
Utils
Web
.dockerignore
.gitattributes
.gitignore
AddMigration.bat
AddMigration.sh
Directory.Build.props
Directory.Build.targets
Dockerfile
LICENSE
Packages.props
PhantomPanel.sln
README.md
global.json
93 lines
2.9 KiB
C#
93 lines
2.9 KiB
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace Phantom.Controller.Database.Postgres.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class AuditLogRename : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropForeignKey(
|
|
name: "FK_AuditEvents_Users_UserId",
|
|
schema: "system",
|
|
table: "AuditEvents");
|
|
|
|
migrationBuilder.DropPrimaryKey(
|
|
name: "PK_AuditEvents",
|
|
schema: "system",
|
|
table: "AuditEvents");
|
|
|
|
migrationBuilder.RenameTable(
|
|
name: "AuditEvents",
|
|
schema: "system",
|
|
newName: "AuditLog",
|
|
newSchema: "system");
|
|
|
|
migrationBuilder.RenameIndex(
|
|
name: "IX_AuditEvents_UserId",
|
|
schema: "system",
|
|
table: "AuditLog",
|
|
newName: "IX_AuditLog_UserId");
|
|
|
|
migrationBuilder.AddPrimaryKey(
|
|
name: "PK_AuditLog",
|
|
schema: "system",
|
|
table: "AuditLog",
|
|
column: "Id");
|
|
|
|
migrationBuilder.AddForeignKey(
|
|
name: "FK_AuditLog_Users_UserId",
|
|
schema: "system",
|
|
table: "AuditLog",
|
|
column: "UserId",
|
|
principalSchema: "identity",
|
|
principalTable: "Users",
|
|
principalColumn: "Id");
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropForeignKey(
|
|
name: "FK_AuditLog_Users_UserId",
|
|
schema: "system",
|
|
table: "AuditLog");
|
|
|
|
migrationBuilder.DropPrimaryKey(
|
|
name: "PK_AuditLog",
|
|
schema: "system",
|
|
table: "AuditLog");
|
|
|
|
migrationBuilder.RenameTable(
|
|
name: "AuditLog",
|
|
schema: "system",
|
|
newName: "AuditEvents",
|
|
newSchema: "system");
|
|
|
|
migrationBuilder.RenameIndex(
|
|
name: "IX_AuditLog_UserId",
|
|
schema: "system",
|
|
table: "AuditEvents",
|
|
newName: "IX_AuditEvents_UserId");
|
|
|
|
migrationBuilder.AddPrimaryKey(
|
|
name: "PK_AuditEvents",
|
|
schema: "system",
|
|
table: "AuditEvents",
|
|
column: "Id");
|
|
|
|
migrationBuilder.AddForeignKey(
|
|
name: "FK_AuditEvents_Users_UserId",
|
|
schema: "system",
|
|
table: "AuditEvents",
|
|
column: "UserId",
|
|
principalSchema: "identity",
|
|
principalTable: "Users",
|
|
principalColumn: "Id");
|
|
}
|
|
}
|
|
}
|