sunpengfei
2025-08-20 327d52a5d0e51ac5e6e1aced3599a18dcfaf25b6
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
using System;
using Microsoft.EntityFrameworkCore.Migrations;
 
#nullable disable
 
namespace FlexJobApi.Database.Migrations.Migrations
{
    /// <inheritdoc />
    public partial class UpdateUser0820 : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "ElectronSignUserId",
                table: "User");
 
            migrationBuilder.DropColumn(
                name: "RealAccess",
                table: "User");
 
            migrationBuilder.DropColumn(
                name: "Controller",
                table: "Resource");
 
            migrationBuilder.DropColumn(
                name: "Service",
                table: "Resource");
 
            migrationBuilder.AddColumn<int>(
                name: "Age",
                table: "UserAuth",
                type: "int",
                nullable: true);
 
            migrationBuilder.AddColumn<DateTime>(
                name: "Birthday",
                table: "UserAuth",
                type: "datetime2",
                nullable: true);
 
            migrationBuilder.AddColumn<Guid>(
                name: "ElectronSignUserId",
                table: "UserAuth",
                type: "uniqueidentifier",
                nullable: true);
 
            migrationBuilder.AddColumn<string>(
                name: "FaceRealUrl",
                table: "UserAuth",
                type: "nvarchar(max)",
                nullable: true);
 
            migrationBuilder.AddColumn<int>(
                name: "Gender",
                table: "UserAuth",
                type: "int",
                nullable: true);
 
            migrationBuilder.AddColumn<int>(
                name: "RealAccess",
                table: "UserAuth",
                type: "int",
                nullable: true);
 
            migrationBuilder.AddColumn<string>(
                name: "RealFailMessage",
                table: "UserAuth",
                type: "nvarchar(max)",
                nullable: true);
 
            migrationBuilder.AddColumn<int>(
                name: "RealStatus",
                table: "UserAuth",
                type: "int",
                nullable: false,
                defaultValue: 0);
 
            migrationBuilder.AddColumn<string>(
                name: "ControllerName",
                table: "Resource",
                type: "nvarchar(max)",
                nullable: true);
        }
 
        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "Age",
                table: "UserAuth");
 
            migrationBuilder.DropColumn(
                name: "Birthday",
                table: "UserAuth");
 
            migrationBuilder.DropColumn(
                name: "ElectronSignUserId",
                table: "UserAuth");
 
            migrationBuilder.DropColumn(
                name: "FaceRealUrl",
                table: "UserAuth");
 
            migrationBuilder.DropColumn(
                name: "Gender",
                table: "UserAuth");
 
            migrationBuilder.DropColumn(
                name: "RealAccess",
                table: "UserAuth");
 
            migrationBuilder.DropColumn(
                name: "RealFailMessage",
                table: "UserAuth");
 
            migrationBuilder.DropColumn(
                name: "RealStatus",
                table: "UserAuth");
 
            migrationBuilder.DropColumn(
                name: "ControllerName",
                table: "Resource");
 
            migrationBuilder.AddColumn<Guid>(
                name: "ElectronSignUserId",
                table: "User",
                type: "uniqueidentifier",
                nullable: true);
 
            migrationBuilder.AddColumn<int>(
                name: "RealAccess",
                table: "User",
                type: "int",
                nullable: true);
 
            migrationBuilder.AddColumn<int>(
                name: "Controller",
                table: "Resource",
                type: "int",
                nullable: false,
                defaultValue: 0);
 
            migrationBuilder.AddColumn<int>(
                name: "Service",
                table: "Resource",
                type: "int",
                nullable: false,
                defaultValue: 0);
 
            migrationBuilder.UpdateData(
                table: "User",
                keyColumn: "Id",
                keyValue: new Guid("11111111-1111-1111-1111-111111111111"),
                columns: new[] { "ElectronSignUserId", "RealAccess" },
                values: new object[] { null, null });
        }
    }
}