Skip to content

Commit

Permalink
mark add prefix for Users.Password optional
Browse files Browse the repository at this point in the history
  • Loading branch information
vdiskg committed Jul 6, 2021
1 parent b8c2110 commit d65ad73
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,3 @@ Use ApolloPortalDB;
ALTER TABLE `Users`
MODIFY COLUMN `Password` varchar(512) NOT NULL DEFAULT 'default' COMMENT '密码';
UPDATE `Users` SET `Password` = REPLACE(`Password`, '{nonsensical}', '{placeholder}') WHERE `Password` LIKE '{nonsensical}%';
UPDATE `Users` SET `Password` = CONCAT('{bcrypt}', `Password`) WHERE `Password` NOT LIKE '{%}%';
4 changes: 3 additions & 1 deletion scripts/sql/delta/v180-v190/apolloportaldb-v180-v190.sql
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,6 @@ UPDATE `Users` SET `UserDisplayName`=`Username` WHERE `UserDisplayName` = 'defau
ALTER TABLE `Users`
MODIFY COLUMN `Password` varchar(512) NOT NULL DEFAULT 'default' COMMENT '密码';
UPDATE `Users` SET `Password` = REPLACE(`Password`, '{nonsensical}', '{placeholder}') WHERE `Password` LIKE '{nonsensical}%';
UPDATE `Users` SET `Password` = CONCAT('{bcrypt}', `Password`) WHERE `Password` NOT LIKE '{%}%';
-- note: add the {bcrypt} prefix for `Users`.`Password` is not mandatory, and it may break the old version of apollo-portal while upgrading.
-- 注意: 向 `Users`.`Password` 添加 {bcrypt} 是非必须操作, 并且这个操作会导致升级 apollo-portal 集群的过程中旧版的 apollo-portal 无法使用.
-- UPDATE `Users` SET `Password` = CONCAT('{bcrypt}', `Password`) WHERE `Password` NOT LIKE '{%}%';

0 comments on commit d65ad73

Please sign in to comment.