Spaces:
Sleeping
Sleeping
Claude Code - Backend Implementation Specialist
Claude Sonnet 4.5
Add Docker deployment configuration for Hugging Face Spaces
36bfe21 Download app/db/schema.sql from Abdul18/Rag_Chatbot: direct link, hf CLI and curl.
- Browser
- Download file 899 Bytes
-
https://huggingface.co/spaces/Abdul18/Rag_Chatbot/resolve/main/app/db/schema.sql
- Command line
-
hf download hf://spaces/Abdul18/Rag_Chatbot/app/db/schema.sql
-
curl -L -o schema.sql https://huggingface.co/spaces/Abdul18/Rag_Chatbot/resolve/main/app/db/schema.sql
899 Bytes
| -- Conversations table | |
| CREATE TABLE IF NOT EXISTS conversations ( | |
| id UUID PRIMARY KEY DEFAULT gen_random_uuid(), | |
| created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(), | |
| metadata JSONB DEFAULT '{}'::jsonb | |
| ); | |
| -- Messages table | |
| CREATE TABLE IF NOT EXISTS messages ( | |
| id UUID PRIMARY KEY DEFAULT gen_random_uuid(), | |
| conversation_id UUID REFERENCES conversations(id) ON DELETE CASCADE, | |
| role VARCHAR(20) NOT NULL CHECK (role IN ('user', 'assistant')), | |
| content TEXT NOT NULL, | |
| context_used TEXT[], | |
| created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(), | |
| metadata JSONB DEFAULT '{}'::jsonb | |
| ); | |
| -- Indexes for performance | |
| CREATE INDEX IF NOT EXISTS idx_messages_conversation_id ON messages(conversation_id); | |
| CREATE INDEX IF NOT EXISTS idx_messages_created_at ON messages(created_at DESC); | |
| CREATE INDEX IF NOT EXISTS idx_conversations_created_at ON conversations(created_at DESC); | |