Files

8 lines
269 B
SQL

CREATE TABLE IF NOT EXISTS auth_user (
id uuid PRIMARY KEY DEFAULT gen_random_uuid(),
username text UNIQUE NOT NULL,
password_hash text NOT NULL,
role text NOT NULL CHECK (role IN ('user', 'admin')),
created_at timestamptz NOT NULL DEFAULT now()
);