Add "Empty Tables" with disabled foreign key checks

Acs's profile image Acs posted 4 years ago in Feature discussion Permalink

Hey,

This is a feature that is really needed. I working on a project where I constantly have to truncate tables. It would make my life A LOT easier if I could just use the menu to clear the tables and not create a query like:

SET FOREIGN_KEY_CHECKS=0;
TRUNCATE TABLE tablename;
SET FOREIGN_KEY_CHECKS=1;

Would be a good idea to also have a way to select multiple tables for truncation.

ansgar's profile image ansgar posted 4 years ago Permalink

Multiple tables can be emptied through the Database tab.

Doesn't truncate anyway ignore foreign key checks? I thought DELETE is slower due to its foreign key checks.

Acs's profile image Acs posted 4 years ago Permalink

Didn't know I could delete via the database tab, thanks!

And no, I get constant errors regarding foreign key constraints, but I am on MariaDB so not sure if in MySQL it would be different.

Please login to leave a reply, or register at first.