Open-Assistant
Open-Assistant copied to clipboard
Create new `journal` table and log all human-feedback interactions to it
We want to generate statistics about recent user interactions and calculate scores for a leaderboard (gamification). As a first step we will log all important user interactions into a 'journal' table.
journal table (event log table):
id: uuid # (time ordered UUIDs as PK)
created_date: datetime # (redundant to pk but simplifies debugging)
person_id: uuid # (nullable) user is called person in db
post_id: uuid # (nullable)
event_type: string
event_payload: jsonb #serialized event object
api_client_id: uuid
journal_integration table (track state of integration processes):
worker_id: string (name of integration worker process)
last_processed_id: uuid
last_run: datetime
last_error: string # debug
failing_journal_id: uuid