Β© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Drizzle TeamDT
Drizzle Teamβ€’3y agoβ€’
8 replies
irelynx

How to add custom SQL queries during or after migration in drizzle schema?

Hi all. I would like to execute some SQL queries during (or after) migration. Is there a way how I can do it without calling SQL queries each time at application startup? In my use-case I am trying to make fixed partitions to improve performance, but that way can also be used to create custom and more complex indexes or event triggers.
Drizzle TeamJoin
The official Discord for all Drizzle related projects, such as Drizzle ORM, Drizzle Kit, Drizzle Studio and more!
11,879Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Define custom migration SQL for drizzle
Drizzle TeamDTDrizzle Team / help
2y ago
Is it possible to add custom SQL for migration
Drizzle TeamDTDrizzle Team / help
2y ago
How to debug Drizzle queries
Drizzle TeamDTDrizzle Team / help
3y ago
Drizzle Queries in Drizzle Studio
Drizzle TeamDTDrizzle Team / help
3y ago