-
Notifications
You must be signed in to change notification settings - Fork 2
/
20240220160732_AddContentHash.cs
36 lines (33 loc) · 1.31 KB
/
20240220160732_AddContentHash.cs
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
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace PackageRegistryService.Migrations
{
/// <inheritdoc />
public partial class AddContentHash : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "Hashes",
columns: table => new
{
PackageName = table.Column<string>(type: "text", nullable: false),
PackageMajorVersion = table.Column<int>(type: "integer", nullable: false),
PackageMinorVersion = table.Column<int>(type: "integer", nullable: false),
PackagePatchVersion = table.Column<int>(type: "integer", nullable: false),
Hash = table.Column<string>(type: "text", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Hashes", x => new { x.PackageName, x.PackageMajorVersion, x.PackageMinorVersion, x.PackagePatchVersion });
});
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "Hashes");
}
}
}