Skip to content

Commit

Permalink
yeet pt. 2
Browse files Browse the repository at this point in the history
  • Loading branch information
AmirAgassi committed Dec 7, 2024
1 parent 1469b19 commit bb5b197
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ ALTER TABLE users ADD COLUMN token_salt BYTEA;
-- backfill existing users with random salt
UPDATE users SET token_salt = gen_random_bytes(32);

-- make token_salt non-nullable
-- make token_salt non-nullable and unique
ALTER TABLE users ALTER COLUMN token_salt SET NOT NULL;
ALTER TABLE users ADD CONSTRAINT users_token_salt_key UNIQUE (token_salt);
-- +goose StatementEnd

-- +goose Down
Expand Down

0 comments on commit bb5b197

Please sign in to comment.