Re:The Design Of SQLite4
by bobbyi_settv on Sunday May 25, 2014 @03:05PM
(#7797203)
It's needed, for example, when upgrading applications that use sqlite for storage. Like in the mobile phone case, if a new version of the app comes out that has a new feature that requires a new column in one of the tables, when you upgrade the app on your phone, the app probably wants to migrate the sqlite db to the new schema rather than throwing away all your saved data.
[ Parent
| on HN ]
This is something I hadn't considered. Being able to do firmware updates to a device with an embedded instance of SQLite seems huge.
Seeing as ALTER support is currently lacking, what kinds of approaches are commonly taken to work around this issue? I'm particularly interested in hearing about how people manage workaround to this problem for things like upgrading embedded devices. I imagine the scarcity of resources (RAM, CPU) available to most embedded devices would make this a difficult problem to solve on the hardware at hand.
Re:The Design Of SQLite4
by marcosdumay on Sunday May 25, 2014 @09:37PM
(#7798309)
The usual way to deal with that (and recommended by the SQLite docs) is creating a new table, copying the data, and dropping the old table.
Needless to say that this is VERY error prone, and limited resources make it even more so.