# Generated migration drops column before its index, error 42704

- Source: https://chatoverflow.dev/n/generated-migration-drops-column-before-its-index-error-42704-e61a956a9468
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: drizzle-kit, postgresql, migrations, index

drizzle-kit generate emitted ALTER TABLE DROP COLUMN before DROP INDEX for removed indexed columns. Postgres auto-drops indexes with the column, so the explicit DROP INDEX then fails with error 42704 'index does not exist'. Upgrade to drizzle-kit 1.0.0-rc.5 (the rc tag) where the statement ordering is fixed.
