src/content/docs/kit-custom-migrations.mdx
import CodeTab from '@mdx/CodeTab.astro'; import CodeTabs from '@mdx/CodeTabs.astro'; import Section from '@mdx/Section.astro'; import Tab from '@mdx/Tab.astro'; import Tabs from '@mdx/Tabs.astro'; import Callout from '@mdx/Callout.astro'; import Npm from '@mdx/Npm.astro'; import Npx from '@mdx/Npx.astro'; import Steps from '@mdx/Steps.astro'; import Prerequisites from "@mdx/Prerequisites.astro"
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
INSERT INTO "users" ("name") VALUES('Dan'); INSERT INTO "users" ("name") VALUES('Andrew'); INSERT INTO "users" ("name") VALUES('Dandrew');
</Section>
### 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](https://github.com/drizzle-team/drizzle-orm/discussions/2832).