1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace IOL.GreatOffice.Api.Migrations
{
public partial class UpdatedForgotPasswordRequests : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "fk_forgot_password_requests_users_user_id",
table: "forgot_password_requests");
migrationBuilder.AlterColumn<Guid>(
name: "user_id",
table: "forgot_password_requests",
type: "uuid",
nullable: false,
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"),
oldClrType: typeof(Guid),
oldType: "uuid",
oldNullable: true);
migrationBuilder.AddForeignKey(
name: "fk_forgot_password_requests_users_user_id",
table: "forgot_password_requests",
column: "user_id",
principalTable: "users",
principalColumn: "id",
onDelete: ReferentialAction.Cascade);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "fk_forgot_password_requests_users_user_id",
table: "forgot_password_requests");
migrationBuilder.AlterColumn<Guid>(
name: "user_id",
table: "forgot_password_requests",
type: "uuid",
nullable: true,
oldClrType: typeof(Guid),
oldType: "uuid");
migrationBuilder.AddForeignKey(
name: "fk_forgot_password_requests_users_user_id",
table: "forgot_password_requests",
column: "user_id",
principalTable: "users",
principalColumn: "id");
}
}
}
|