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

Nuxt Devtools Hub Database SQL Runner doesn't create indexes #94

Open
ra-jeev opened this issue May 4, 2024 · 3 comments
Open

Nuxt Devtools Hub Database SQL Runner doesn't create indexes #94

ra-jeev opened this issue May 4, 2024 · 3 comments
Labels
bug Something isn't working upstream

Comments

@ra-jeev
Copy link
Contributor

ra-jeev commented May 4, 2024

Try creating a unique index using the Nuxt Devtools Hub Database SQL Runner.

E.g. the below query doesn't give any error, but doesn't create the index as well.

CREATE UNIQUE INDEX users_email_key ON users(email); 

Is there some way to run the wrangler commands to run D1 queries in the terminal in a NuxtHub project? To be specific, can I execute the below command for interacting with the local DB?

bunx wrangler d1 execute <db_name> --local --file=./schema.sql

If yes, then what should be the DB name? I tried default and ran the command from the root folder and got the below error:

✘ [ERROR] Couldn't find a D1 DB with the name or binding 'default' in wrangler.toml.

And running the command from .data/hub (with modified file path) folder creates a new local database (not visible to Nuxt Devtools).

Copy link
Contributor

Atinux commented May 15, 2024

This is an issue related to Drizzle Studio, I contacted the team and should be fixed very soon. Will keep you updated when fixed.

@Atinux Atinux added upstream bug Something isn't working labels May 15, 2024 — with Volta.net
@Atinux
Copy link
Contributor

Atinux commented May 24, 2024

This should be fixed now @ra-jeev

Can you confirm?

@ra-jeev
Copy link
Contributor Author

ra-jeev commented May 24, 2024

Just tested it, and it works fine now.

Thank you @Atinux 🙏

Also, is it possible to do this 👇 right now?

any way to run the wrangler commands to run D1 queries in the terminal in a NuxtHub project? If yes, how?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working upstream
Projects
None yet
Development

No branches or pull requests

2 participants