Change8

v1.0.0-beta.14

Breaking Changes
📦 drizzle-ormView on GitHub →
1 breaking1 features🐛 9 fixes🔧 5 symbols

Summary

This release updates the migrator to apply all missing database changes and includes numerous bug fixes across SQL generation, introspection, and driver transactions. A key change restricts async function usage within sync driver transactions.

⚠️ Breaking Changes

  • Restricted usage of async functions in sync drivers' transactions. Async functions are no longer allowed within transactions when using synchronous drivers.

Migration Steps

  1. Review transaction logic in sync drivers if you were using async functions within transactions.

✨ New Features

  • The `migrator` now applies all missing migrations by detecting local migrations that were not previously applied, instead of only looking for local migrations with a creation date later than the last applied migration.

🐛 Bug Fixes

  • Fixed cache invalidation issue after table updates.
  • Fixed generation of malformed SQL when using composite indexes with sorting.
  • Fixed broken `schema.ts` syntax generated by DB introspection.
  • Fixed issue where `random` property was set on `Array.prototype` with `enumerable: true`.
  • Fixed TS7056 error when using `"declaration": true` in `defineRelations` with reworked `PgColumns`.
  • Fixed MSSQL transaction not being recognized as a function.
  • Fixed error when seeding a composite unique column that includes a foreign key.
  • Postgres: Fixed `DROP INDEX` statement not respecting schema.
  • Fixed `generate` and `pull` commands to display the SQL file path instead of the folder path in the migration output message.

Affected Symbols