Notifications-Identifiable

This commit is contained in:
2025-07-01 22:35:44 +02:00
parent 314700aa8e
commit f1d3203ae1
5 changed files with 164 additions and 26 deletions

View File

@ -0,0 +1,59 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace API.Migrations.notifications
{
/// <inheritdoc />
public partial class NotificationIdentifiable : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropPrimaryKey(
name: "PK_Notifications",
table: "Notifications");
migrationBuilder.DropColumn(
name: "NotificationId",
table: "Notifications");
migrationBuilder.AddColumn<string>(
name: "Key",
table: "Notifications",
type: "text",
nullable: false,
defaultValue: "");
migrationBuilder.AddPrimaryKey(
name: "PK_Notifications",
table: "Notifications",
column: "Key");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropPrimaryKey(
name: "PK_Notifications",
table: "Notifications");
migrationBuilder.DropColumn(
name: "Key",
table: "Notifications");
migrationBuilder.AddColumn<string>(
name: "NotificationId",
table: "Notifications",
type: "character varying(64)",
maxLength: 64,
nullable: false,
defaultValue: "");
migrationBuilder.AddPrimaryKey(
name: "PK_Notifications",
table: "Notifications",
column: "NotificationId");
}
}
}