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

Implement dropping databases #3862

Open
pavish opened this issue Sep 23, 2024 · 0 comments
Open

Implement dropping databases #3862

pavish opened this issue Sep 23, 2024 · 0 comments
Labels
needs: product approval It's not yet clear that this issue will actually improve Mathesar from a user's perspective type: bug Something isn't working work: backend Related to Python, Django, and simple SQL

Comments

@pavish
Copy link
Member

pavish commented Sep 23, 2024

Description

We should probably only provide delete for databases created in the internal server. Only Mathesar admins should be able to perform this.

When the user requests a delete, these conditions should match:

  • The user should be a Mathesar admin
  • The database should be present within the internal db server
  • The collaborator must use a role that owns the database

And then, in a single transaction:

  • Connect to the database that's about to be deleted
  • Change ownership to the internal db role that we use in mathesar_django
  • Connect to the internal db server with the internal db role
  • Drop the database
@pavish pavish added type: bug Something isn't working work: backend Related to Python, Django, and simple SQL needs: product approval It's not yet clear that this issue will actually improve Mathesar from a user's perspective labels Sep 23, 2024
@pavish pavish added this to the v0.2.0 (beta release) milestone Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs: product approval It's not yet clear that this issue will actually improve Mathesar from a user's perspective type: bug Something isn't working work: backend Related to Python, Django, and simple SQL
Projects
None yet
Development

No branches or pull requests

1 participant