mirror of
https://github.com/whoswhip/Sharpbin.git
synced 2026-12-06 02:48:43 +00:00
52 lines
1.4 KiB
C#
52 lines
1.4 KiB
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace SharpbinV3.Server.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class UserUIDNonUnique : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropIndex(name: "IX_Users_UID", table: "Users");
|
|
|
|
migrationBuilder.AlterColumn<int>(
|
|
name: "UID",
|
|
table: "Users",
|
|
type: "INTEGER",
|
|
nullable: true,
|
|
oldClrType: typeof(int),
|
|
oldType: "INTEGER"
|
|
);
|
|
|
|
migrationBuilder.CreateIndex(name: "IX_Users_UID", table: "Users", column: "UID");
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropIndex(name: "IX_Users_UID", table: "Users");
|
|
|
|
migrationBuilder.AlterColumn<int>(
|
|
name: "UID",
|
|
table: "Users",
|
|
type: "INTEGER",
|
|
nullable: false,
|
|
defaultValue: 0,
|
|
oldClrType: typeof(int),
|
|
oldType: "INTEGER",
|
|
oldNullable: true
|
|
);
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_Users_UID",
|
|
table: "Users",
|
|
column: "UID",
|
|
unique: true
|
|
);
|
|
}
|
|
}
|
|
}
|