mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
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:
parent
8f9509f00c
commit
e1bfab3fca
22 changed files with 286 additions and 214 deletions
|
|
@ -2,4 +2,5 @@ alls
|
|||
fo
|
||||
ro
|
||||
te
|
||||
ths
|
||||
ths
|
||||
notin
|
||||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue