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.
paopao-ce/scripts/migration/postgres/0015_password_use_bcrypt.do...

13 lines
304 B

ALTER TABLE p_user ADD COLUMN salt VARCHAR(32) NOT NULL DEFAULT '';
UPDATE
p_user
SET
salt = split_part(password, ':', -1),
password = split_part(password, ':', 1);
ALTER TABLE p_user
ALTER COLUMN password TYPE VARCHAR(64),
ALTER COLUMN password SET NOT NULL,
ALTER COLUMN password SET DEFAULT '';