SQLite, saved as float instead of int on electron

I have a table in SQLite, lets say a field called "status_topic" => Int

On electron preview web it's ok:

On electron desktop:

How can avoid this?

The problem here is that I make a repeat from an API that returns this:
image

This picture is from the electron desktop, but it saves as 1.0 2.0 3.0 etc

This is a major issue for me because all the next queries should match {{view1.params.id}} and 1!=1.0 :frowning:

Any ideas please?

I have never seen this issue, do both version use the same sqlite database?

Thanks @patrick, yes same db, on browser preview I see as int, bot not on builded app on windows, not tested on android

Do you use the capacitor sqlite plugin? It uses different drivers depending on the platform, but never seen an issue like this. Do you know how it is exactly stored? Even when stored as a REAL it would return as a number same as INTEGER. It more likely that it was stored as TEXT.

Yes, the sqlite capacitor, I guess it's the community sqlite plugin

Db schema is defined as int..
I take an api, make a repeat and insert that value inside a page flow..
Will inspect it a little more today and give you details

Ok, tried to replicate it, but the problem is related on the previously created db.

ChatGPT helped me out to create a js to check the schema:
And it's this way:

On console:

While on Wappler db panel:

Seems I have pending changes:
image

But nothing happens on clicking upload button

[2025-10-09 16:35:34.675] migrationFolder=C:\xampp\htdocs\pryt_linux\.wappler\migrations\maindb

It looks like you created the table with the columns as text first and the database was created with those. Then you updated the columns to be integer but the changes didn't get applied to the database.

@George knows more about how Wappler applies those changes, perhaps he has an idea what goes wrong in your situation.

1 Like

As explained here check what is generated in your connection.js