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

better "drop database" #581

Open
eug3nix opened this issue Jan 14, 2025 · 1 comment
Open

better "drop database" #581

eug3nix opened this issue Jan 14, 2025 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@eug3nix
Copy link
Collaborator

eug3nix commented Jan 14, 2025

The current implementation of drop database functionality opens a new template-base tab and creates db backend.
This backend prevents database deletion.

@eug3nix eug3nix added the bug Something isn't working label Jan 14, 2025
@eug3nix eug3nix self-assigned this Jan 21, 2025
eug3nix added a commit that referenced this issue Jan 21, 2025
1: do not change the active database when righ-clicking DB tree node
2: run get_tree_info and get_databases against template1 db when
   loadingb DB object tree -> prevents actual DBs from getting "used"

refs: #581
@eug3nix
Copy link
Collaborator Author

eug3nix commented Jan 21, 2025

I've added a workaround which allows dropping the database in most cases.
A proper solution would be:

  1. Implement special "maintenance command" modal component which would be brought up for operation such as drop database.
  2. Load SQL templates into this modal
  3. Make it possible to execute such maintenance commands in context of another database to prevent creation of DB backend attached to the database we are working on

plucik pushed a commit that referenced this issue Jan 22, 2025
…582)

* temporary workaround for DROP DATABASE issue with currently used DB
1: do not change the active database when righ-clicking DB tree node
2: run get_tree_info and get_databases against template1 db when
   loadingb DB object tree -> prevents actual DBs from getting "used"

refs: #581

* use template0 in prefer_database
plucik pushed a commit that referenced this issue Jan 22, 2025
…582)

* temporary workaround for DROP DATABASE issue with currently used DB
1: do not change the active database when righ-clicking DB tree node
2: run get_tree_info and get_databases against template1 db when
   loadingb DB object tree -> prevents actual DBs from getting "used"

refs: #581

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

No branches or pull requests

1 participant