implemented teams integration

This commit is contained in:
2026-02-20 16:46:44 +01:00
parent c956562722
commit d3ebffa811
12 changed files with 609 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
-- Migration: Add Teams accounts table for Microsoft Teams Bot integration
-- Run this in Supabase SQL editor before deploying Teams bot feature
CREATE TABLE teams_accounts (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
user_id UUID NOT NULL REFERENCES profiles(id) ON DELETE CASCADE,
teams_user_id TEXT,
teams_tenant_id TEXT,
teams_service_url TEXT NOT NULL,
teams_conversation_id TEXT NOT NULL,
is_active BOOLEAN NOT NULL DEFAULT TRUE,
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
CONSTRAINT teams_accounts_user_id_unique UNIQUE (user_id)
);
CREATE INDEX idx_teams_accounts_user_id ON teams_accounts (user_id);