From cbbed8933ebd46ddfa54a85dcff544ed87f94342 Mon Sep 17 00:00:00 2001 From: Udi Finkelstein Date: Thu, 9 Jul 2015 01:50:27 +0300 Subject: [PATCH] Fix DB to version 18 --- .../de/danoeh/antennapod/core/storage/PodDBAdapter.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/de/danoeh/antennapod/core/storage/PodDBAdapter.java b/core/src/main/java/de/danoeh/antennapod/core/storage/PodDBAdapter.java index d6740212e..c4b879091 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/storage/PodDBAdapter.java +++ b/core/src/main/java/de/danoeh/antennapod/core/storage/PodDBAdapter.java @@ -1477,7 +1477,7 @@ public class PodDBAdapter { */ private static class PodDBHelper extends SQLiteOpenHelper { - private final static int VERSION = 17; + private final static int VERSION = 18; private Context context; @@ -1698,6 +1698,10 @@ public class PodDBAdapter { Log.d("Migration", "SQL: " + sql); db.execSQL(sql); } + if(oldVersion <= 17) { + db.execSQL("ALTER TABLE " + PodDBAdapter.TABLE_NAME_FEEDS + + " ADD COLUMN " + PodDBAdapter.KEY_AUTO_DELETE_ACTION + " INTEGER DEFAULT 0"); + } EventBus.getDefault().post(ProgressEvent.end()); } }