-
-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Labels
bugSomething isn't workingSomething isn't working
Milestone
Description
See:
To recap: plugins like https://github.com/datasette/datasette-sqlite-authorizer could result in a situation where running VACUUM against the standard Datasette write connection fails, because an authorizer prevents the required updates to one of the tables in the database.
To resolve this, Datasette now has a db.execute_isolated_fn() method which skips the prepare_connection() plugin hooks that could have added such an authorizer.
This will be a feature in Datasette 1.0, so to use it here we can use hasattr(database, "execute_isolated_fn"):
datasette-edit-schema/datasette_edit_schema/__init__.py
Lines 556 to 561 in 542495a
| async def drop_table(request, datasette, database, table): | |
| def do_drop_table(conn): | |
| db = sqlite_utils.Database(conn) | |
| db[table].disable_fts() | |
| db[table].drop() | |
| db.vacuum() |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working