ChronoEngine.com homepage

FAQs

How can I add a new column to a database table or change a column type?

Written
ChronoForms v4 has a tool to Create new database tables, but does not include a table editor to change existing tables. Here are some suggestions to help with that:
You will need to use a database management tool. Please see this FAQ for some suggestions.

Adding a new column

If there is no valuable data in the table, then you can delete the whole table and use the ChronoForms Create Table to l to create a new one.
If you have data that you need to keep then the simplest solution is to use your database management tool to add the new column making sure that the column name is exactly the same as the form input name.
A third option that can be done entirely within ChronoForms is to create a new table with a different name and re-connect all the DB actions in your form to the new table. This has the effect or archiving the data in the old table, it's not ideal but can be useful.

Changing a column type

This happens most often when the default VARCHAR(255) that ChronoForms uses is not large enough and you need to change the column type to say TEXT. Again you can do this with any of the database management tools and, provided that the column name is not changed, ChronoForms will continue to save form data to the changed column.

ChronoForms v5

CFv5 keeps a cached record of the database table structure in a separate file and uses that so that it doesn't have to re-query the database so often. If you change the table structure you need to click the Delete Cache icon in the Forms Manager toolbar to update the structure file.

2Checkout.com

2CheckOut.com Inc. (Ohio, USA) is an authorized retailer for goods and services provided by ChronoEngine.com