Apply migrations directly from code without the CLI #4344
Unanswered
Nikola-Milovic
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The title might be a bit messy, so let me clarify. I'm working on a React Native app that uses SQLite along with Drizzle. My goal is to test some fairly complex queries and interactions, which means I need to spin up an SQLite instance and apply migrations in a test environment.
In my other projects, I usually generate the schema ahead of time using drizzle generate, but in this case, I'd prefer to handle everything programmatically—ideally applying the migrations directly from code, without relying on CLI tools.
Is there a way to do that with Drizzle? Or any recommended approach for running migrations and setting up an SQLite DB entirely from within the app or test code?
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions