feat: enhance audit logging, add MCP settings, and production docker setup
continuous-integration/drone/push Build is passing
continuous-integration/drone/push Build is passing
- Implemented comprehensive audit logging for Tasks, Users, Settings, Goals, Labels, AI Chat, and Rewards. - Added Admin UI for MCP Server settings and Audit Logs. - Created docker-compose-production.yml with Traefik configuration. - Fixed backend bugs (missing storage methods, route closure). - Added Audit Logging Guidelines.
This commit is contained in:
@@ -6,12 +6,31 @@ CREATE TABLE IF NOT EXISTS system_settings (
|
||||
updated_at timestamp DEFAULT now()
|
||||
);
|
||||
|
||||
-- AI Chat Tables
|
||||
CREATE TABLE IF NOT EXISTS conversations (
|
||||
id varchar(255) PRIMARY KEY DEFAULT gen_random_uuid(),
|
||||
user_id varchar(255) NOT NULL REFERENCES users(id),
|
||||
title text NOT NULL,
|
||||
created_at timestamp DEFAULT now(),
|
||||
updated_at timestamp DEFAULT now()
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS messages (
|
||||
id varchar(255) PRIMARY KEY DEFAULT gen_random_uuid(),
|
||||
conversation_id varchar(255) NOT NULL REFERENCES conversations(id),
|
||||
role text NOT NULL,
|
||||
content text NOT NULL,
|
||||
created_at timestamp DEFAULT now()
|
||||
);
|
||||
|
||||
-- Truncate users to avoid constraint issues and reset for First Run
|
||||
TRUNCATE TABLE users CASCADE;
|
||||
TRUNCATE TABLE user_rewards CASCADE;
|
||||
TRUNCATE TABLE xp_events CASCADE;
|
||||
TRUNCATE TABLE goals CASCADE;
|
||||
TRUNCATE TABLE notes CASCADE;
|
||||
TRUNCATE TABLE conversations CASCADE;
|
||||
TRUNCATE TABLE messages CASCADE;
|
||||
|
||||
-- Add new columns to users
|
||||
ALTER TABLE users ADD COLUMN IF NOT EXISTS email text NOT NULL UNIQUE;
|
||||
|
||||
Reference in New Issue
Block a user