LANCommander/LANCommander.Server.Data.SQLite/Migrations/20241024033137_AddSaveFileSize.cs
2024-10-23 22:33:28 -05:00

65 lines
1.9 KiB
C#

using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace LANCommander.Migrations
{
/// <inheritdoc />
public partial class AddSaveFileSize : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropPrimaryKey(
name: "PK_UserRoles",
table: "UserRoles");
migrationBuilder.DropIndex(
name: "IX_UserRoles_UserId",
table: "UserRoles");
migrationBuilder.AddColumn<long>(
name: "Size",
table: "GameSaves",
type: "INTEGER",
nullable: false,
defaultValue: 0L);
migrationBuilder.AddPrimaryKey(
name: "PK_UserRoles",
table: "UserRoles",
columns: new[] { "UserId", "RoleId" });
migrationBuilder.CreateIndex(
name: "IX_UserRoles_RoleId",
table: "UserRoles",
column: "RoleId");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropPrimaryKey(
name: "PK_UserRoles",
table: "UserRoles");
migrationBuilder.DropIndex(
name: "IX_UserRoles_RoleId",
table: "UserRoles");
migrationBuilder.DropColumn(
name: "Size",
table: "GameSaves");
migrationBuilder.AddPrimaryKey(
name: "PK_UserRoles",
table: "UserRoles",
columns: new[] { "RoleId", "UserId" });
migrationBuilder.CreateIndex(
name: "IX_UserRoles_UserId",
table: "UserRoles",
column: "UserId");
}
}
}