Open danniscript opened 3 days ago
@danniscript hello could please provide your drizzle.config.ts file?
i keep getting error:
Type '"turso"' is not assignable to type '"postgresql" | "mysql" | "sqlite"'.ts(2322) index.d.mts(113, 5): The expected type comes from property 'dialect' which is declared here on type 'Config'
Using drizzle-kit": "^0.28.1"
import { defineConfig } from 'drizzle-kit'
if (!process.env.DATABASE_URL) throw new Error('DATABASE_URL is not set')
export default defineConfig({
out: './migrations',
schema: './src/lib/server/schema',
dbCredentials: {
url: process.env.DATABASE_URL,
authToken: process.env.DATABASE_AUTH_TOKEN
},
verbose: true,
strict: true,
dialect: 'turso'
})
that could be issue cli currently generates package.json
"drizzle-kit": "^0.23.0",
which possibly doesnt satisfy dialect : turso
Updating the dependencies used while scaffolding is on our priority list!
this is weird: at https://orm.drizzle.team/docs/latest-releases latest drizzle-kit is 0.23.2
also i need to upgrade drizzle-orm to 0.36.3
and also install @libsql/client. I am not sure if it was in deps before.
but now it works
Add
dialect: 'turso'
in drizzle.config.ts files 👍ref: https://orm.drizzle.team/docs/tutorials/drizzle-with-turso
note: this is only relevant for the latest version of
drizzle-kit