Replies: 1 comment
-
|
If you don't strictly need to run migrations from the cli you can avoid the need for drizzle-kit by invoking import { drizzle } from 'drizzle-orm/node-sqlite';
import { migrate } from 'drizzle-orm/node-sqlite/migrator';
// create your db
const db = drizzle(':memory:', yourDrizzleOptions);
// in some other function where you can await...
await migrate(db, {migrationsFolder: '/path/to/migrations/folder'});edit: should mention i am running one of the unstable 1.0.0 releases but I think this should work on stable too. |
Beta Was this translation helpful? Give feedback.
0 replies
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.
-
Currently, in order to run migration in production, we need to install the whole drizzle-kit package.
If the functionality of running migrations could be available in an independent package, such as
@drizzle/migrate, then it would hopefully reduce the bundle size for production, while also reducing the attack surface.Beta Was this translation helpful? Give feedback.
All reactions