ddev / vscode-ddev-manager

DDEV Manager offers a centralized and user-friendly interface to control every aspect of your DDEV projects.
https://marketplace.visualstudio.com/items?itemName=biati.ddev-manager
Apache License 2.0
12 stars 3 forks source link

[BUG] Wrong database name when opening Sequel Ace with "Open Database Administration" #17

Closed inf0dr0id closed 7 months ago

inf0dr0id commented 7 months ago

Describe the bug When opening Sequel Ace with the 'DDEV: Open Database Administration' command the project name is used as the database name but the default DDEV database name is db which yields an Unknown database error.

ddev sequelace does the following: open mysql://root:root@xyz.ddev.site:32782/db -a '/Applications/Sequel Ace.app/Contents/MacOS/Sequel Ace'

To Reproduce Steps to reproduce the behavior:

  1. "ddevManager.defaultDatabaseManager": "Sequel Ace"
  2. Click on 'Open Database Administration'
  3. See error

Expected behavior Sequel Ace should be opened with database db by default or this should be configurable.

Screenshots

With 'DDEV: Open Database Administration'

Bildschirmfoto 2023-11-29 um 11 26 07

With ddev sequelace

Bildschirmfoto 2023-11-29 um 11 26 34

System:

biati-digital commented 7 months ago

Hi. This is not related to this extension, the extension only runs DDEV commands, in this case ddev sequelpro it does not pass database names or any other configuration.

Please post the issue directly in the ddev repo.

inf0dr0id commented 7 months ago

Thanks for your reply but in the VSCode output console for DDEV I can see this when using 'Open Database Administration':

2023-11-30 08:17:02.731 [info] + open mysql://root:root@project_name.ddev.site:32791/project_name -a '/Applications/Sequel Ace.app/Contents/MacOS/Sequel Ace'

This happens with the following ddev commands in a terminal with the project folder as the current directory:

> ddev sequelace + open mysql://root:root@project_name.ddev.site:32791/db -a '/Applications/Sequel Ace.app/Contents/MacOS/Sequel Ace'

> ddev sequelace project_name + open mysql://root:root@project_name.ddev.site:32791/project_name -a '/Applications/Sequel Ace.app/Contents/MacOS/Sequel Ace'

Are you sure you're not adding the project name when calling ddev sequelace?

If not and this is a problem with ddev I would be glad to post an issue in the ddev repo but I'm not entirely sure what the bug description would be.

biati-digital commented 7 months ago

Ohh, i see what you mean, everything related to the database was moved to a new class to handle phpMyAdmin, Adminer and maybe some VS Code db extensions, in that new class the project name is added exacly as you mention.

I use Tableplus and never noticed this issue, checking the command's code, seems that the Tableplus command has the db name directly in the code (ignoring args) and the sequelace command uses the first arg (if provided) as database name.

I'll remove the project name from the command and publish an update this week.

Thank's for checking this.

biati-digital commented 7 months ago

Hi. An update has been published (1.4.2) please try it and let me know if it's working

inf0dr0id commented 7 months ago

It's working now. Thank you.

biati-digital commented 7 months ago

Glad to hear it's working correctly.