Add a feature notification to announce new features, improvements, or bug fixes to users...
Add a notification that appears in the "What's New" bell icon for all users.
Run these commands to understand the changes:
git diff main...HEAD
gh pr view --json title,body,number
Based on changes, classify as one of:
Feature - New functionality addedImprovement - Enhancement to existing functionalityBugFix - Bug or issue fixedCreate two files in src/PraxisNote.Infrastructure/Migrations/Data/FeatureNotifications/:
Note: The
Data/subfolder separates data migrations from structural schema migrations.
Naming: YYYYMMDDHHMMSS_AddNotification{PascalCaseTitle}.cs
Use current UTC timestamp (e.g., 20260117120000 for Jan 17, 2026 12:00:00 UTC).
Migration file (YYYYMMDDHHMMSS_AddNotification{Title}.cs):
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace PraxisNote.Infrastructure.Migrations.Data.FeatureNotifications
{
public partial class AddNotification{PascalCaseTitle} : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.Sql("""
INSERT INTO "FeatureNotifications" ("Type", "Title", "Summary", "IssueUrl", "CreatedAt")
VALUES (
'{Type}',
'{Title}',
'{Summary}',
'https://github.com/garethbaumgart/praxis-note/pull/{PRNumber}',
'{ISO8601Timestamp}'
);
""");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.Sql("""
DELETE FROM "FeatureNotifications"
WHERE "Title" = '{Title}';
""");
}
}
}
Designer file (YYYYMMDDHHMMSS_AddNotification{Title}.Designer.cs):
[Migration("...")] attribute to match your new migration namepartial class name to matchnamespace to PraxisNote.Infrastructure.Migrations.Data.FeatureNotifications# Build to verify migration compiles
cd src && dotnet build
# Restart API to trigger migration
docker restart praxisnote-api-dev
# Check migration was applied
docker exec praxisnote-db-dev psql -U praxisnote -d praxisnote -c \
"SELECT \"Id\", \"Title\" FROM \"FeatureNotifications\" ORDER BY \"Id\" DESC LIMIT 3;"
Title:
Summary:
Do NOT create a notification for: