View Full Version : Altering & Updating SQLite DB table in sencha touch

Sameer Khan
23 Jan 2012, 1:03 AM
Hi, I have developed one sencha touch application for Android and IOS...And it was in Production. I got one issue right now.

Issue is : for some of the tables, some more fields are added by me for the application. But i did entire thing on Safari browser5.1. So to get effected i dropped all tables and created tables again...But on the Mobile already these tables having some important data.. and newly added column should be added to the existing tables on the Android Mobile with loosing data...

How can i do it ? How to alter tables on Android mobile itself ?
Plz let me know the solution for this...Urgent..

Thanks in advance.

23 Jan 2012, 9:03 AM
This sounds like a SQLite question not Sencha Touch.

25 Jan 2012, 12:32 AM
Try searching for some guidance on
"ALTER TABLE " + schemaObject.tableName + " ADD COLUMN " +
column.columnName + " " +
column.dataType + " " +
column.notNull + " " +
column.defaultValue + " ";