CREATE TABLE IF NOT EXISTS user_settings ( username TEXT NOT NULL, name TEXT NOT NULL, value TEXT NOT NULL ); CREATE UNIQUE INDEX unique_per_name ON user_settings (username, name);