On Tue, Oct 08, 2013 at 03:17:31AM +0200, Alexander Chemeris wrote:
The v4 DB scheme removes sender ID from the DB and
stores individual values instead (sender addr, ton, npi). To convert an old DB to the new
format we have to read all values from the old table and re-add them to the new one.
we need to squash this with the previous commit and you should add
line wrapping to your text as well.
+#define SMS_TABLE_CREATE_STMT \
Can you propose an alternative to move this out of the array?
- "Failed to alter table Subscriber
(upgrade vom rev 2).\n");
+ "Failed to alter table Subscriber (upgrade from rev 2).\n");
haha, german and with a typo. :)
+ /* Rename old SMS table to be able create a new one
*/
+ result = dbi_conn_query(conn,
+ "ALTER TABLE SMS "
+ "RENAME TO SMS_3");
Okay, that is easier than adding a new column, populating it, removing
the old one, changing the constraints. It is at the cost of having an
additional parser routine.
+ /* Mark SMS_3 table for removal */
How is it marked? ;)
+ } else if (!strcmp(rev_s, "3")) {
+ if (update_db_revision_3()) {
FAILURE
reading it is odd, but this is how update_db_revision_2 is doing
it.. you just copied it.