gitdataai/lib/migrate/sql/user/user_password_up_01.sql
2026-05-30 01:38:40 +08:00

11 lines
343 B
SQL

CREATE TABLE IF NOT EXISTS user_password (
"user" UUID NOT NULL REFERENCES "user"(id),
hash TEXT NOT NULL,
salt TEXT NOT NULL,
is_active BOOLEAN NOT NULL DEFAULT TRUE,
reason TEXT,
created_at TIMESTAMPTZ NOT NULL DEFAULT now(),
updated_at TIMESTAMPTZ NOT NULL DEFAULT now(),
PRIMARY KEY ("user", created_at)
);