fix(data): drop unique index on lists.name (allow duplicate list names)
The startup-race hardening added a global unique index on lists.name, but duplicate list names are legitimate and the index broke 8 Worker tests that seed same-named lists. The seeder race is already handled by the atomic INSERT...WHERE NOT EXISTS, so the index is redundant. Keep the de-dup migration step, remove the unique index from config, migration and model snapshot. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -19,7 +19,6 @@ public class ListEntityConfiguration : IEntityTypeConfiguration<ListEntity>
|
||||
builder.Property(l => l.SortOrder).HasColumnName("sort_order").IsRequired().HasDefaultValue(0);
|
||||
|
||||
builder.HasIndex(l => l.SortOrder).HasDatabaseName("idx_lists_sort");
|
||||
builder.HasIndex(l => l.Name).IsUnique().HasDatabaseName("idx_lists_name");
|
||||
|
||||
builder.HasOne(l => l.Config)
|
||||
.WithOne(c => c.List)
|
||||
|
||||
Reference in New Issue
Block a user