tgstation-server 6.12.0
The /tg/station 13 server suite
Loading...
Searching...
No Matches
20231108004402_PGRenameByondColumnsToEngine.cs
Go to the documentation of this file.
1using System;
2
3using Microsoft.EntityFrameworkCore.Migrations;
4
6{
9 {
11 protected override void Up(MigrationBuilder migrationBuilder)
12 {
13 ArgumentNullException.ThrowIfNull(migrationBuilder);
14
15 migrationBuilder.RenameColumn(
16 name: "ByondRights",
17 table: "InstancePermissionSets",
18 newName: "EngineRights");
19
20 migrationBuilder.RenameColumn(
21 name: "ByondVersion",
22 table: "CompileJobs",
23 newName: "EngineVersion");
24
25 migrationBuilder.AlterColumn<decimal>(
26 name: "InstanceManagerRights",
27 table: "PermissionSets",
28 type: "numeric(20,0)",
29 nullable: false,
30 oldClrType: typeof(decimal),
31 oldType: "numeric(20)");
32
33 migrationBuilder.AlterColumn<decimal>(
34 name: "AdministrationRights",
35 table: "PermissionSets",
36 type: "numeric(20,0)",
37 nullable: false,
38 oldClrType: typeof(decimal),
39 oldType: "numeric(20)");
40
41 migrationBuilder.AlterColumn<decimal>(
42 name: "CancelRightsType",
43 table: "Jobs",
44 type: "numeric(20,0)",
45 nullable: true,
46 oldClrType: typeof(decimal),
47 oldType: "numeric(20)",
48 oldNullable: true);
49
50 migrationBuilder.AlterColumn<decimal>(
51 name: "CancelRight",
52 table: "Jobs",
53 type: "numeric(20,0)",
54 nullable: true,
55 oldClrType: typeof(decimal),
56 oldType: "numeric(20)",
57 oldNullable: true);
58
59 migrationBuilder.AlterColumn<decimal>(
60 name: "RepositoryRights",
61 table: "InstancePermissionSets",
62 type: "numeric(20,0)",
63 nullable: false,
64 oldClrType: typeof(decimal),
65 oldType: "numeric(20)");
66
67 migrationBuilder.AlterColumn<decimal>(
68 name: "InstancePermissionSetRights",
69 table: "InstancePermissionSets",
70 type: "numeric(20,0)",
71 nullable: false,
72 oldClrType: typeof(decimal),
73 oldType: "numeric(20)");
74
75 migrationBuilder.AlterColumn<decimal>(
76 name: "DreamMakerRights",
77 table: "InstancePermissionSets",
78 type: "numeric(20,0)",
79 nullable: false,
80 oldClrType: typeof(decimal),
81 oldType: "numeric(20)");
82
83 migrationBuilder.AlterColumn<decimal>(
84 name: "DreamDaemonRights",
85 table: "InstancePermissionSets",
86 type: "numeric(20,0)",
87 nullable: false,
88 oldClrType: typeof(decimal),
89 oldType: "numeric(20)");
90
91 migrationBuilder.AlterColumn<decimal>(
92 name: "ConfigurationRights",
93 table: "InstancePermissionSets",
94 type: "numeric(20,0)",
95 nullable: false,
96 oldClrType: typeof(decimal),
97 oldType: "numeric(20)");
98
99 migrationBuilder.AlterColumn<decimal>(
100 name: "ChatBotRights",
101 table: "InstancePermissionSets",
102 type: "numeric(20,0)",
103 nullable: false,
104 oldClrType: typeof(decimal),
105 oldType: "numeric(20)");
106
107 migrationBuilder.AlterColumn<decimal>(
108 name: "EngineRights",
109 table: "InstancePermissionSets",
110 type: "numeric(20,0)",
111 nullable: false,
112 oldClrType: typeof(decimal),
113 oldType: "numeric(20)");
114
115 migrationBuilder.AlterColumn<decimal>(
116 name: "DiscordChannelId",
117 table: "ChatChannels",
118 type: "numeric(20,0)",
119 nullable: true,
120 oldClrType: typeof(decimal),
121 oldType: "numeric(20)",
122 oldNullable: true);
123 }
124
126 protected override void Down(MigrationBuilder migrationBuilder)
127 {
128 ArgumentNullException.ThrowIfNull(migrationBuilder);
129
130 migrationBuilder.RenameColumn(
131 name: "EngineRights",
132 table: "InstancePermissionSets",
133 newName: "ByondRights");
134
135 migrationBuilder.RenameColumn(
136 name: "EngineVersion",
137 table: "CompileJobs",
138 newName: "ByondVersion");
139
140 migrationBuilder.AlterColumn<decimal>(
141 name: "InstanceManagerRights",
142 table: "PermissionSets",
143 type: "numeric(20)",
144 nullable: false,
145 oldClrType: typeof(decimal),
146 oldType: "numeric(20,0)");
147
148 migrationBuilder.AlterColumn<decimal>(
149 name: "AdministrationRights",
150 table: "PermissionSets",
151 type: "numeric(20)",
152 nullable: false,
153 oldClrType: typeof(decimal),
154 oldType: "numeric(20,0)");
155
156 migrationBuilder.AlterColumn<decimal>(
157 name: "CancelRightsType",
158 table: "Jobs",
159 type: "numeric(20)",
160 nullable: true,
161 oldClrType: typeof(decimal),
162 oldType: "numeric(20,0)",
163 oldNullable: true);
164
165 migrationBuilder.AlterColumn<decimal>(
166 name: "CancelRight",
167 table: "Jobs",
168 type: "numeric(20)",
169 nullable: true,
170 oldClrType: typeof(decimal),
171 oldType: "numeric(20,0)",
172 oldNullable: true);
173
174 migrationBuilder.AlterColumn<decimal>(
175 name: "RepositoryRights",
176 table: "InstancePermissionSets",
177 type: "numeric(20)",
178 nullable: false,
179 oldClrType: typeof(decimal),
180 oldType: "numeric(20,0)");
181
182 migrationBuilder.AlterColumn<decimal>(
183 name: "InstancePermissionSetRights",
184 table: "InstancePermissionSets",
185 type: "numeric(20)",
186 nullable: false,
187 oldClrType: typeof(decimal),
188 oldType: "numeric(20,0)");
189
190 migrationBuilder.AlterColumn<decimal>(
191 name: "DreamMakerRights",
192 table: "InstancePermissionSets",
193 type: "numeric(20)",
194 nullable: false,
195 oldClrType: typeof(decimal),
196 oldType: "numeric(20,0)");
197
198 migrationBuilder.AlterColumn<decimal>(
199 name: "DreamDaemonRights",
200 table: "InstancePermissionSets",
201 type: "numeric(20)",
202 nullable: false,
203 oldClrType: typeof(decimal),
204 oldType: "numeric(20,0)");
205
206 migrationBuilder.AlterColumn<decimal>(
207 name: "ConfigurationRights",
208 table: "InstancePermissionSets",
209 type: "numeric(20)",
210 nullable: false,
211 oldClrType: typeof(decimal),
212 oldType: "numeric(20,0)");
213
214 migrationBuilder.AlterColumn<decimal>(
215 name: "ChatBotRights",
216 table: "InstancePermissionSets",
217 type: "numeric(20)",
218 nullable: false,
219 oldClrType: typeof(decimal),
220 oldType: "numeric(20,0)");
221
222 migrationBuilder.AlterColumn<decimal>(
223 name: "ByondRights",
224 table: "InstancePermissionSets",
225 type: "numeric(20)",
226 nullable: false,
227 oldClrType: typeof(decimal),
228 oldType: "numeric(20,0)");
229
230 migrationBuilder.AlterColumn<decimal>(
231 name: "DiscordChannelId",
232 table: "ChatChannels",
233 type: "numeric(20)",
234 nullable: true,
235 oldClrType: typeof(decimal),
236 oldType: "numeric(20,0)",
237 oldNullable: true);
238 }
239 }
240}