profileShare

rasmusjy / splitapp-backend-clean-onion

Read-only snapshot

No repository description.

main default branch 429 files Expires Sep 13, 2026, 9:06 AM
20260328161224_AddBaseEntityTimestamps.cs 15,624 bytes
1 using System;
2 using Microsoft.EntityFrameworkCore.Migrations;
3
4 #nullable disable
5
6 namespace App.DAL.EF.Migrations
7 {
8 /// <inheritdoc />
9 public partial class AddBaseEntityTimestamps : Migration
10 {
11 /// <inheritdoc />
12 protected override void Up(MigrationBuilder migrationBuilder)
13 {
14 migrationBuilder.AddColumn<DateTime>(
15 name: "CreatedAt",
16 table: "TripWishlistVotes",
17 type: "timestamp with time zone",
18 nullable: false,
19 defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
20
21 migrationBuilder.AddColumn<DateTime>(
22 name: "UpdatedAt",
23 table: "TripWishlistVotes",
24 type: "timestamp with time zone",
25 nullable: false,
26 defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
27
28 migrationBuilder.AddColumn<DateTime>(
29 name: "CreatedAt",
30 table: "TripWishlistItems",
31 type: "timestamp with time zone",
32 nullable: false,
33 defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
34
35 migrationBuilder.AddColumn<DateTime>(
36 name: "UpdatedAt",
37 table: "TripWishlistItems",
38 type: "timestamp with time zone",
39 nullable: false,
40 defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
41
42 migrationBuilder.AddColumn<DateTime>(
43 name: "CreatedAt",
44 table: "Trips",
45 type: "timestamp with time zone",
46 nullable: false,
47 defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
48
49 migrationBuilder.AddColumn<DateTime>(
50 name: "UpdatedAt",
51 table: "Trips",
52 type: "timestamp with time zone",
53 nullable: false,
54 defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
55
56 migrationBuilder.AddColumn<DateTime>(
57 name: "CreatedAt",
58 table: "TripPollVotes",
59 type: "timestamp with time zone",
60 nullable: false,
61 defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
62
63 migrationBuilder.AddColumn<DateTime>(
64 name: "UpdatedAt",
65 table: "TripPollVotes",
66 type: "timestamp with time zone",
67 nullable: false,
68 defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
69
70 migrationBuilder.AddColumn<DateTime>(
71 name: "CreatedAt",
72 table: "TripPolls",
73 type: "timestamp with time zone",
74 nullable: false,
75 defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
76
77 migrationBuilder.AddColumn<DateTime>(
78 name: "UpdatedAt",
79 table: "TripPolls",
80 type: "timestamp with time zone",
81 nullable: false,
82 defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
83
84 migrationBuilder.AddColumn<DateTime>(
85 name: "CreatedAt",
86 table: "TripPollOptions",
87 type: "timestamp with time zone",
88 nullable: false,
89 defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
90
91 migrationBuilder.AddColumn<DateTime>(
92 name: "UpdatedAt",
93 table: "TripPollOptions",
94 type: "timestamp with time zone",
95 nullable: false,
96 defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
97
98 migrationBuilder.AddColumn<DateTime>(
99 name: "CreatedAt",
100 table: "TripParticipants",
101 type: "timestamp with time zone",
102 nullable: false,
103 defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
104
105 migrationBuilder.AddColumn<DateTime>(
106 name: "UpdatedAt",
107 table: "TripParticipants",
108 type: "timestamp with time zone",
109 nullable: false,
110 defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
111
112 migrationBuilder.AddColumn<DateTime>(
113 name: "CreatedAt",
114 table: "TripInvitations",
115 type: "timestamp with time zone",
116 nullable: false,
117 defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
118
119 migrationBuilder.AddColumn<DateTime>(
120 name: "UpdatedAt",
121 table: "TripInvitations",
122 type: "timestamp with time zone",
123 nullable: false,
124 defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
125
126 migrationBuilder.AddColumn<DateTime>(
127 name: "CreatedAt",
128 table: "SplitPresets",
129 type: "timestamp with time zone",
130 nullable: false,
131 defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
132
133 migrationBuilder.AddColumn<DateTime>(
134 name: "UpdatedAt",
135 table: "SplitPresets",
136 type: "timestamp with time zone",
137 nullable: false,
138 defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
139
140 migrationBuilder.AddColumn<DateTime>(
141 name: "CreatedAt",
142 table: "SplitPresetMembers",
143 type: "timestamp with time zone",
144 nullable: false,
145 defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
146
147 migrationBuilder.AddColumn<DateTime>(
148 name: "UpdatedAt",
149 table: "SplitPresetMembers",
150 type: "timestamp with time zone",
151 nullable: false,
152 defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
153
154 migrationBuilder.AddColumn<DateTime>(
155 name: "CreatedAt",
156 table: "SettlementPlans",
157 type: "timestamp with time zone",
158 nullable: false,
159 defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
160
161 migrationBuilder.AddColumn<DateTime>(
162 name: "UpdatedAt",
163 table: "SettlementPlans",
164 type: "timestamp with time zone",
165 nullable: false,
166 defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
167
168 migrationBuilder.AddColumn<DateTime>(
169 name: "CreatedAt",
170 table: "SettlementPayments",
171 type: "timestamp with time zone",
172 nullable: false,
173 defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
174
175 migrationBuilder.AddColumn<DateTime>(
176 name: "UpdatedAt",
177 table: "SettlementPayments",
178 type: "timestamp with time zone",
179 nullable: false,
180 defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
181
182 migrationBuilder.AddColumn<DateTime>(
183 name: "CreatedAt",
184 table: "RefreshTokens",
185 type: "timestamp with time zone",
186 nullable: false,
187 defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
188
189 migrationBuilder.AddColumn<DateTime>(
190 name: "UpdatedAt",
191 table: "RefreshTokens",
192 type: "timestamp with time zone",
193 nullable: false,
194 defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
195
196 migrationBuilder.AddColumn<DateTime>(
197 name: "CreatedAt",
198 table: "ExpenseSplits",
199 type: "timestamp with time zone",
200 nullable: false,
201 defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
202
203 migrationBuilder.AddColumn<DateTime>(
204 name: "UpdatedAt",
205 table: "ExpenseSplits",
206 type: "timestamp with time zone",
207 nullable: false,
208 defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
209
210 migrationBuilder.AddColumn<DateTime>(
211 name: "CreatedAt",
212 table: "Expenses",
213 type: "timestamp with time zone",
214 nullable: false,
215 defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
216
217 migrationBuilder.AddColumn<DateTime>(
218 name: "UpdatedAt",
219 table: "Expenses",
220 type: "timestamp with time zone",
221 nullable: false,
222 defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
223
224 migrationBuilder.AddColumn<DateTime>(
225 name: "CreatedAt",
226 table: "Currencies",
227 type: "timestamp with time zone",
228 nullable: false,
229 defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
230
231 migrationBuilder.AddColumn<DateTime>(
232 name: "UpdatedAt",
233 table: "Currencies",
234 type: "timestamp with time zone",
235 nullable: false,
236 defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
237
238 migrationBuilder.AddColumn<DateTime>(
239 name: "CreatedAt",
240 table: "BudgetCategoryTranslations",
241 type: "timestamp with time zone",
242 nullable: false,
243 defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
244
245 migrationBuilder.AddColumn<DateTime>(
246 name: "UpdatedAt",
247 table: "BudgetCategoryTranslations",
248 type: "timestamp with time zone",
249 nullable: false,
250 defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
251
252 migrationBuilder.AddColumn<DateTime>(
253 name: "CreatedAt",
254 table: "BudgetCategories",
255 type: "timestamp with time zone",
256 nullable: false,
257 defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
258
259 migrationBuilder.AddColumn<DateTime>(
260 name: "UpdatedAt",
261 table: "BudgetCategories",
262 type: "timestamp with time zone",
263 nullable: false,
264 defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
265 }
266
267 /// <inheritdoc />
268 protected override void Down(MigrationBuilder migrationBuilder)
269 {
270 migrationBuilder.DropColumn(
271 name: "CreatedAt",
272 table: "TripWishlistVotes");
273
274 migrationBuilder.DropColumn(
275 name: "UpdatedAt",
276 table: "TripWishlistVotes");
277
278 migrationBuilder.DropColumn(
279 name: "CreatedAt",
280 table: "TripWishlistItems");
281
282 migrationBuilder.DropColumn(
283 name: "UpdatedAt",
284 table: "TripWishlistItems");
285
286 migrationBuilder.DropColumn(
287 name: "CreatedAt",
288 table: "Trips");
289
290 migrationBuilder.DropColumn(
291 name: "UpdatedAt",
292 table: "Trips");
293
294 migrationBuilder.DropColumn(
295 name: "CreatedAt",
296 table: "TripPollVotes");
297
298 migrationBuilder.DropColumn(
299 name: "UpdatedAt",
300 table: "TripPollVotes");
301
302 migrationBuilder.DropColumn(
303 name: "CreatedAt",
304 table: "TripPolls");
305
306 migrationBuilder.DropColumn(
307 name: "UpdatedAt",
308 table: "TripPolls");
309
310 migrationBuilder.DropColumn(
311 name: "CreatedAt",
312 table: "TripPollOptions");
313
314 migrationBuilder.DropColumn(
315 name: "UpdatedAt",
316 table: "TripPollOptions");
317
318 migrationBuilder.DropColumn(
319 name: "CreatedAt",
320 table: "TripParticipants");
321
322 migrationBuilder.DropColumn(
323 name: "UpdatedAt",
324 table: "TripParticipants");
325
326 migrationBuilder.DropColumn(
327 name: "CreatedAt",
328 table: "TripInvitations");
329
330 migrationBuilder.DropColumn(
331 name: "UpdatedAt",
332 table: "TripInvitations");
333
334 migrationBuilder.DropColumn(
335 name: "CreatedAt",
336 table: "SplitPresets");
337
338 migrationBuilder.DropColumn(
339 name: "UpdatedAt",
340 table: "SplitPresets");
341
342 migrationBuilder.DropColumn(
343 name: "CreatedAt",
344 table: "SplitPresetMembers");
345
346 migrationBuilder.DropColumn(
347 name: "UpdatedAt",
348 table: "SplitPresetMembers");
349
350 migrationBuilder.DropColumn(
351 name: "CreatedAt",
352 table: "SettlementPlans");
353
354 migrationBuilder.DropColumn(
355 name: "UpdatedAt",
356 table: "SettlementPlans");
357
358 migrationBuilder.DropColumn(
359 name: "CreatedAt",
360 table: "SettlementPayments");
361
362 migrationBuilder.DropColumn(
363 name: "UpdatedAt",
364 table: "SettlementPayments");
365
366 migrationBuilder.DropColumn(
367 name: "CreatedAt",
368 table: "RefreshTokens");
369
370 migrationBuilder.DropColumn(
371 name: "UpdatedAt",
372 table: "RefreshTokens");
373
374 migrationBuilder.DropColumn(
375 name: "CreatedAt",
376 table: "ExpenseSplits");
377
378 migrationBuilder.DropColumn(
379 name: "UpdatedAt",
380 table: "ExpenseSplits");
381
382 migrationBuilder.DropColumn(
383 name: "CreatedAt",
384 table: "Expenses");
385
386 migrationBuilder.DropColumn(
387 name: "UpdatedAt",
388 table: "Expenses");
389
390 migrationBuilder.DropColumn(
391 name: "CreatedAt",
392 table: "Currencies");
393
394 migrationBuilder.DropColumn(
395 name: "UpdatedAt",
396 table: "Currencies");
397
398 migrationBuilder.DropColumn(
399 name: "CreatedAt",
400 table: "BudgetCategoryTranslations");
401
402 migrationBuilder.DropColumn(
403 name: "UpdatedAt",
404 table: "BudgetCategoryTranslations");
405
406 migrationBuilder.DropColumn(
407 name: "CreatedAt",
408 table: "BudgetCategories");
409
410 migrationBuilder.DropColumn(
411 name: "UpdatedAt",
412 table: "BudgetCategories");
413 }
414 }
415 }
416