Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Hitting "Delete" key doesn't do what you expect, kills app, and probably your DB #1391
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
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!)
Thanks. If you have a minute to try with our latest nightly version then it's possible this might be fixed already. We're getting kinda close to the next release, so there's lots of bug fixes / tweaks / similar in our current nightly builds.
If that helps.
added a commit
May 20, 2018
Can you try again with tomorrow's nightly build, @broofa? I have just changed it so that selecting an entire row (or multiple rows, or all rows as in your case) and hitting the delete key actually deletes the record(s) and doesn't just clear the cell contents. That should solve the immediate issue you're facing here