1001Ferramentas
💧Dev

Drizzle Init Generator

Generates a drizzle.config.ts for the Drizzle ORM with the PostgreSQL dialect, ready for migrations. Copy the file and set up your type-safe schema.



  

The file Drizzle Kit actually reads

drizzle.config.ts is tiny and still breaks easily. The key changed from driver to dialect between drizzle-kit releases, the schema path has to match the real file, and out decides where the generated SQL lands. Get one of them wrong and generate either fails or writes an empty migration without explaining why. This page hands you the file in the current format.

There is nothing to configure: the text is fixed, it is already on screen when you arrive, and the button redraws the same block. Despite what the tool description suggests, there is no Postgres/SQLite switch here, and the output always says dialect: 'postgresql'. For SQLite, change that value to 'sqlite' and point the url inside dbCredentials at a local .db file rather than a connection string.

Make sure your drizzle-kit is 0.21 or newer, since older releases expect driver instead of dialect and reject this config outright. The exclamation mark in DATABASE_URL! is a TypeScript assertion, so a missing variable at runtime gives you undefined instead of a clear error. Remember this file only serves the CLI (generate, migrate, studio); your app still builds its own client. Generated in the browser.

Frequently asked questions

Does the tool output a SQLite version?
No, it always emits postgresql. The description promises a choice, but the page has no selector, so change dialect and dbCredentials yourself.
Does this file connect my app to the database?
No. drizzle-kit reads it to generate and apply migrations. In your code you still create the client (pg, postgres.js, neon) and pass it to drizzle().
Where do the migrations end up?
In ./drizzle, set by the out key. Change it to db/migrations or anything else; drizzle-kit creates the folder on the first generate.

Related Tools