Update: 2026-05-08 04:58:23
This commit is contained in:
14
database/migrations/005_chatbot.sql
Normal file
14
database/migrations/005_chatbot.sql
Normal file
@@ -0,0 +1,14 @@
|
||||
-- Chatbot History Table
|
||||
-- Run this migration on your production database
|
||||
|
||||
CREATE TABLE IF NOT EXISTS chatbot_history (
|
||||
id VARCHAR(36) PRIMARY KEY,
|
||||
user_id VARCHAR(36) NOT NULL,
|
||||
tenant_id VARCHAR(36) NOT NULL,
|
||||
question TEXT NOT NULL,
|
||||
answer TEXT NOT NULL,
|
||||
created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
INDEX idx_chatbot_user (user_id),
|
||||
INDEX idx_chatbot_tenant (tenant_id),
|
||||
INDEX idx_chatbot_date (created_at)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
Reference in New Issue
Block a user