Files
play-life/play-life-backend/migrations/008_add_telegram_integrations.sql

17 lines
725 B
MySQL
Raw Permalink Normal View History

-- Migration: Add telegram_integrations table
-- This script creates a table to store Telegram bot tokens and chat IDs
-- Create telegram_integrations table
CREATE TABLE IF NOT EXISTS telegram_integrations (
id SERIAL PRIMARY KEY,
chat_id VARCHAR(255),
bot_token VARCHAR(255)
);
-- Add comment for documentation
COMMENT ON TABLE telegram_integrations IS 'Stores Telegram bot tokens and chat IDs for integrations';
COMMENT ON COLUMN telegram_integrations.id IS 'Auto-increment primary key';
COMMENT ON COLUMN telegram_integrations.chat_id IS 'Telegram chat ID (nullable, set automatically after first message)';
COMMENT ON COLUMN telegram_integrations.bot_token IS 'Telegram bot token (nullable, set by user)';