CREATE TABLE IF NOT EXISTS project_billing_history (
    uid UUID PRIMARY KEY,
    project UUID NOT NULL,
    "user" UUID,
    amount NUMERIC NOT NULL,
    currency TEXT NOT NULL,
    reason TEXT NOT NULL,
    extra JSONB,
    created_at TIMESTAMPTZ NOT NULL
);

CREATE INDEX idx_project_billing_history_project ON project_billing_history (project);
