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

The "Clear DB" page doesn't work with PostgreSQL #395

Closed
Ikalou opened this issue Jan 28, 2020 · 2 comments
Closed

The "Clear DB" page doesn't work with PostgreSQL #395

Ikalou opened this issue Jan 28, 2020 · 2 comments

Comments

@Ikalou
Copy link

Ikalou commented Jan 28, 2020

The new "Clear DB" page makes use of SET FOREIGN_KEY_CHECKS to disable foreign key checks. This does not work with PostgreSQL and other databases. It fails with ProgrammingError at /silk/cleardb/: unrecognized configuration parameter "foreign_key_checks".

I think we should either a) duplicate all the logic inside of...

...into...

def _truncate_tables(self, models):

...or b) call the command inside of the view.

If we can agree on the best method I can submit a pull request with a fix.

Thank you for taking a look at this!

@Ikalou Ikalou changed the title The "Clear BD" page doesn't work with PostgreSQL The "Clear DB" page doesn't work with PostgreSQL Jan 28, 2020
@nasirhjafri
Copy link
Member

I would prefer moving the logic to a common function and then call it in both view and command.

@nasirhjafri
Copy link
Member

Added in 4.0.1
#407

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants