# Drizzle Kit changelog > The migration and introspection CLI for Drizzle ORM — generates SQL from a TypeScript schema. - Vendor: Drizzle Team - Category: Developer Tools - Official site: https://orm.drizzle.team/docs/kit-overview - Tracked by: What's New (https://whatsnew.fyi/product/drizzle-kit) - Harvested from: GitHub (drizzle-team/drizzle-orm) - Entries below: 25 (newest first) What's New is an index, not a publisher: every entry below links to the vendor's own release notes, which are the authoritative source. Entries are labelled where they are hand-curated sample data, pre-releases, or drawn from a secondary source such as a developer blog. ## Releases ### 0.31.10 - Date: 2026-03-17 - Version: 0.31.10 - Original notes: https://github.com/drizzle-team/drizzle-orm/releases/tag/drizzle-kit%400.31.10 - Permalink: https://whatsnew.fyi/product/drizzle-kit/releases/0.31.10 - Updated to `hanji@0.0.8` - native bun `stringWidth`, `stripANSI` support, errors for non-TTY environments - We've migrated away from `esbuild-register` to `tsx` loader, it will now allow to use `drizzle-kit` seamlessly with both `ESM` and `CJS` modules - We've also added native `Bun` and `Deno` launch support, which will not trigger `tsx` loader and utilise native `bun` and `deno` imports capabilities and faster startup times ### 0.31.9 - Date: 2026-02-09 - Version: 0.31.9 - Original notes: https://github.com/drizzle-team/drizzle-orm/releases/tag/drizzle-kit%400.31.9 - Permalink: https://whatsnew.fyi/product/drizzle-kit/releases/0.31.9 - drizzle-kit api improvements for D1 connections ### 0.31.8 - Date: 2025-12-04 - Version: 0.31.8 - Original notes: https://github.com/drizzle-team/drizzle-orm/releases/tag/drizzle-kit%400.31.8 - Permalink: https://whatsnew.fyi/product/drizzle-kit/releases/0.31.8 ###### Bug fixes - Fixed `algorythm` => `algorithm` typo. - Fixed external dependencies in build configuration. ### 0.31.6 - Date: 2025-10-28 - Version: 0.31.6 - Original notes: https://github.com/drizzle-team/drizzle-orm/releases/tag/drizzle-kit%400.31.6 - Permalink: https://whatsnew.fyi/product/drizzle-kit/releases/0.31.6 ###### Bug fixes - [[BUG]: Importing drizzle-kit/api fails in ESM modules](https://github.com/drizzle-team/drizzle-orm/issues/2853) ### 0.31.5 - Date: 2025-09-26 - Version: 0.31.5 - Original notes: https://github.com/drizzle-team/drizzle-orm/releases/tag/drizzle-kit%400.31.5 - Permalink: https://whatsnew.fyi/product/drizzle-kit/releases/0.31.5 - Add casing support to studio configuration and related functions ### 0.31.4 - Date: 2025-06-27 - Version: 0.31.4 - Original notes: https://github.com/drizzle-team/drizzle-orm/releases/tag/drizzle-kit%400.31.4 - Permalink: https://whatsnew.fyi/product/drizzle-kit/releases/0.31.4 - Fixed `halfvec`, `bit` and `sparsevec` type generation bug in drizzle-kit ### 0.31.3 - Date: 2025-06-26 - Version: 0.31.3 - Original notes: https://github.com/drizzle-team/drizzle-orm/releases/tag/drizzle-kit%400.31.3 - Permalink: https://whatsnew.fyi/product/drizzle-kit/releases/0.31.3 - Internal changes to Studio context. Added `databaseName` and `packageName` properties for Studio ### 0.31.2 - Date: 2025-06-23 - Version: 0.31.2 - Original notes: https://github.com/drizzle-team/drizzle-orm/releases/tag/drizzle-kit%400.31.2 - Permalink: https://whatsnew.fyi/product/drizzle-kit/releases/0.31.2 ###### Bug fixes - Fixed relations extraction to not interfere with Drizzle Studio. ### 0.31.1 - Date: 2025-05-03 - Version: 0.31.1 - Original notes: https://github.com/drizzle-team/drizzle-orm/releases/tag/drizzle-kit%400.31.1 - Permalink: https://whatsnew.fyi/product/drizzle-kit/releases/0.31.1 ###### Fixed `drizzle-kit pull` bugs when using Gel extensions. Because Gel extensions create schema names containing `::` (for example, `ext::auth`), Drizzle previously handled these names incorrectly. Starting with this release, you can use Gel extensions without any problems. Here’s what you should do: 1. Enable extensions schemas in `drizzle.config.ts` ```ts import { defineConfig } from "drizzle-kit"; export default defineConfig({ dialect: 'gel', schemaFilter: ['ext::auth', 'public'] }); ``` 2. Run `drizzle-kit pull` 3. Done! ### 0.31.0 - Date: 2025-04-15 - Version: 0.31.0 - Original notes: https://github.com/drizzle-team/drizzle-orm/releases/tag/drizzle-kit%400.31.0 - Permalink: https://whatsnew.fyi/product/drizzle-kit/releases/0.31.0 ##### Features and improvements ###### Enum DDL improvements For situations where you drop an `enum` value or reorder values in an `enum`, there is no native way to do this in PostgreSQL. To handle these cases, `drizzle-kit` used to: - Change the column data types from the enum to text - Drop the old enum - Add the new enum - Change the column data types back to the new enum However, there were a few scenarios that weren’t covered: `PostgreSQL` wasn’t updating default expressions for columns when their data types changed Therefore, for cases where you either change a column’s data type from an `enum` to some other type, drop an `enum` value, or reorder `enum` values, we now do the following: - Change the column data types from the enum to text - Set the default using the ::text expression - Drop the old enum - Add the new enum - Change the column data types back to the new enum - Set the default using the :: expression ###### `esbuild` version upgrade For `drizzle-kit` we upgraded the version to latest (`0.25.2`), thanks @paulmarsicloud ##### Bug fixes - [[BUG]: Error on Malformed Array Literal](https://github.com/drizzle-team/drizzle-orm/issues/2715) - thanks @Kratious - [[BUG]: Postgres drizzle-kit: Error while pulling indexes from a table with json/jsonb deep field index](https://github.com/drizzle-team/drizzle-orm/issues/2744) - thanks @Kratious - [goog-vulnz flags CVE-2024-24790 in esbuild 0.19.7](https://github.com/drizzle-team/drizzle-orm/issues/4045) ### 0.30.6 - Date: 2025-03-27 - Version: 0.30.6 - Original notes: https://github.com/drizzle-team/drizzle-orm/releases/tag/drizzle-kit%400.30.6 - Permalink: https://whatsnew.fyi/product/drizzle-kit/releases/0.30.6 ###### Bug fixes - [[BUG]: d1 push locally is not working](https://github.com/drizzle-team/drizzle-orm/issues/4099) - thanks @mabels and @RomanNabukhotnyi - [[BUG] Cloudflare D1: drizzle-kit push is not working (error 7500 SQLITE_AUTH)](https://github.com/drizzle-team/drizzle-orm/issues/3728) - thanks @mabels and @RomanNabukhotnyi ### 0.30.5 - Date: 2025-02-25 - Version: 0.30.5 - Original notes: https://github.com/drizzle-team/drizzle-orm/releases/tag/drizzle-kit%400.30.5 - Permalink: https://whatsnew.fyi/product/drizzle-kit/releases/0.30.5 #### New Features ##### Added `Gel` dialect support and `gel-js` client support Drizzle is getting a new `Gel` dialect with its own types and Gel-specific logic. In this first iteration, almost all query-building features have been copied from the `PostgreSQL` dialect since Gel is fully PostgreSQL-compatible. The only change in this iteration is the data types. The Gel dialect has a different set of available data types, and all mappings for these types have been designed to avoid any extra conversions on Drizzle's side. This means you will insert and select exactly the same data as supported by the Gel protocol. Drizzle + Gel integration will work only through `drizzle-kit pull`. Drizzle won't support `generate`, `migrate`, or `push` features in this case. Instead, drizzle-kit is used solely to pull the Drizzle schema from the Gel database, which can then be used in your `drizzle-orm` queries. The Gel + Drizzle workflow: 1. Use the `gel` CLI to manage your schema. 2. Use the `gel` CLI to generate and apply migrations to the database. 3. Use drizzle-kit to pull the Gel database schema into a Drizzle schema. 4. Use drizzle-orm with gel-js to query the Gel database. On the drizzle-kit side you can now use `dialect: "gel"` ```ts // drizzle.config.ts import { defineConfig } from 'drizzle-kit'; export default defineConfig({ dialect: 'gel', }); ``` For a complete Get Started tutorial you can use our new guides: - [Get Started with Drizzle and Gel in a new project](https://orm.drizzle.team/docs/get-started/gel-new) - [Get Started with Drizzle and Gel in a existing project](https://orm.drizzle.team/docs/get-started/gel-existing) ### 0.30.4 - Date: 2025-01-29 - Version: 0.30.4 - Original notes: https://github.com/drizzle-team/drizzle-orm/releases/tag/drizzle-kit%400.30.4 - Permalink: https://whatsnew.fyi/product/drizzle-kit/releases/0.30.4 - Fix bug that generates incorrect syntax when introspect in mysql - Fix a bug that caused incorrect syntax output when introspect in unsigned columns ### 0.30.3 - Date: 2025-01-27 - Version: 0.30.3 - Original notes: https://github.com/drizzle-team/drizzle-orm/releases/tag/drizzle-kit%400.30.3 - Permalink: https://whatsnew.fyi/product/drizzle-kit/releases/0.30.3 #### SingleStore `push` and `generate` improvements As SingleStore did not support certain DDL statements before this release, you might encounter an error indicating that some schema changes cannot be applied due to a database issue. Starting from this version, drizzle-kit will detect such cases and initiate table recreation with data transfer between the tables #### Bug fixes - [[BUG] If the index name is the same as the generated name, it will be empty and a type error will occur](https://github.com/drizzle-team/drizzle-orm/issues/3420) ### 0.30.2 - Date: 2025-01-16 - Version: 0.30.2 - Original notes: https://github.com/drizzle-team/drizzle-orm/releases/tag/drizzle-kit%400.30.2 - Permalink: https://whatsnew.fyi/product/drizzle-kit/releases/0.30.2 - Fix certificates generation utility for Drizzle Studio; [[BUG]: [drizzle-kit]: drizzle-kit dependency on drizzle-studio perms error](https://github.com/drizzle-team/drizzle-orm/issues/3729) ### 0.30.1 - Date: 2024-12-13 - Version: 0.30.1 - Original notes: https://github.com/drizzle-team/drizzle-orm/releases/tag/drizzle-kit%400.30.1 - Permalink: https://whatsnew.fyi/product/drizzle-kit/releases/0.30.1 #### New Features ###### `drizzle-kit export` To make drizzle-kit integration with other migration tools, like Atlas much easier, we've prepared a new command called `export`. It will translate your drizzle schema in SQL representation(DDL) statements and outputs to the console ```ts // schema.ts import { pgTable, serial, text } from 'drizzle-orm/pg-core' export const users = pgTable('users', { id: serial('id').primaryKey(), email: text('email').notNull(), name: text('name') }); ``` Running ```bash npx drizzle-kit export ``` will output this string to console ```bash CREATE TABLE "users" ( "id" serial PRIMARY KEY NOT NULL, "email" text NOT NULL, "name" text ); ``` By default, the only option for now is `--sql`, so the output format will be SQL DDL statements. In the future, we will support additional output formats to accommodate more migration tools ```bash npx drizzle-kit export --sql ``` ### 0.30.0 - Date: 2024-12-09 - Version: 0.30.0 - Original notes: https://github.com/drizzle-team/drizzle-orm/releases/tag/drizzle-kit%400.30.0 - Permalink: https://whatsnew.fyi/product/drizzle-kit/releases/0.30.0 Starting from this update, the PostgreSQL dialect will align with the behavior of all other dialects. It will no longer include `IF NOT EXISTS`, `$DO`, or similar statements, which could cause incorrect DDL statements to not fail when an object already exists in the database and should actually fail. This change marks our first step toward several major upgrades we are preparing: - An updated and improved migration workflow featuring commutative migrations, a revised folder structure, and enhanced collaboration capabilities for migrations. - Better support for Xata migrations. - Compatibility with CockroachDB (achieving full compatibility will only require removing serial fields from the migration folder). ### 0.29.1 - Date: 2024-12-04 - Version: 0.29.1 - Original notes: https://github.com/drizzle-team/drizzle-orm/releases/tag/drizzle-kit%400.29.1 - Permalink: https://whatsnew.fyi/product/drizzle-kit/releases/0.29.1 - Fix SingleStore generate migrations command ### 0.29.0 - Date: 2024-12-03 - Version: 0.29.0 - Original notes: https://github.com/drizzle-team/drizzle-orm/releases/tag/drizzle-kit%400.29.0 - Permalink: https://whatsnew.fyi/product/drizzle-kit/releases/0.29.0 #### New Dialects ###### 🎉 `SingleStore` dialect is now available in Drizzle Thanks to the SingleStore team for creating a PR with all the necessary changes to support the MySQL-compatible part of SingleStore. You can already start using it with Drizzle. The SingleStore team will also help us iterate through updates and make more SingleStore-specific features available in Drizzle ```ts import 'dotenv/config'; import { defineConfig } from 'drizzle-kit'; export default defineConfig({ dialect: 'singlestore', out: './drizzle', schema: './src/db/schema.ts', dbCredentials: { url: process.env.DATABASE_URL!, }, }); ``` You can check out our [Getting started guides](https://orm.drizzle.team/docs/get-started/singlestore-new) to try SingleStore! #### New Drivers ###### 🎉 `SQLite Durable Objects` driver is now available in Drizzle You can now query SQLite Durable Objects in Drizzle! For the full example, please check our [Get Started](https://orm.drizzle.team/docs/get-started/do-new) Section ```ts import 'dotenv/config'; import { defineConfig } from 'drizzle-kit'; export default defineConfig({ out: './drizzle', schema: './src/db/schema.ts', dialect: 'sqlite', driver: 'durable-sqlite', }); ``` ### 0.28.1 - Date: 2024-11-14 - Version: 0.28.1 - Original notes: https://github.com/drizzle-team/drizzle-orm/releases/tag/drizzle-kit%400.28.1 - Permalink: https://whatsnew.fyi/product/drizzle-kit/releases/0.28.1 #### Bug fixes - Fixed typos in repository: thanks @armandsalle, @masto, @wackbyte, @Asher-JH, @MaxLeiter - [fix: wrong dialect set in mysql/sqlite introspect](https://github.com/drizzle-team/drizzle-orm/pull/2865) ### 0.28.0 - Date: 2024-11-06 - Version: 0.28.0 - Original notes: https://github.com/drizzle-team/drizzle-orm/releases/tag/drizzle-kit%400.28.0 - Permalink: https://whatsnew.fyi/product/drizzle-kit/releases/0.28.0 #### Improvements - Added an OHM static imports checker to identify unexpected imports within a chain of imports in the drizzle-kit repo. For example, it checks if drizzle-orm is imported before drizzle-kit and verifies if the drizzle-orm import is available in your project. - [Adding more columns to Supabase auth.users table schema](https://github.com/drizzle-team/drizzle-orm/issues/3327) - thanks @nicholasdly #### Bug Fixes - [[BUG]: [drizzle-kit]: Fix breakpoints option cannot be disabled](https://github.com/drizzle-team/drizzle-orm/issues/2828) - thanks @klotztech - [[BUG]: drizzle-kit introspect: SMALLINT import missing and incorrect DECIMAL UNSIGNED handling](https://github.com/drizzle-team/drizzle-orm/issues/2950) - thanks @L-Mario564 - [Unsigned tinyints preventing migrations](https://github.com/drizzle-team/drizzle-orm/issues/1571) - thanks @L-Mario564 - [[BUG]: Can't parse float(8,2) from database (precision and scale and/or unsigned breaks float types)](https://github.com/drizzle-team/drizzle-orm/issues/3285) - thanks @L-Mario564 - [[BUG]: PgEnum generated migration doesn't escape single quotes](https://github.com/drizzle-team/drizzle-orm/issues/1272) - thanks @L-Mario564 - [[BUG]: single quote not escaped correctly in migration file](https://github.com/drizzle-team/drizzle-orm/issues/2184) - thanks @L-Mario564 - [[BUG]: Migrations does not escape single quotes](https://github.com/drizzle-team/drizzle-orm/issues/1765) - thanks @L-Mario564 - [[BUG]: Issue with quoted default string values](https://github.com/drizzle-team/drizzle-orm/issues/2122) - thanks @L-Mario564 - [[BUG]: SQl commands in wrong roder](https://github.com/drizzle-team/drizzle-orm/issues/2390) - thanks @L-Mario564 - [[BUG]: Time with precision in drizzle-orm/pg-core adds double-quotes around type](https://github.com/drizzle-team/drizzle-orm/issues/1804) - thanks @L-Mario564 - [[BUG]: Postgres push fails due to lack of quotes](https://github.com/drizzle-team/drizzle-orm/issues/2396) - thanks @L-Mario564 - [[BUG]: TypeError: Cannot read properties of undefined (reading 'compositePrimaryKeys')](https://github.com/drizzle-team/drizzle-orm/issues/2344) - thanks @L-Mario564 - [[BUG]: drizzle-kit introspect generates CURRENT_TIMESTAMP without sql operator on date column](https://github.com/drizzle-team/drizzle-orm/issues/2899) - thanks @L-Mario564 - [[BUG]: Drizzle-kit introspect doesn't pull correct defautl statement](https://github.com/drizzle-team/drizzle-orm/issues/2905) - thanks @L-Mario564 - [[BUG]: Problem on MacBook - This statement does not return data. Use run() instead](https://github.com/drizzle-team/drizzle-orm/issues/2623) - thanks @L-Mario564 - [[BUG]: Enum column names that are used as arrays are not quoted](https://github.com/drizzle-team/drizzle-orm/issues/2598) - thanks @L-Mario564 - [[BUG]: drizzle-kit generate ignores index operators](https://github.com/drizzle-team/drizzle-orm/issues/2935) - thanks @L-Mario564 - [dialect param config error message is wrong](https://github.com/drizzle-team/drizzle-orm/issues/3427) - thanks @L-Mario564 - [[BUG]: Error setting default enum field values](https://github.com/drizzle-team/drizzle-orm/issues/2299) - thanks @L-Mario564 - [[BUG]: drizzle-kit does not respect the order of columns configured in primaryKey()](https://github.com/drizzle-team/drizzle-orm/issues/2326) - thanks @L-Mario564 - [[BUG]: Cannot drop Unique Constraint MySQL](https://github.com/drizzle-team/drizzle-orm/issues/998) - thanks @L-Mario564 ### 0.27.2 - Date: 2024-11-06 - Version: 0.27.2 - Original notes: https://github.com/drizzle-team/drizzle-orm/releases/tag/drizzle-kit%400.27.2 - Permalink: https://whatsnew.fyi/product/drizzle-kit/releases/0.27.2 - Fix [[BUG]: Undefined properties when using drizzle-kit push](https://github.com/drizzle-team/drizzle-orm/issues/3391) - Fix TypeError: Cannot read properties of undefined (reading 'isRLSEnabled') - Fix push bugs, when pushing a schema with linked policy to a table from `drizzle-orm/supabase` ### 0.27.1 - Date: 2024-11-01 - Version: 0.27.1 - Original notes: https://github.com/drizzle-team/drizzle-orm/releases/tag/drizzle-kit%400.27.1 - Permalink: https://whatsnew.fyi/product/drizzle-kit/releases/0.27.1 - Fix: [[BUG]: When using RLS policies and Views, the view is the last clause generated](https://github.com/drizzle-team/drizzle-orm/issues/3378) ### 0.27.0 - Date: 2024-10-30 - Version: 0.27.0 - Original notes: https://github.com/drizzle-team/drizzle-orm/releases/tag/drizzle-kit%400.27.0 - Permalink: https://whatsnew.fyi/product/drizzle-kit/releases/0.27.0 > This version of `drizzle-jit` requires `drizzle-orm@0.36.0` to enable all new features #### New Features ##### Row-Level Security (RLS) With Drizzle, you can enable Row-Level Security (RLS) for any Postgres table, create policies with various options, and define and manage the roles those policies apply to. Drizzle supports a raw representation of Postgres policies and roles that can be used in any way you want. This works with popular Postgres database providers such as `Neon` and `Supabase`. In Drizzle, we have specific predefined RLS roles and functions for RLS with both database providers, but you can also define your own logic. ###### Enable RLS If you just want to enable RLS on a table without adding policies, you can use `.enableRLS()` As mentioned in the PostgreSQL documentation: > If no policy exists for the table, a default-deny policy is used, meaning that no rows are visible or can be modified. Operations that apply to the whole table, such as TRUNCATE and REFERENCES, are not subject to row security. ```ts import { integer, pgTable } from 'drizzle-orm/pg-core'; export const users = pgTable('users', { id: integer(), }).enableRLS(); ``` > If you add a policy to a table, RLS will be enabled automatically. So, there’s no need to explicitly enable RLS when adding policies to a table. ###### Roles Currently, Drizzle supports defining roles with a few different options, as shown below. Support for more options will be added in a future release. ```ts import { pgRole } from 'drizzle-orm/pg-core'; export const admin = pgRole('admin', { createRole: true, createDb: true, inherit: true }); ``` If a role already exists in your database, and you don’t want drizzle-kit to ‘see’ it or include it in migrations, you can mark the role as existing. ```ts import { pgRole } from 'drizzle-orm/pg-core'; export const admin = pgRole('admin').existing(); ``` ###### Policies To fully leverage RLS, you can define policies within a Drizzle table. > In PostgreSQL, policies should be linked to an existing table. Since policies are always associated with a specific table, we decided that policy definitions should be defined as a parameter of `pgTable` **Example of pgPolicy with all available properties** ```ts import { sql } from 'drizzle-orm'; import { integer, pgPolicy, pgRole, pgTable } from 'drizzle-orm/pg-core'; export const admin = pgRole('admin'); export const users = pgTable('users', { id: integer(), }, (t) => [ pgPolicy('policy', { as: 'permissive', to: admin, for: 'delete', using: sql``, withCheck: sql``, }), ]); ``` **Link Policy to an existing table** There are situations where you need to link a policy to an existing table in your database. The most common use case is with database providers like `Neon` or `Supabase`, where you need to add a policy to their existing tables. In this case, you can use the `.link()` API ```ts import { sql } from "drizzle-orm"; import { pgPolicy } from "drizzle-orm/pg-core"; import { authenticatedRole, realtimeMessages } from "drizzle-orm/supabase"; export const policy = pgPolicy("authenticated role insert policy", { for: "insert", to: authenticatedRole, using: sql``, }).link(realtimeMessages); ``` ###### Migrations If you are using drizzle-kit to manage your schema and roles, there may be situations where you want to refer to roles that are not defined in your Drizzle schema. In such cases, you may want drizzle-kit to skip managing these roles without having to define each role in your drizzle schema and marking it with `.existing()`. In these cases, you can use `entities.roles` in `drizzle.config.ts`. For a complete reference, refer to the the [`drizzle.config.ts`](https://orm.drizzle.team/docs/drizzle-config-file) documentation. By default, `drizzle-kit` does not manage roles for you, so you will need to enable this feature in `drizzle.config.ts`. ```ts {12-14} // drizzle.config.ts import { defineConfig } from "drizzle-kit"; export default def _[Truncated at 4000 characters — full notes: https://github.com/drizzle-team/drizzle-orm/releases/tag/drizzle-kit%400.27.0]_ ### 0.26.2 - Date: 2024-10-16 - Version: 0.26.2 - Original notes: https://github.com/drizzle-team/drizzle-orm/releases/tag/drizzle-kit%400.26.2 - Permalink: https://whatsnew.fyi/product/drizzle-kit/releases/0.26.2 - Updated internal versions for the drizzle-kit and drizzle-orm packages. Changes were introduced in the last minor release, and you are required to upgrade both packages to ensure they work as expected