From 0879b510c1efa3114e58d9db2f4e1494de42134c Mon Sep 17 00:00:00 2001 From: superthib Date: Mon, 10 Mar 2014 11:30:25 +0100 Subject: [PATCH] Table upgrade was done again with next table version Table should only be upgraded from a previous version. --- generator/res/content_subclass_upgrade.txt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/generator/res/content_subclass_upgrade.txt b/generator/res/content_subclass_upgrade.txt index 428815a..a79d6a9 100644 --- a/generator/res/content_subclass_upgrade.txt +++ b/generator/res/content_subclass_upgrade.txt @@ -1,5 +1,4 @@ - - if (oldVersion <= %1$d) { + if (oldVersion < %1$d) { db.execSQL("CREATE TABLE " + TABLE_NAME + "_tmp (" + %2$s%3$s%4$s + ");"); db.execSQL("INSERT INTO " + TABLE_NAME + "_tmp SELECT " + %5$s + ", %6$s FROM " + TABLE_NAME + ";"); @@ -7,4 +6,4 @@ db.execSQL("DROP TABLE " + TABLE_NAME + ";"); db.execSQL("ALTER TABLE " + TABLE_NAME + "_tmp RENAME TO " + TABLE_NAME + ";"); oldVersion = %1$d; - } \ No newline at end of file + }