source: resTools_backend/backend/Migrations/20220808143757_Auth-changes-nullable.cs

Last change on this file was a26f6a1, checked in by Danilo <danilo.najkov@…>, 2 years ago

full auth flow

  • Property mode set to 100644
File size: 3.0 KB
Line 
1using System;
2using Microsoft.EntityFrameworkCore.Migrations;
3
4#nullable disable
5
6namespace backend.Migrations
7{
8 public partial class Authchangesnullable : Migration
9 {
10 protected override void Up(MigrationBuilder migrationBuilder)
11 {
12 migrationBuilder.AlterColumn<DateTime>(
13 name: "PasswordResetValidTo",
14 table: "Users",
15 type: "timestamp with time zone",
16 nullable: true,
17 oldClrType: typeof(DateTime),
18 oldType: "timestamp with time zone");
19
20 migrationBuilder.AlterColumn<string>(
21 name: "PasswordResetURL",
22 table: "Users",
23 type: "text",
24 nullable: true,
25 oldClrType: typeof(string),
26 oldType: "text");
27
28 migrationBuilder.AlterColumn<DateTime>(
29 name: "ConfirmationValidTo",
30 table: "Users",
31 type: "timestamp with time zone",
32 nullable: true,
33 oldClrType: typeof(DateTime),
34 oldType: "timestamp with time zone");
35
36 migrationBuilder.AlterColumn<string>(
37 name: "ConfirmationURL",
38 table: "Users",
39 type: "text",
40 nullable: true,
41 oldClrType: typeof(string),
42 oldType: "text");
43 }
44
45 protected override void Down(MigrationBuilder migrationBuilder)
46 {
47 migrationBuilder.AlterColumn<DateTime>(
48 name: "PasswordResetValidTo",
49 table: "Users",
50 type: "timestamp with time zone",
51 nullable: false,
52 defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
53 oldClrType: typeof(DateTime),
54 oldType: "timestamp with time zone",
55 oldNullable: true);
56
57 migrationBuilder.AlterColumn<string>(
58 name: "PasswordResetURL",
59 table: "Users",
60 type: "text",
61 nullable: false,
62 defaultValue: "",
63 oldClrType: typeof(string),
64 oldType: "text",
65 oldNullable: true);
66
67 migrationBuilder.AlterColumn<DateTime>(
68 name: "ConfirmationValidTo",
69 table: "Users",
70 type: "timestamp with time zone",
71 nullable: false,
72 defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
73 oldClrType: typeof(DateTime),
74 oldType: "timestamp with time zone",
75 oldNullable: true);
76
77 migrationBuilder.AlterColumn<string>(
78 name: "ConfirmationURL",
79 table: "Users",
80 type: "text",
81 nullable: false,
82 defaultValue: "",
83 oldClrType: typeof(string),
84 oldType: "text",
85 oldNullable: true);
86 }
87 }
88}
Note: See TracBrowser for help on using the repository browser.