mirror of
http://88.130.71.182:3000/BlitTech/contexta_be.git
synced 2026-06-12 23:23:21 +00:00
feat: add appointments, campaigns, admin, storage, tests and various updates
- Add new routers: admin, appointments, campaigns - Add storage service and logging config - Add migrations directory and test suite with pytest config - Add supabase_migration_features.sql - Update models, dependencies, config, and existing routers - Remove whatsapp_service (deleted) - Update pyproject.toml and uv.lock dependencies Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -86,16 +86,14 @@ CREATE POLICY "feedback_select_owner" ON message_feedback FOR SELECT USING (
|
||||
CREATE TABLE IF NOT EXISTS channel_connections (
|
||||
id UUID PRIMARY KEY DEFAULT uuid_generate_v4(),
|
||||
chatbot_id UUID NOT NULL REFERENCES chatbots(id) ON DELETE CASCADE,
|
||||
channel VARCHAR(20) NOT NULL CHECK (channel IN ('telegram', 'whatsapp')),
|
||||
channel VARCHAR(20) NOT NULL CHECK (channel IN ('telegram')),
|
||||
bot_token TEXT,
|
||||
bot_username TEXT,
|
||||
wa_keyword VARCHAR(50),
|
||||
is_active BOOLEAN DEFAULT TRUE,
|
||||
created_at TIMESTAMPTZ DEFAULT NOW(),
|
||||
UNIQUE(chatbot_id, channel)
|
||||
);
|
||||
CREATE INDEX IF NOT EXISTS idx_channel_connections_chatbot ON channel_connections(chatbot_id);
|
||||
CREATE INDEX IF NOT EXISTS idx_channel_connections_wa_keyword ON channel_connections(wa_keyword) WHERE channel = 'whatsapp';
|
||||
ALTER TABLE channel_connections ENABLE ROW LEVEL SECURITY;
|
||||
CREATE POLICY "channel_connections_owner" ON channel_connections FOR ALL USING (
|
||||
chatbot_id IN (
|
||||
|
||||
Reference in New Issue
Block a user