Turso-drizzle db migration issue
Answered
Pacific sand lance posted this in #help-forum
Pacific sand lanceOP
There is my drizzle config :
I have a db:push command that triggger :
In my .env I have : TURSO_AUTH_TOKEN
TURSO_CONNECTION_URL
import 'dotenv/config'
import type { Config } from 'drizzle-kit'
export default {
schema: './db/schema.ts',
out: './migrations',
dialect: 'turso',
dbCredentials: {
url: process.env.TURSO_CONNECTION_URL!,
authToken: process.env.TURSO_AUTH_TOKEN!,
},
verbose: true,
strict: true,
} satisfies Config
I have a db:push command that triggger :
drizzle-kit push:sqlite --config ./drizzle.config.ts
Running the command get me this error : Invalid input Either "turso", "libsql", "better-sqlite" are available options for "--driver"
In my .env I have : TURSO_AUTH_TOKEN
TURSO_CONNECTION_URL
Answered by Pacific sand lance
updating drizzle-kit and drizzle-orm to the latest version did somehow fix it, but I encounter different issue now
better to open another ticket
better to open another ticket
17 Replies
you’ve added push:sqlite which is a invalid option
@Anay-208 | Ping in replies you’ve added push:sqlite which is a invalid option
Pacific sand lanceOP
thanks, I've tried "libsql" and "turso" instead, but both are not valid
Pacific sand lanceOP
already tested, it says that I can use driver AND --config in the same command
https://orm.drizzle.team/docs/drizzle-config-file
Config is supposd to be like this
Config is supposd to be like this
Pacific sand lanceOP
seems like I used an outdated version of the config
seems fine in fact...
Resolved?
Pacific sand lanceOP
nope, trying to see from the doc if anything differ from my configs
You're supposed to use
defineConfig
I believe@Anay-208 | Ping in replies You're supposed to use `defineConfig` I believe
Pacific sand lanceOP
in what way ?
Umm In docs, there was something different. Can't share it now as Cloudflare seems to have taken down Drizzle ORM
Its up, now.
basically here
basically here
Pacific sand lanceOP
have that error now :
error: unknown command 'push'
(Did you mean push:pg?)
Pacific sand lanceOP
updating drizzle-kit and drizzle-orm to the latest version did somehow fix it, but I encounter different issue now
better to open another ticket
better to open another ticket
Answer