db: add nullable Viewer.Udid with partial unique index
Backstop for /tool/signup idempotency: signup-created viewers carry the client's UDID (the AES key for that client's wire traffic); admin-imported viewers stay null. Partial unique index allows the column to coexist with pre-existing null rows. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -2052,10 +2052,16 @@ namespace SVSim.Database.Migrations
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseSequence(b.Property<long>("ShortUdid"), "ShortUdidSequence");
|
||||
|
||||
b.Property<Guid?>("Udid")
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ShortUdid");
|
||||
|
||||
b.HasIndex("Udid")
|
||||
.IsUnique();
|
||||
|
||||
b.ToTable("Viewers");
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user