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
| using System;
| using Microsoft.EntityFrameworkCore.Migrations;
|
| #nullable disable
|
| namespace FlexJobApi.Database.Migrations.Migrations
| {
| /// <inheritdoc />
| public partial class UpdateUser0805 : Migration
| {
| /// <inheritdoc />
| protected override void Up(MigrationBuilder migrationBuilder)
| {
| migrationBuilder.AddColumn<string>(
| name: "Remark",
| table: "UserInfo",
| type: "nvarchar(max)",
| nullable: true,
| comment: "备注");
|
| migrationBuilder.AddColumn<int>(
| name: "Status",
| table: "UserInfo",
| type: "int",
| nullable: false,
| defaultValue: 0,
| comment: "状态");
|
| migrationBuilder.AlterColumn<string>(
| name: "Remark",
| table: "Role",
| type: "nvarchar(max)",
| nullable: true,
| comment: "备注",
| oldClrType: typeof(string),
| oldType: "nvarchar(max)",
| oldNullable: true);
|
| migrationBuilder.AlterColumn<int>(
| name: "DataPower",
| table: "Role",
| type: "int",
| nullable: false,
| comment: "数据权限",
| oldClrType: typeof(int),
| oldType: "int");
|
| migrationBuilder.UpdateData(
| table: "UserInfo",
| keyColumn: "Id",
| keyValue: new Guid("11111111-1111-1111-1111-111111111112"),
| columns: new[] { "Remark", "Status" },
| values: new object[] { null, 0 });
| }
|
| /// <inheritdoc />
| protected override void Down(MigrationBuilder migrationBuilder)
| {
| migrationBuilder.DropColumn(
| name: "Remark",
| table: "UserInfo");
|
| migrationBuilder.DropColumn(
| name: "Status",
| table: "UserInfo");
|
| migrationBuilder.AlterColumn<string>(
| name: "Remark",
| table: "Role",
| type: "nvarchar(max)",
| nullable: true,
| oldClrType: typeof(string),
| oldType: "nvarchar(max)",
| oldNullable: true,
| oldComment: "备注");
|
| migrationBuilder.AlterColumn<int>(
| name: "DataPower",
| table: "Role",
| type: "int",
| nullable: false,
| oldClrType: typeof(int),
| oldType: "int",
| oldComment: "数据权限");
| }
| }
| }
|
|