Files
goalfylearning-admin/migrations/20250129_add_client_id_to_invite_codes.sql

12 lines
532 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.

-- 为 admin_invite_codes 表添加 client_id 字段
-- 日期: 2025-01-29
-- 说明: 添加客户端ID字段用于区分不同客户端观察版/用户版)
-- 添加 client_id 列
ALTER TABLE `admin_invite_codes`
ADD COLUMN `client_id` varchar(64) DEFAULT NULL COMMENT '客户端ID' AFTER `is_used`;
-- 更新现有记录的 client_id 为默认值(用户版)
-- 如果需要保持为 NULL可以注释掉下面这行
UPDATE `admin_invite_codes` SET `client_id` = 'J10f8yxU1XDl1Tn00MXKeA' WHERE `client_id` IS NULL;