Skip to content

Commit 2e2de7b

Browse files
committed
Addin custom checks
1 parent 7709773 commit 2e2de7b

File tree

10 files changed

+900
-76
lines changed

10 files changed

+900
-76
lines changed

src/ServiceControl.Persistence.Sql.MySQL/Migrations/20251209022544_AddCustomChecks.Designer.cs

Lines changed: 228 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
#nullable disable
2+
3+
namespace ServiceControl.Persistence.Sql.MySQL.Migrations
4+
{
5+
using System;
6+
using Microsoft.EntityFrameworkCore.Migrations;
7+
/// <inheritdoc />
8+
public partial class AddCustomChecks : Migration
9+
{
10+
/// <inheritdoc />
11+
protected override void Up(MigrationBuilder migrationBuilder)
12+
{
13+
migrationBuilder.CreateTable(
14+
name: "CustomChecks",
15+
columns: table => new
16+
{
17+
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
18+
CustomCheckId = table.Column<string>(type: "varchar(500)", maxLength: 500, nullable: false)
19+
.Annotation("MySql:CharSet", "utf8mb4"),
20+
Category = table.Column<string>(type: "varchar(500)", maxLength: 500, nullable: true)
21+
.Annotation("MySql:CharSet", "utf8mb4"),
22+
Status = table.Column<int>(type: "int", nullable: false),
23+
ReportedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false),
24+
FailureReason = table.Column<string>(type: "longtext", nullable: true)
25+
.Annotation("MySql:CharSet", "utf8mb4"),
26+
EndpointName = table.Column<string>(type: "varchar(500)", maxLength: 500, nullable: false)
27+
.Annotation("MySql:CharSet", "utf8mb4"),
28+
HostId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
29+
Host = table.Column<string>(type: "varchar(500)", maxLength: 500, nullable: false)
30+
.Annotation("MySql:CharSet", "utf8mb4")
31+
},
32+
constraints: table =>
33+
{
34+
table.PrimaryKey("PK_CustomChecks", x => x.Id);
35+
})
36+
.Annotation("MySql:CharSet", "utf8mb4");
37+
38+
migrationBuilder.CreateIndex(
39+
name: "IX_CustomChecks_Status",
40+
table: "CustomChecks",
41+
column: "Status");
42+
}
43+
44+
/// <inheritdoc />
45+
protected override void Down(MigrationBuilder migrationBuilder)
46+
{
47+
migrationBuilder.DropTable(
48+
name: "CustomChecks");
49+
}
50+
}
51+
}

0 commit comments

Comments
 (0)