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

🐛 BUG: Wrangler d1 execute command don't show success message when using local file on local database #6938

Closed
thisisjaymehta opened this issue Oct 10, 2024 · 0 comments · Fixed by #7018
Labels
bug Something that isn't working

Comments

@thisisjaymehta
Copy link

Which Cloudflare product(s) does this pertain to?

D1

What version(s) of the tool(s) are you using?

10.8.2 [Wrangler]

What version of Node are you using?

20.18.0

What operating system and version are you using?

Mac Sonoma 15.0.1

Describe the Bug

Observed behavior

When executing a local sql file on local database, I don't get status of command. Did it execute the sql file correctly or did it failed?

Sample output:

➜  d1-tutorial git:(main) ✗ npx wrangler d1 execute prod-d1-tutorial --local --file=./schema.sql                

 ⛅️ wrangler 3.80.2
-------------------

🌀 Executing on local database prod-d1-tutorial (8e1192dc-7d2a-4628-9e6e-44b14bb976fd) from .wrangler/state/v3/d1:
🌀 To execute on your remote database, add a --remote flag to your wrangler command.

➜  d1-tutorial git:(main) ✗ 

Expected behavior

Even though my sql file don't have any select query, the command itself should indicate that it was able to run the sql file successfully.

Steps to reproduce

To reproduce, run the following command:

npx wrangler d1 execute prod-d1-tutorial --local --file=./schema.sql

schema.sql file:

DROP TABLE IF EXISTS Customers;
CREATE TABLE IF NOT EXISTS Customers (CustomerId INTEGER PRIMARY KEY, CompanyName TEXT, ContactName TEXT);
INSERT INTO Customers (CustomerID, CompanyName, ContactName) VALUES (1, 'Alfreds Futterkiste', 'Maria Anders'), (4, 'Around the Horn', 'Thomas Hardy'), (11, 'Bs Beverages', 'Victoria Ashworth'), (13, 'Bs Beverages', 'Random Name');

Please provide a link to a minimal reproduction

No response

Please provide any relevant error logs

No response

@thisisjaymehta thisisjaymehta added the bug Something that isn't working label Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something that isn't working
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant