New drizzle-kit config and Plugins API #5201
AndriiSherman
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
While working on v1, we realized that this would be a great time to upgrade the
drizzle-kitconfig, remove legacy commands, and introduceplugins. These plugins would extenddrizzle-kitby hooking into kit lifecycles and controlling how the generate, migrate, pull, and push commands workThis discussion aims to showcase our thoughts on the updated config and
plugin api, along with all the possible lifecycle hooks we can think of as needed. We’d love to hear feedback and get ideas on how to improve itOld
drizzle-kitconfig optionsNew
drizzle-kitconfig optionsSo we will get a set of changes in the config:
"strict": truewill be enabled by default and removed from the config.extensionsFilters,tablesFilter, andschemaFilterwill be extended and moved underentities. This API will reproduce different settings for thedatabase entitiesyou may haveschemasandtableswill get 1 more api option - callback. You can add custom logic for filtering specific tables, views or schemas.Plugins API
This API is inspired by Astro integrations, and we’ve used the main API ideas from there. Here is an example of how you would define the
introspectimplementation.DrizzlePlugin will have plugin
nameand differenthooksimplementations you want to defineHere is a list of possible hooks we want to expose (together with their use cases)
Beta Was this translation helpful? Give feedback.
All reactions