-
Notifications
You must be signed in to change notification settings - Fork 17
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
Add driver
back to drizzle.config
#422
Comments
+1 |
@lirc571 @rghamilton3 please let me know what are the issues with that, those 2 drivers should be 100% compatible with each other |
@AlexBlokh I can no longer use a sqlite db file with the libsql driver:
The config looks like: import { defineConfig } from 'drizzle-kit'
export default defineConfig({
schema: "./schema.ts",
dialect: 'sqlite',
dbCredentials: {
url: "data/my_db.db",
},
verbose: true,
strict: true,
}) |
@AlexBlokh you can disregard me. My issue was with a typo in the generated schema and a table name. I'm not sure if I some how messed up the generated schema without noticing (most likely) but everything works now. I'll open a new issue if that generated schema issue is repeatable. |
@AlexBlokh I documented this same issue in #399 . The current logic in |
@lirc571 I've added automatic prefixing of just so we're on the same page - here's the reasoning behind this patch, thus we wanna omit any other |
@AlexBlokh I agree that making I am also fine with making When there are multiple |
@lirc571 please let me know the use case for having 2 drivers and occasionally choose particular one for different scenarios(taking in count we gonna make the cross compatible in all scenarios and if not - extract to removing dialect is not an option for us, first - it's going to be harder for newcomers/less experienced developers, second - for a majority of commands driver is optional, as opposed to dialect |
In a monorepo setup, we can have different applications that use different drivers. Let's say existing apps are all using the |
fixed in |
Hi @AndriiSherman @AlexBlokh, according to the changelog, it seems that drizzle-kit is still choosing the driver for us and there is no option to select a driver of our choice, so it does not solve the root issue @greg-hammond and I raised: we would like to have an option to specify the driver (the driver option can be optional, but should not be removed), so that the use case below can be satisfied.
|
With the recent updates in drizzle-kit, it is now impossible to select a driver when multiple drivers for the same dialect are installed.
E.g. in a mono-repo setup, I have both
@libsql/client
andbetter-sqlite3
installed (used in different packages), but I can no longer usebetter-sqlite3
because@libsql/client
is selected by default whendialect
is set tosqlite
.The text was updated successfully, but these errors were encountered: