From 777e6da142952ea268a930aa5bdd486ededf31dd Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Thu, 24 Jul 2025 15:05:55 +0800 Subject: [PATCH] :bug: Fix migrations in Pusher --- ...r.cs => 20250724070546_UpdateNotificationMeta.Designer.cs} | 4 ++-- ...aseSomehow.cs => 20250724070546_UpdateNotificationMeta.cs} | 2 +- DysonNetwork.Pusher/Notification/Notification.cs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) rename DysonNetwork.Pusher/Migrations/{20250724065831_UpdateDatabaseSomehow.Designer.cs => 20250724070546_UpdateNotificationMeta.Designer.cs} (98%) rename DysonNetwork.Pusher/Migrations/{20250724065831_UpdateDatabaseSomehow.cs => 20250724070546_UpdateNotificationMeta.cs} (94%) diff --git a/DysonNetwork.Pusher/Migrations/20250724065831_UpdateDatabaseSomehow.Designer.cs b/DysonNetwork.Pusher/Migrations/20250724070546_UpdateNotificationMeta.Designer.cs similarity index 98% rename from DysonNetwork.Pusher/Migrations/20250724065831_UpdateDatabaseSomehow.Designer.cs rename to DysonNetwork.Pusher/Migrations/20250724070546_UpdateNotificationMeta.Designer.cs index 88b4420..17e17e0 100644 --- a/DysonNetwork.Pusher/Migrations/20250724065831_UpdateDatabaseSomehow.Designer.cs +++ b/DysonNetwork.Pusher/Migrations/20250724070546_UpdateNotificationMeta.Designer.cs @@ -14,8 +14,8 @@ using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; namespace DysonNetwork.Pusher.Migrations { [DbContext(typeof(AppDatabase))] - [Migration("20250724065831_UpdateDatabaseSomehow")] - partial class UpdateDatabaseSomehow + [Migration("20250724070546_UpdateNotificationMeta")] + partial class UpdateNotificationMeta { /// protected override void BuildTargetModel(ModelBuilder modelBuilder) diff --git a/DysonNetwork.Pusher/Migrations/20250724065831_UpdateDatabaseSomehow.cs b/DysonNetwork.Pusher/Migrations/20250724070546_UpdateNotificationMeta.cs similarity index 94% rename from DysonNetwork.Pusher/Migrations/20250724065831_UpdateDatabaseSomehow.cs rename to DysonNetwork.Pusher/Migrations/20250724070546_UpdateNotificationMeta.cs index c2c9acd..63ef74d 100644 --- a/DysonNetwork.Pusher/Migrations/20250724065831_UpdateDatabaseSomehow.cs +++ b/DysonNetwork.Pusher/Migrations/20250724070546_UpdateNotificationMeta.cs @@ -6,7 +6,7 @@ using Microsoft.EntityFrameworkCore.Migrations; namespace DysonNetwork.Pusher.Migrations { /// - public partial class UpdateDatabaseSomehow : Migration + public partial class UpdateNotificationMeta : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) diff --git a/DysonNetwork.Pusher/Notification/Notification.cs b/DysonNetwork.Pusher/Notification/Notification.cs index 676b14c..47cbdee 100644 --- a/DysonNetwork.Pusher/Notification/Notification.cs +++ b/DysonNetwork.Pusher/Notification/Notification.cs @@ -14,7 +14,7 @@ public class Notification : ModelBase [MaxLength(1024)] public string? Title { get; set; } [MaxLength(2048)] public string? Subtitle { get; set; } [MaxLength(4096)] public string? Content { get; set; } - [Column(TypeName = "jsonb")] public Dictionary Meta { get; set; } + [Column(TypeName = "jsonb")] public Dictionary Meta { get; set; } = new(); public int Priority { get; set; } = 10; public Instant? ViewedAt { get; set; }