-
-
Notifications
You must be signed in to change notification settings - Fork 703
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
Delete a single record from an existing table #1864
Comments
Still needs tests that cover compound primary keys and rowid tables. |
I'm a bit nervous about calling datasette/datasette/views/row.py Lines 188 to 190 in 00632de
|
I need to think about what happens if you delete a row that is the target of a foreign key from another row. https://www.sqlite.org/foreignkeys.html#fk_enable shows that SQLite will only actively enforce these relationships (e.g. throw an error if you try to delete a row that is referenced by another row) if you first run
I don't actually believe that the SQLite maintainers will ever make that the default though. Datasette doesn't turn these on at the moment, but it could be turned on by a |
It looks like SQLite has features for this already: https://www.sqlite.org/foreignkeys.html#fk_actions
On that basis, I'm not going to implement anything additional in the |
API design:
I'm just going to do
POST
for the moment, like I did here:Permission:
delete-row
Still needed:
The text was updated successfully, but these errors were encountered: