Become a Gold Sponsor

Migrations with Drizzle Kit

This guide assumes familiarity with:

Drizzle lets you generate empty migration files to write your own custom SQL migrations for DDL alternations currently not supported by Drizzle Kit or data seeding, which you can then run with drizzle-kit migrate command.

drizzle-kit generate --custom --name=seed-users
📦 <project root>
 ├ 📂 drizzle
 │ ├ 📂 _meta
 │ ├ 📜 0000_init.sql 
 │ └ 📜 0001_seed-users.sql 
 ├ 📂 src
 └ …
-- ./drizzle/0001_seed-users.sql

INSERT INTO "users" ("name") VALUES('Dan');
INSERT INTO "users" ("name") VALUES('Andrew');
INSERT INTO "users" ("name") VALUES('Dandrew');

Running JavaScript and TypeScript migrations

We will add ability to run custom JavaScript and TypeScript migration/seeding scripts in the upcoming release, you can follow github discussion.