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:
mika kuns
2026-06-09 10:15:42 +02:00
parent 61a40d549b
commit f5d165baae
4 changed files with 0 additions and 18 deletions

View File

@@ -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)