Any way to work with jsonb in a sqlite db?

I have a local sqlite db that I want to sync to supabase. The supabase column is of type jsonb.

This is the local table definition:
export const userProfilesTable = sqliteTable('user_profiles', {
  id: text('id').primaryKey(),
  ...
  user_info: text('user_info', { mode: 'json' }).$type<UserInfo>(),
});


when I run
        try {
          const res = await tx
            .update(userProfilesTable)
            .set({
              user_info: userInfoData, //object
            })
            .execute();

          console.log('res', res);
        } catch (error) {
          console.log('error', error);
        }

the object gets stored as string and not as jsonb.
Was this page helpful?