Move Metadata to --internal database

Refs:
- https://github.com/simonw/datasette/pull/2343
- https://github.com/simonw/datasette/issues/2341
This commit is contained in:
Alex Garcia 2024-06-11 09:33:23 -07:00 committed by GitHub
commit e1bfab3fca
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
22 changed files with 286 additions and 214 deletions

View file

@ -2,4 +2,5 @@ alls
fo
ro
te
ths
ths
notin

View file

@ -2002,6 +2002,7 @@ This example logs events to a `datasette_events` table in a database called `eve
from datasette import hookimpl
import json
@hookimpl
def startup(datasette):
async def inner():
@ -2031,7 +2032,11 @@ This example logs events to a `datasette_events` table in a database called `eve
insert into datasette_events (event_type, created, actor, properties)
values (?, strftime('%Y-%m-%d %H:%M:%S', 'now'), ?, ?)
""",
(event.name, json.dumps(event.actor), json.dumps(properties)),
(
event.name,
json.dumps(event.actor),
json.dumps(properties),
),
)
return inner