We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hey, guys!
I'm using drizzle with libsql, and due to some constraints I cannot use drizzle-kit push to run migrations.
drizzle-kit push
I know some drizzle packages have the migrate function which you can use to run migrations programmatically, something lile:
migrate
import { drizzle } from 'drizzle-orm/node-postgres' import { migrate } from 'drizzle-orm/node-postgres/migrator' import { Pool } from 'pg' import { Resource } from 'sst' export const handler = async () => { const pool = new Pool({ user: Resource.RDS.username, password: Resource.RDS.password, database: Resource.RDS.database, host: Resource.RDS.host, port: Resource.RDS.port, }) const db = drizzle(pool) try { await migrate(db, { migrationsFolder: './migrations' }) return { statusCode: 200, body: JSON.stringify({ message: 'Migrations completed successfully.' }), } } catch (err: any) { return { statusCode: 500, body: JSON.stringify({ message: 'Migration failed.', error: err.message, }), } } }
And I can't seem to find the migrate function on drizzle libsql package:
import { drizzle } from "drizzle-orm/libsql"
is it possible to do that with libsql?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hey, guys!
I'm using drizzle with libsql, and due to some constraints I cannot use
drizzle-kit push
to run migrations.I know some drizzle packages have the
migrate
function which you can use to run migrations programmatically, something lile:And I can't seem to find the
migrate
function on drizzle libsql package:import { drizzle } from "drizzle-orm/libsql"
is it possible to do that with libsql?
The text was updated successfully, but these errors were encountered: