Skip to content

Commit

Permalink
Merge pull request #26 from superthib/patch-1
Browse files Browse the repository at this point in the history
Table upgrade was done again with next table version
  • Loading branch information
foxykeep committed Mar 10, 2014
2 parents a1431ac + 0879b51 commit 705cc6e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions generator/res/content_subclass_upgrade.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@

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 + ";");

db.execSQL("DROP TABLE " + TABLE_NAME + ";");
db.execSQL("ALTER TABLE " + TABLE_NAME + "_tmp RENAME TO " + TABLE_NAME + ";");
oldVersion = %1$d;
}
}

0 comments on commit 705cc6e

Please sign in to comment.