Files
MoonTVPlus/migrations/postgres/004_add_tvbox_subscribe_token.sql
2026-02-25 11:56:27 +08:00

15 lines
573 B
SQL
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
-- ============================================
-- 添加 TVBox 订阅 token 字段
-- 版本: 004
-- 创建时间: 2026-02-25
-- ============================================
-- 为 users 表添加 tvbox_subscribe_token 字段
ALTER TABLE users ADD COLUMN IF NOT EXISTS tvbox_subscribe_token TEXT;
-- 创建索引以加速 token 查询
CREATE INDEX IF NOT EXISTS idx_users_tvbox_token ON users(tvbox_subscribe_token) WHERE tvbox_subscribe_token IS NOT NULL;
-- 添加注释
COMMENT ON COLUMN users.tvbox_subscribe_token IS 'TVBox订阅token用于用户独立订阅';