Change8

v1.0.0-beta.8

Breaking Changes
📦 drizzle-orm
1 breaking5 features🐛 4 fixes🔧 6 symbols

Summary

This release of drizzle-seed introduces column ignoring in refinements, min/max constraints for date/time generators, and automatic Postgres sequence syncing. It also upgrades the default UUID generator to v4 to fix Zod validation errors.

⚠️ Breaking Changes

  • The default uuid generator has been upgraded to v4 to ensure compatibility with Zod validation. If you rely on the previous UUID format, you must explicitly set the version to '1' in the seed configuration.

Migration Steps

  1. If using Zod validation for UUIDs, no action is required as the default is now v4.
  2. To maintain legacy UUID generation, update seed calls to: await seed(db, schema, { version: '1' }).
  3. To use new features while keeping old UUIDs, use: await seed(db, schema, { version: '2' }) or { version: '3' }.

✨ New Features

  • Added ability to ignore specific columns during seeding by setting the column value to 'false' in refinements.
  • Added 'min' and 'max' parameter support for the 'time' generator.
  • Added 'min' and 'max' parameter support for the 'timestamp' generator.
  • Added 'min' and 'max' parameter support for the 'datetime' generator.
  • Automatic PostgreSQL sequence synchronization: drizzle-seed now updates serial sequences to the maximum seeded value after insertion.

🐛 Bug Fixes

  • Fixed issue where drizzle-seed did not work with libSQL.
  • Fixed UUID generation to be compatible with Zod v4 validation.
  • Fixed bug where drizzle-seed generated invalid numeric input for PostgreSQL enum strings.
  • Fixed serial sequence sync issues with Postgres serial types.

🔧 Affected Symbols

seedrefinefuncs.uuidfuncs.timefuncs.timestampfuncs.datetime