this.client.migrate is not a function
Here's my drizzle.config.ts:
And here's my schema file:
When I run
How can I fix this?
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'
});
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;
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)
0 Replies