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
| using Microsoft.EntityFrameworkCore.Migrations;
|
| #nullable disable
|
| namespace FlexJobApi.Database.Migrations.Migrations
| {
| /// <inheritdoc />
| public partial class UpdateResource : Migration
| {
| /// <inheritdoc />
| protected override void Up(MigrationBuilder migrationBuilder)
| {
| migrationBuilder.DropColumn(
| name: "Service",
| table: "Resource");
|
| migrationBuilder.AddColumn<string>(
| name: "ActionName",
| table: "Resource",
| type: "nvarchar(max)",
| nullable: false,
| defaultValue: "",
| comment: "委托名称");
|
| migrationBuilder.AddColumn<int>(
| name: "Controller",
| table: "Resource",
| type: "int",
| nullable: false,
| defaultValue: 0,
| comment: "控制器");
|
| migrationBuilder.AddColumn<string>(
| name: "RequestTypeFullName",
| table: "Resource",
| type: "nvarchar(max)",
| nullable: false,
| defaultValue: "",
| comment: "请求类型全名");
|
| migrationBuilder.AddColumn<string>(
| name: "ResponseTypeFullName",
| table: "Resource",
| type: "nvarchar(max)",
| nullable: false,
| defaultValue: "",
| comment: "响应类型全名");
| }
|
| /// <inheritdoc />
| protected override void Down(MigrationBuilder migrationBuilder)
| {
| migrationBuilder.DropColumn(
| name: "ActionName",
| table: "Resource");
|
| migrationBuilder.DropColumn(
| name: "Controller",
| table: "Resource");
|
| migrationBuilder.DropColumn(
| name: "RequestTypeFullName",
| table: "Resource");
|
| migrationBuilder.DropColumn(
| name: "ResponseTypeFullName",
| table: "Resource");
|
| migrationBuilder.AddColumn<string>(
| name: "Service",
| table: "Resource",
| type: "nvarchar(max)",
| nullable: false,
| defaultValue: "",
| comment: "微服务");
| }
| }
| }
|
|