Tranga/API/Migrations/20250307143442_dev-070325-5.cs
Glax 022ebe2bcc Arbitrary Webhook for NotificationConnectors
Backend only deals in REST Webhooks
The API has custom Endpoints for Ntfy, Gotify, Lunasea that create pre-formatted Webhooks
#297 #259
2025-03-07 16:30:32 +01:00

67 lines
2.1 KiB
C#

using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace API.Migrations
{
/// <inheritdoc />
public partial class dev0703255 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropPrimaryKey(
name: "PK_NotificationConnectors",
table: "NotificationConnectors");
migrationBuilder.DropColumn(
name: "NotificationConnectorId",
table: "NotificationConnectors");
migrationBuilder.AlterColumn<string>(
name: "Name",
table: "NotificationConnectors",
type: "character varying(64)",
maxLength: 64,
nullable: false,
oldClrType: typeof(string),
oldType: "text");
migrationBuilder.AddPrimaryKey(
name: "PK_NotificationConnectors",
table: "NotificationConnectors",
column: "Name");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropPrimaryKey(
name: "PK_NotificationConnectors",
table: "NotificationConnectors");
migrationBuilder.AlterColumn<string>(
name: "Name",
table: "NotificationConnectors",
type: "text",
nullable: false,
oldClrType: typeof(string),
oldType: "character varying(64)",
oldMaxLength: 64);
migrationBuilder.AddColumn<string>(
name: "NotificationConnectorId",
table: "NotificationConnectors",
type: "character varying(64)",
maxLength: 64,
nullable: false,
defaultValue: "");
migrationBuilder.AddPrimaryKey(
name: "PK_NotificationConnectors",
table: "NotificationConnectors",
column: "NotificationConnectorId");
}
}
}