nightwatch128
nightwatch128
Explore posts from servers
DTDrizzle Team
Created by nightwatch128 on 11/10/2024 in #help
TypeError: client.migrate
I am getting this error TypeError: client.migrate is not a function with Kysely + Drizzle Kit + Turso + Bun + Nextjs when I drizzle-kit push. My config (in the root of nextjs project):
import { defineConfig } from "drizzle-kit";

if (!process.env.TURSO_DATABASE_NAME) {
throw new Error("TURSO_DATABASE_NAME is missing");
}

if (!process.env.TURSO_ORG) {
throw new Error("TURSO_ORG is missing");
}

if (!process.env.TURSO_GROUP_AUTH_TOKEN) {
throw new Error("TURSO_GROUP_AUTH_TOKEN is missing");
}

const url = `libsql://${process.env.TURSO_DATABASE_NAME}-${process.env.TURSO_ORG}.turso.io`;

export default defineConfig({
schema: "./src/core/**/*.sql.ts",
out: "./src/migrations",
dialect: "turso",
dbCredentials: {
url,
authToken: process.env.TURSO_GROUP_AUTH_TOKEN,
},
});
import { defineConfig } from "drizzle-kit";

if (!process.env.TURSO_DATABASE_NAME) {
throw new Error("TURSO_DATABASE_NAME is missing");
}

if (!process.env.TURSO_ORG) {
throw new Error("TURSO_ORG is missing");
}

if (!process.env.TURSO_GROUP_AUTH_TOKEN) {
throw new Error("TURSO_GROUP_AUTH_TOKEN is missing");
}

const url = `libsql://${process.env.TURSO_DATABASE_NAME}-${process.env.TURSO_ORG}.turso.io`;

export default defineConfig({
schema: "./src/core/**/*.sql.ts",
out: "./src/migrations",
dialect: "turso",
dbCredentials: {
url,
authToken: process.env.TURSO_GROUP_AUTH_TOKEN,
},
});
3 replies