CREATE TABLE IF NOT EXISTS settings (
    key TEXT PRIMARY KEY,
    value TEXT
);

CREATE TABLE IF NOT EXISTS drive_file (
    id INTEGER PRIMARY KEY AUTOINCREMENT,
    filename TEXT,
    original_name TEXT,
    size INTEGER,
    mime_type TEXT,
    r2_key TEXT,
    share_token TEXT,
    share_expiry TEXT,
    userid INTEGER,
    createtime TEXT,
    flag INTEGER DEFAULT 1
);

ALTER TABLE user ADD COLUMN password_hashed INTEGER DEFAULT 0;
