Files
mokeegateway/add_doc_token.sql
2026-07-15 16:13:27 +08:00

6 lines
298 B
SQL
Raw Permalink 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.
-- 系统表新增文档令牌字段
ALTER TABLE sys_system ADD COLUMN IF NOT EXISTS doc_token VARCHAR(64) DEFAULT NULL COMMENT '文档访问令牌(UUID)';
-- 为已有系统生成随机令牌16位 hex
UPDATE sys_system SET doc_token = SUBSTRING(MD5(UUID()), 1, 16) WHERE doc_token IS NULL;