-- Migration 009: users table with bcrypt hashed password
SET search_path TO crawl;

CREATE TABLE IF NOT EXISTS users (
    id           BIGSERIAL    PRIMARY KEY,
    username     VARCHAR(100) NOT NULL UNIQUE,
    password_hash TEXT        NOT NULL,
    created_at   TIMESTAMPTZ  NOT NULL DEFAULT NOW()
);

-- 初始 admin 账户，密码 admin123 的 bcrypt hash
-- 运行时由应用启动时自动插入，见 auth router
