nidus-sync/migrations/00002_password.sql
Eli Ribble 4d55a391c9
Retroactively fix some SQL schema problems
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.
2025-11-05 17:36:32 +00:00

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;