use insertOrThrow instead of insert