-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Description
- Have a table with a unique primary key constraint on at least one column. Have 1,500 rows in that table.
- Go browse that table
- Select All
- Hit the "Delete" key
Expected result: All rows get deleted from the DB in a single transaction (preceded by a "Are you sure you want to do this?" dialogue, of course). Note: This is the behavior for the Sequel Pro app.
Actual result: App tries to null out every single field of every row, using a separate query for each [field,row] tuple, which seems horribly inefficient but hey, it works.
... except it doesn't. Instead, the primary key constraint gets violated and you start getting alerts about Unique Constraint Failed. Click "okay"... another alert... click "okay" again... another alert ... repeat 1,500 times for every row in your table. Or, in practice, resign yourself to the app being toast and kill -9 it from the command line.
And for bonus points, notice that your DB has been corrupted because only some of the fields in some of the rows have been set to null and... ah, screw it, I'll just restore from backup.
(But, thank you for an awesome app! Seriously. It's been really helpful!)