In the following scenario this behavior causes an error. Given there is a room named "008" and this information is stored in a database column typed as "STRING" the room name value becomes 8. When the schedule is updated the old and new room names are compared. Due to loosing the leading zeros this lecture is always marked as changed, falsely.
Recommended solutions
For updates of existing apps the specific column types should be altered via database migrations.
For new apps all column types defined as "STRING" should be changed to "TEXT".
Problem
Currently, some database columns such as for the "lectures" table define the data type "STRING". This is not a native SQLite data type. By the rules of column affinity this is mapped into the storage class "NUMERIC".
Error scenario
In the following scenario this behavior causes an error. Given there is a room named
"008"
and this information is stored in a database column typed as "STRING" the room name value becomes8
. When the schedule is updated the old and new room names are compared. Due to loosing the leading zeros this lecture is always marked as changed, falsely.Recommended solutions