create table if not exists settings
(
    id            INTEGER not null primary key check ( id = 0 ),
    created_at    TEXT    not null default CURRENT_TIMESTAMP,
    updated_at    TEXT    not null default CURRENT_TIMESTAMP,
    business_name TEXT,
    business_logo BLOB
);

-- update "updated_at"
create trigger if not exists settings_updated_at
    after
        update
    on settings
    for each row
begin
    update settings
    set updated_at = CURRENT_TIMESTAMP
    where id is NEW.id;
end;
