mirror of
https://github.com/DorkSquadRR/DorkNet.git
synced 2026-10-25 23:18:44 -07:00
3b332a6476
EF Core 10 runs EnsureCreated through the migration executor, which begins its own transaction unless EF already has one. The bootstrap held the advisory lock in a transaction begun on the raw connection, invisible to EF, so a fresh Postgres database failed at startup with "A transaction is already in progress". Begin it through db.Database and take the lock with ExecuteSqlRaw so EnsureCreated runs inside it.