#10348·typeorm

Using synchronization: false with @Index does not ignore the index when creating migrations

Author: kareldonkCreated Sep 12, 2023Updated Sep 23, 2026
Labelsbug

Issue description

Using synchronization: false with @Index does not ignore the index when creating migrations as per the documentation. Also see https://github.com/typeorm/typeorm/issues/7487

Expected Behavior

As per documentation in screenshot.

Actual Behavior

Deletes indexes that are marked to not be synchronized.

Steps to reproduce

Try documentation.

My Environment

Any

Additional Context

image

Relevant Database Driver(s)

  • aurora-mysql
  • aurora-postgres
  • better-sqlite3
  • cockroachdb
  • cordova
  • expo
  • mongodb
  • mysql
  • nativescript
  • oracle
  • postgres
  • react-native
  • sap
  • spanner
  • sqlite
  • sqlite-abstract
  • sqljs
  • sqlserver

Are you willing to resolve this issue by submitting a Pull Request?

No, I don’t have the time and I’m okay to wait for the community / maintainers to resolve this issue.