Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Turso Dialect #304

Open
danniscript opened this issue Nov 14, 2024 · 5 comments
Open

Support for Turso Dialect #304

danniscript opened this issue Nov 14, 2024 · 5 comments

Comments

@danniscript
Copy link

danniscript commented Nov 14, 2024

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

@rakis10
Copy link

rakis10 commented Nov 16, 2024

@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'

@danniscript
Copy link
Author

danniscript commented Nov 16, 2024

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'
})

@rakis10
Copy link

rakis10 commented Nov 16, 2024

that could be issue cli currently generates package.json

	"drizzle-kit": "^0.23.0",

which possibly doesnt satisfy dialect : turso

@manuel3108
Copy link
Member

manuel3108 commented Nov 16, 2024

Updating the dependencies used while scaffolding is on our priority list!

@rakis10
Copy link

rakis10 commented Nov 16, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants