#10405·Prisma

第二次 Prisma 迁移运行(没有中间的架构更改)报告差异并抛出"重复键"错误

作者: feather-michael创建于 2021年11月23日更新于 2026年9月29日
标签bug/2-confirmedkind/bugtech/enginestopic: mysqltopic: indexestopic: prisma migrate devtopic: extendedIndexestopic: index length

Bug description

After introspecting a MySQL database and running an initial migration, and then making no changes of any kind to the schema after that initial introspection, a second run of npx Prisma migrate dev incorrectly generates another migration by adding an index that was already added during that first migration. The second migration then fails to run, reporting a "duplicate key."