Integer Field now not accepting data because it says it exists as a type floast

Basically I’ve been using this DB for days now… always populating the fields it with integers.

But now the program is giving me the error

(node:49980) UnhandledPromiseRejectionWarning: Error: A 400 Bad Request error occurred: {“error”:“partial write: field type conflict: input field “availabe” on measurement “totalAgents” is type integer, already exists as type float dropped=1”}

Which makes no sense… because it was NEVER a float.

The field is declared “availabe: Influx.FieldType.INTEGER,” and it was never given a float.

How do I fix this?

Data types are created per single shard, not at database level, therefore you ended up with mixed data types,

You can see which data type is used using a SHOW FIELD KEYS (docs here).

There is no easy way of fixing data type conflict (if at all), but in your case, it’s weird as a number should always fit into a float field.
Unless you are forcing the type as an integer, I’ll use line protocol as an example as I don’t know how you are sending data:
generic (float) number : weather,location=us-midwest temperature=82 1465839830100400200
integer number (note the 82i): weather,location=us-midwest temperature=82i 1465839830100400200

If you provide some more context I might be able to help