this.client.migrate is not a function

Here's my drizzle.config.ts:
import { defineConfig } from 'drizzle-kit';
if (!process.env.DATABASE_URL) throw new Error('DATABASE_URL is not set');

export default defineConfig({
schema: './src/lib/server/db/schema.ts',

dbCredentials: {
url: process.env.DATABASE_URL
},

verbose: true,
strict: true,
dialect: 'sqlite'
});
import { defineConfig } from 'drizzle-kit';
if (!process.env.DATABASE_URL) throw new Error('DATABASE_URL is not set');

export default defineConfig({
schema: './src/lib/server/db/schema.ts',

dbCredentials: {
url: process.env.DATABASE_URL
},

verbose: true,
strict: true,
dialect: 'sqlite'
});
And here's my schema file:
import { sqliteTable, text } from "drizzle-orm/sqlite-core";

export const slackSessionsTable = sqliteTable("slack_sessions", {
sessionId: text().primaryKey(),
userId: text().notNull(),
name: text().notNull(),
firstName: text().notNull(),
pfp: text().notNull(),
email: text().notNull(),
});

export type SlackSession = typeof slackSessionsTable.$inferSelect;
import { sqliteTable, text } from "drizzle-orm/sqlite-core";

export const slackSessionsTable = sqliteTable("slack_sessions", {
sessionId: text().primaryKey(),
userId: text().notNull(),
name: text().notNull(),
firstName: text().notNull(),
pfp: text().notNull(),
email: text().notNull(),
});

export type SlackSession = typeof slackSessionsTable.$inferSelect;
When I run drizzle-kit generate everything is fine, but when I run drizzle-kit migrate, I get this error:
[⣷] applying migrations...TypeError: this.client.migrate is not a function
at LibSQLSession.migrate (/home/skyfall/Projects/high-seas-sveltekit/node_modules/src/libsql/session.ts:90:42)
at migrate (/home/skyfall/Projects/high-seas-sveltekit/node_modules/src/libsql/migrator.ts:46:19)
[⣷] applying migrations...TypeError: this.client.migrate is not a function
at LibSQLSession.migrate (/home/skyfall/Projects/high-seas-sveltekit/node_modules/src/libsql/session.ts:90:42)
at migrate (/home/skyfall/Projects/high-seas-sveltekit/node_modules/src/libsql/migrator.ts:46:19)
How can I fix this?
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?