Error 7500: not authorized: SQLITE_AUTH
Hello!
Has anyone had this before?
I'm running Drizzle with Cloudflare D1, when I do
drizzle-kit push
I get this error
Which is weird because when I do drizzle-kit generate
and migrate
I don't see this error
15 Replies
Error: 7500: not authorized: SQLITE_AUTH
I couldn't find anything on it
Also, I'm running this in an npm workspace
I'm getting the exact same error like you. It seems drizzle-kit push is broken.
I dug into the drizzle-kit code in node_modules and found that the error is thrown when trying to make this query to the database
It's after I select and say "user_table" is created not replaced
right
and I cannot downgrade to 0.25.0
because I'll get this error
D:
It seems like a bug. Would you mind submit an issue in their repo?
Sir after many hours I may have found a solution,
go to your
drizzle.config.ts
file and add this to your config
tablesFilter: ['/^(?!.*_cf_KV).*$/']
this should make the push command "ignore" the _cf_KV table, and your migrations SHOULD apply correctly
i hope
something else eventually goes wrong, I think I'm done for today 😄You need to add D1 for your token 🙌
hmmm not sure what you mean sir 😃
have you successfully done
drizzle-kit push
for D1 local before? 🙏Yes 😅 but only for the first time
owh! then after that you get the same error as me?
SQLITE_AUTH error?
I didn't have D1 scope set for my Cloudflare token if you select Worker token there is missing D1 scope for working with databases.
okay okay, so after selecting D1 scope you are able to drizzzle-kit push?
any luck anyone? having same issue
This worked for me