diff options
author | desperateCoder <echotodevnull@gmail.com> | 2020-12-10 19:08:49 +0300 |
---|---|---|
committer | desperateCoder <echotodevnull@gmail.com> | 2020-12-10 19:08:49 +0300 |
commit | 420d65466414afb0b0df55bca4be92beb5d30301 (patch) | |
tree | 25a77569220ba16c87eb83c6199a31e42f6df8fe | |
parent | 23579a2fb6e75b6458d1dbc06e6c24549c77172d (diff) |
#597 filter widget: fixed migration
2 files changed, 4 insertions, 4 deletions
diff --git a/app/src/main/java/it/niedermann/nextcloud/deck/model/widget/filter/FilterWidget.java b/app/src/main/java/it/niedermann/nextcloud/deck/model/widget/filter/FilterWidget.java index 989c787cf..cea2741f6 100644 --- a/app/src/main/java/it/niedermann/nextcloud/deck/model/widget/filter/FilterWidget.java +++ b/app/src/main/java/it/niedermann/nextcloud/deck/model/widget/filter/FilterWidget.java @@ -12,7 +12,7 @@ public class FilterWidget { @PrimaryKey(autoGenerate = true) private Long id; - private int dueType; + private Integer dueType; @Ignore private List<FilterWidgetAccount> accounts; @@ -44,11 +44,11 @@ public class FilterWidget { this.sorts = sorts; } - public int getDueType() { + public Integer getDueType() { return dueType; } - public void setDueType(int dueType) { + public void setDueType(Integer dueType) { this.dueType = dueType; } diff --git a/app/src/main/java/it/niedermann/nextcloud/deck/persistence/sync/adapters/db/DeckDatabase.java b/app/src/main/java/it/niedermann/nextcloud/deck/persistence/sync/adapters/db/DeckDatabase.java index b795488f4..764a05948 100644 --- a/app/src/main/java/it/niedermann/nextcloud/deck/persistence/sync/adapters/db/DeckDatabase.java +++ b/app/src/main/java/it/niedermann/nextcloud/deck/persistence/sync/adapters/db/DeckDatabase.java @@ -419,7 +419,7 @@ public abstract class DeckDatabase extends RoomDatabase { private static final Migration MIGRATION_23_24 = new Migration(23, 24) { @Override public void migrate(SupportSQLiteDatabase database) { - database.execSQL("CREATE TABLE `FilterWidget` (`id` INTEGER PRIMARY KEY AUTOINCREMENT)"); + database.execSQL("CREATE TABLE `FilterWidget` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `dueType` INTEGER)"); database.execSQL("CREATE TABLE `FilterWidgetAccount` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `filterWidgetId` INTEGER, `accountId` INTEGER, FOREIGN KEY(`accountId`) REFERENCES `Account`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE , FOREIGN KEY(`filterWidgetId`) REFERENCES `FilterWidget`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )"); database.execSQL("CREATE TABLE `FilterWidgetBoard` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `filterAccountId` INTEGER, `boardId` INTEGER, FOREIGN KEY(`boardId`) REFERENCES `Board`(`localId`) ON UPDATE NO ACTION ON DELETE CASCADE , FOREIGN KEY(`filterAccountId`) REFERENCES `FilterWidgetAccount`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )"); database.execSQL("CREATE TABLE `FilterWidgetLabel` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `filterBoardId` INTEGER, `labelId` INTEGER, FOREIGN KEY(`labelId`) REFERENCES `Label`(`localId`) ON UPDATE NO ACTION ON DELETE CASCADE , FOREIGN KEY(`filterBoardId`) REFERENCES `FilterWidgetBoard`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )"); |