using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace RazorPagesMovie.Migrations
{
///
public partial class ChangeAdminUserAndContactMessageIdToGuid : Migration
{
///
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropPrimaryKey(
name: "PK_ContactMessage",
table: "ContactMessage");
migrationBuilder.DropColumn(
name: "Id",
table: "ContactMessage");
migrationBuilder.AddColumn(
name: "Id",
table: "ContactMessage",
type: "uniqueidentifier",
nullable: false,
defaultValueSql: "NEWID()");
migrationBuilder.AddPrimaryKey(
name: "PK_ContactMessage",
table: "ContactMessage",
column: "Id");
migrationBuilder.DropPrimaryKey(
name: "PK_AdminUser",
table: "AdminUser");
migrationBuilder.DropColumn(
name: "Id",
table: "AdminUser");
migrationBuilder.AddColumn(
name: "Id",
table: "AdminUser",
type: "uniqueidentifier",
nullable: false,
defaultValueSql: "NEWID()");
migrationBuilder.AddPrimaryKey(
name: "PK_AdminUser",
table: "AdminUser",
column: "Id");
}
///
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropPrimaryKey(
name: "PK_ContactMessage",
table: "ContactMessage");
migrationBuilder.DropColumn(
name: "Id",
table: "ContactMessage");
migrationBuilder.AddColumn(
name: "Id",
table: "ContactMessage",
type: "int",
nullable: false)
.Annotation("SqlServer:Identity", "1, 1");
migrationBuilder.AddPrimaryKey(
name: "PK_ContactMessage",
table: "ContactMessage",
column: "Id");
migrationBuilder.DropPrimaryKey(
name: "PK_AdminUser",
table: "AdminUser");
migrationBuilder.DropColumn(
name: "Id",
table: "AdminUser");
migrationBuilder.AddColumn(
name: "Id",
table: "AdminUser",
type: "int",
nullable: false)
.Annotation("SqlServer:Identity", "1, 1");
migrationBuilder.AddPrimaryKey(
name: "PK_AdminUser",
table: "AdminUser",
column: "Id");
}
}
}