hi-server/initialize/migrate/database/02143_update_verify_config.up.sql
shanshanzhong f703b5089a
All checks were successful
Build docker and publish / build (20.15.1) (push) Successful in 7m58s
分组概念
2026-03-19 03:21:47 -07:00

18 lines
874 B
SQL

-- Add new captcha configuration fields
INSERT INTO `system` (`category`, `key`, `value`, `type`, `desc`) VALUES
('verify', 'CaptchaType', 'local', 'string', 'Captcha type: local or turnstile'),
('verify', 'EnableUserLoginCaptcha', 'false', 'bool', 'Enable captcha for user login'),
('verify', 'EnableUserRegisterCaptcha', 'false', 'bool', 'Enable captcha for user registration'),
('verify', 'EnableAdminLoginCaptcha', 'false', 'bool', 'Enable captcha for admin login'),
('verify', 'EnableUserResetPasswordCaptcha', 'false', 'bool', 'Enable captcha for user reset password')
ON DUPLICATE KEY UPDATE
`value` = VALUES(`value`),
`desc` = VALUES(`desc`);
-- Remove old verify configuration fields
DELETE FROM `system` WHERE `category` = 'verify' AND `key` IN (
'EnableLoginVerify',
'EnableRegisterVerify',
'EnableResetPasswordVerify'
);