- Add CaptchaType field for selecting captcha implementation - Add EnableUserLoginCaptcha for user login verification - Add EnableUserRegisterCaptcha for user registration verification - Add EnableAdminLoginCaptcha for admin login verification - Add EnableUserResetPasswordCaptcha for password reset verification - Remove deprecated EnableLoginVerify, EnableRegisterVerify, EnableResetPasswordVerify fields - Support rollback with down migration
18 lines
733 B
SQL
18 lines
733 B
SQL
-- Rollback: restore old verify configuration fields
|
|
INSERT INTO `system` (`category`, `key`, `value`, `type`, `desc`) VALUES
|
|
('verify', 'EnableLoginVerify', 'false', 'bool', 'is enable login verify'),
|
|
('verify', 'EnableRegisterVerify', 'false', 'bool', 'is enable register verify'),
|
|
('verify', 'EnableResetPasswordVerify', 'false', 'bool', 'is enable reset password verify')
|
|
ON DUPLICATE KEY UPDATE
|
|
`value` = VALUES(`value`),
|
|
`desc` = VALUES(`desc`);
|
|
|
|
-- Remove new captcha configuration fields
|
|
DELETE FROM `system` WHERE `category` = 'verify' AND `key` IN (
|
|
'CaptchaType',
|
|
'EnableUserLoginCaptcha',
|
|
'EnableUserRegisterCaptcha',
|
|
'EnableAdminLoginCaptcha',
|
|
'EnableUserResetPasswordCaptcha'
|
|
);
|