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
|
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace CoreWiki.Migrations
{
/// <inheritdoc />
public partial class ViewCount : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<int>(
name: "ViewCount",
table: "Articles",
type: "INTEGER",
nullable: false,
defaultValue: 0);
migrationBuilder.UpdateData(
table: "Articles",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "Published", "ViewCount" },
values: new object[] { new DateTime(2023, 12, 25, 20, 29, 5, 642, DateTimeKind.Utc).AddTicks(7240), 0 });
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "ViewCount",
table: "Articles");
migrationBuilder.UpdateData(
table: "Articles",
keyColumn: "Id",
keyValue: 1,
column: "Published",
value: new DateTime(2023, 12, 24, 18, 37, 32, 413, DateTimeKind.Utc).AddTicks(8400));
}
}
}
|