ALTER TABLE preferences ADD COLUMN cpu_threads INTEGER
    CHECK (cpu_threads IS NULL OR cpu_threads > 0);
ALTER TABLE preferences ADD COLUMN power_percent INTEGER
    CHECK (power_percent IS NULL OR power_percent BETWEEN 1 AND 100);
ALTER TABLE preferences ADD COLUMN prefill_chunk INTEGER
    CHECK (prefill_chunk IS NULL OR prefill_chunk > 0);
ALTER TABLE preferences ADD COLUMN quality BOOLEAN NOT NULL DEFAULT 0
    CHECK (quality IN (0, 1));
ALTER TABLE preferences ADD COLUMN warm_weights BOOLEAN NOT NULL DEFAULT 0
    CHECK (warm_weights IN (0, 1));
