All fields in the database tables are generated as longtext when using csweb:proccess-cases

Discussions about tools to complement CSPro data processing
Post Reply
michaego
Posts: 1
Joined: February 5th, 2024, 11:31 am

All fields in the database tables are generated as longtext when using csweb:proccess-cases

Post by michaego »

Dear all,

I am currently using cspro 8 and csweb 8 for data capture, but with the resulting database I have a problem when running the process:cases (relational database copy creation process php console csweb:process-cases), all the fields no matter that in the cspro dictionary are defined as numeric, in the replicated database they are assigned the longtext data type, why is this?
Attachments
Replica Sql Database
Replica Sql Database
replica.png (81.89 KiB) Viewed 337 times
Dictionary Cspro
Dictionary Cspro
dict.png (17.15 KiB) Viewed 337 times
savy
Posts: 166
Joined: December 27th, 2012, 1:36 pm

Re: All fields in the database tables are generated as longtext when using csweb:proccess-cases

Post by savy »

This behavior is by design. CSPro on the client side stores the csdb data in SQLite format. SQLite is less strict about storing any content in the INTEGER type columns. For example, a record item's numeric column can contain '*' if the data is of invalid type for numeric content and if a dictionary changes mid-stream from three decimal places to two, the csdb table numeric column is still able to store both old values without any problem. This is not possible to do in MySQL tables hence we had to keep it as text to prevent loss of data.
Post Reply