mirror of
https://github.com/alex289/CleanArchitecture.git
synced 2025-07-01 11:02:57 +00:00
60 lines
2.1 KiB
C#
60 lines
2.1 KiB
C#
using System;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace CleanArchitecture.Infrastructure.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class RenameUserNames : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DeleteData(
|
|
table: "Users",
|
|
keyColumn: "Id",
|
|
keyValue: new Guid("3fc7aacd-41cc-4ca2-b842-32edcd0782d5"));
|
|
|
|
migrationBuilder.RenameColumn(
|
|
name: "Surname",
|
|
table: "Users",
|
|
newName: "LastName");
|
|
|
|
migrationBuilder.RenameColumn(
|
|
name: "GivenName",
|
|
table: "Users",
|
|
newName: "FirstName");
|
|
|
|
migrationBuilder.InsertData(
|
|
table: "Users",
|
|
columns: new[] { "Id", "Deleted", "Email", "FirstName", "LastName", "Password", "Role" },
|
|
values: new object[] { new Guid("28fc3d91-6a15-448e-b0b5-0c91a3948961"), false, "admin@email.com", "Admin", "User", "$2a$12$Blal/uiFIJdYsCLTMUik/egLbfg3XhbnxBC6Sb5IKz2ZYhiU/MzL2", 0 });
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DeleteData(
|
|
table: "Users",
|
|
keyColumn: "Id",
|
|
keyValue: new Guid("28fc3d91-6a15-448e-b0b5-0c91a3948961"));
|
|
|
|
migrationBuilder.RenameColumn(
|
|
name: "LastName",
|
|
table: "Users",
|
|
newName: "Surname");
|
|
|
|
migrationBuilder.RenameColumn(
|
|
name: "FirstName",
|
|
table: "Users",
|
|
newName: "GivenName");
|
|
|
|
migrationBuilder.InsertData(
|
|
table: "Users",
|
|
columns: new[] { "Id", "Deleted", "Email", "GivenName", "Password", "Role", "Surname" },
|
|
values: new object[] { new Guid("3fc7aacd-41cc-4ca2-b842-32edcd0782d5"), false, "admin@email.com", "User", "$2a$12$Blal/uiFIJdYsCLTMUik/egLbfg3XhbnxBC6Sb5IKz2ZYhiU/MzL2", 0, "Admin" });
|
|
}
|
|
}
|
|
}
|