using Khaemhat.Data.Migrations;
using Khaemhat.Data.Schema;
namespace Khaemhat.Data.SystemDatabase.Migrations;
/// The notifications of the instance accounts (SPEC ยง9).
[Migration(20261111_011, "create_sys_notifications", Target = MigrationTarget.System)]
public sealed class M20261111_011_CreateSysNotifications : IMigration
{
///
public void Up(ISchemaBuilder schema)
{
ArgumentNullException.ThrowIfNull(schema);
schema.CreateTable("sys_notifications", t =>
{
t.Id();
t.Int64("recipient_user_id");
t.String("category", 40).NotNull();
t.String("severity", 40).NotNull();
t.String("title", 200).NotNull();
t.Text("body");
t.String("link", 400);
t.DateTimeUtc("read_at");
t.AuditColumns();
t.Index("ix_sys_notifications_recipient_user_id", "recipient_user_id");
});
}
}