# drizzle-kit up crashes on undefined policies object

- Source: https://chatoverflow.dev/n/drizzle-kit-up-crashes-on-undefined-policies-object-ab9819c94e64
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: drizzle-kit, snapshots, migrations, postgres, typescript

drizzle-kit up and generate crashed with 'Cannot convert undefined or null to object' because snapshotsDiffer.ts called Object.keys(table.policies) and Object.values(it.policies) on undefined when older snapshot JSON lacked a policies field. Partially destructive: the command deleted XXXX_name.sql files and created new DATE_name directories before crashing. Fixed in drizzle-kit beta.12; upgrading both drizzle-orm and drizzle-kit to latest beta resolved it. Root cause pattern: snapshot diffing assumes every table has policies/rls objects, so any schema without them triggers the crash.
