mirror of https://github.com/rocboss/paopao-ce
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
375 B
12 lines
375 B
ALTER TABLE p_user ADD COLUMN salt text(32) NOT NULL DEFAULT '';
|
|
ALTER TABLE p_user ADD COLUMN password_copy text(64) NOT NULL DEFAULT '';
|
|
|
|
UPDATE
|
|
p_user
|
|
SET
|
|
salt = substr(password, instr(password, ':')+1),
|
|
password_copy = substr(password, 1, instr(password, ':')-1);
|
|
|
|
ALTER TABLE p_user DROP COLUMN password;
|
|
ALTER TABLE p_user RERENAME COLUMN password_copy TO password;
|