New Features
sqlcommenter support for PostgreSQL and MySQL
You can now add custom tags to the query. These tags will be appended to the end of each query, helping the database add metadata/tags to it. This will be especially useful with PlanetScale’s new Database Traffic Control feature
// raw string support
db.select().from().comment("key='val'");
db.select().from().comment("my_first_tag");
// developer friendly dedicated to tags
db.select().from().comment({ key: 'val' });Example:
db.select().from(comments).comment({ priority: 'high', category: "analytics" });select "id", "name" from "comments" /*priority='high',category='analytics'*/The only limitation is that you can't use comments with a prepared statement:
// can't be used
const p = db.select().from().prepare();
// ❌
p.comment({ key: 'val' }).execute();Bug fixes
- Fixed error message for the defineRelations function
- [BUG]: drizzle-kit push attempts to drop policies in excluded schemas (e.g. cron) despite schemaFilter: ["public"]
- [BUG]: error attempting to drizzle-kit migrate table with char array field generated using drizzle-kit generate
- [BUG]: Ignore Vim *.swp files in drizzle-kit generate
- [BUG]: drizzle-kit pull outputs access method name instead of operator class for ivfflat indexes
- [BUG]: drizzle-kit pull generates not enough data provided to build the relation
- drizzle-kit push fails with Turso/libSQL on table recreation: "cannot commit - no transaction is active"
- [BUG]: Cannot read properties of undefined (reading 'requestLayout') when running drizzle-kit introspect (MySQL)
- [BUG (beta)]: RDS Data API pulling schema error
- [BUG]: drizzle-kit commutative migrations takes only last leaf migration into account
Updates
-
Updated
migrate()function for mysql dialect to correctly manage multiple databases -
The behavior for reading schema files has been updated. From now only files with the following extensions will be processed:
.js.mjs.cjs.jsx.ts.mts.cts.tsx. All other file types will be ignored