I originally wasn't going to do passwords, but after struggling with webauthn I decided I'd just go for it. It simplifies the code a lot if I assert that I always have a password, displayname, etc.
10 lines
315 B
SQL
10 lines
315 B
SQL
-- +goose Up
|
|
CREATE TYPE HashType AS ENUM (
|
|
'bcrypt-14');
|
|
|
|
ALTER TABLE user_ ADD COLUMN password_hash_type HashType NOT NULL;
|
|
ALTER TABLE user_ ADD COLUMN password_hash TEXT NOT NULL;
|
|
-- +goose Down
|
|
ALTER TABLE user_ DROP COLUMN password_hash;
|
|
ALTER TABLE user_ DROP COLUMN password_hash_type;
|
|
DROP TYPE HashType;
|