forked from Raphael/SCHALE.GameServer
116 lines
3.5 KiB
C#
116 lines
3.5 KiB
C#
using System;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace SCHALE.Common.Migrations.SqlServerMigrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class BIGUPDATE : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropColumn(
|
|
name: "IsLocked",
|
|
table: "Weapons");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "IsLocked",
|
|
table: "Items");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "IsLocked",
|
|
table: "Equipment");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "IsLocked",
|
|
table: "Characters");
|
|
|
|
migrationBuilder.AlterColumn<long>(
|
|
name: "RepresentCharacterServerId",
|
|
table: "Accounts",
|
|
type: "bigint",
|
|
nullable: false,
|
|
oldClrType: typeof(int),
|
|
oldType: "int");
|
|
|
|
migrationBuilder.AlterColumn<int>(
|
|
name: "LobbyMode",
|
|
table: "Accounts",
|
|
type: "int",
|
|
nullable: true,
|
|
oldClrType: typeof(int),
|
|
oldType: "int");
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "BirthDay",
|
|
table: "Accounts",
|
|
type: "datetime2",
|
|
nullable: false,
|
|
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "datetime2",
|
|
oldNullable: true);
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AddColumn<bool>(
|
|
name: "IsLocked",
|
|
table: "Weapons",
|
|
type: "bit",
|
|
nullable: false,
|
|
defaultValue: false);
|
|
|
|
migrationBuilder.AddColumn<bool>(
|
|
name: "IsLocked",
|
|
table: "Items",
|
|
type: "bit",
|
|
nullable: false,
|
|
defaultValue: false);
|
|
|
|
migrationBuilder.AddColumn<bool>(
|
|
name: "IsLocked",
|
|
table: "Equipment",
|
|
type: "bit",
|
|
nullable: false,
|
|
defaultValue: false);
|
|
|
|
migrationBuilder.AddColumn<bool>(
|
|
name: "IsLocked",
|
|
table: "Characters",
|
|
type: "bit",
|
|
nullable: false,
|
|
defaultValue: false);
|
|
|
|
migrationBuilder.AlterColumn<int>(
|
|
name: "RepresentCharacterServerId",
|
|
table: "Accounts",
|
|
type: "int",
|
|
nullable: false,
|
|
oldClrType: typeof(long),
|
|
oldType: "bigint");
|
|
|
|
migrationBuilder.AlterColumn<int>(
|
|
name: "LobbyMode",
|
|
table: "Accounts",
|
|
type: "int",
|
|
nullable: false,
|
|
defaultValue: 0,
|
|
oldClrType: typeof(int),
|
|
oldType: "int",
|
|
oldNullable: true);
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "BirthDay",
|
|
table: "Accounts",
|
|
type: "datetime2",
|
|
nullable: true,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "datetime2");
|
|
}
|
|
}
|
|
}
|