Skip to content

Commit 0094205

Browse files
committed
update sample
1 parent 2dfc44b commit 0094205

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

samples/database-v13-upgrade/src/main/java/com/example/MyDatabase.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,8 @@ public MyDatabase(Context context) {
2121
// to write to it
2222
//super(context, DATABASE_NAME, context.getExternalFilesDir(null).getAbsolutePath(), null, DATABASE_VERSION);
2323

24-
// call this method to force a database overwrite every time the version number increments:
25-
//setForcedUpgrade();
26-
27-
// call this method to force a database overwrite if the version number
28-
// is below a certain threshold:
29-
//setForcedUpgrade(2);
24+
// we have supplied no upgrade path from version 1 to 2
25+
setForcedUpgrade(2);
3026
}
3127

3228
public Cursor getEmployees() {

0 commit comments

Comments
 (0)