Apply migrations directly from code without the CLI #4344
-
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.
Replies: 1 comment
-
See if these are of any help: |
Beta Was this translation helpful? Give feedback.
See if these are of any help: