Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/stefan-niedermann/nextcloud-deck.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordesperateCoder <echotodevnull@gmail.com>2021-04-14 19:59:30 +0300
committerdesperateCoder <echotodevnull@gmail.com>2021-04-14 19:59:30 +0300
commit5f0436a1bf85ed1e2d668e28e6ce2b15a2a651f5 (patch)
tree6d89806cd42d24b5ad00a8f8a39bee45a0e05c85 /app/src/main/java/it/niedermann/nextcloud/deck/persistence/sync/adapters
parentd3dc74af0c1eab8d97ea63c975a38da9957b47d9 (diff)
#935 wtf did i just witness?!
Diffstat (limited to 'app/src/main/java/it/niedermann/nextcloud/deck/persistence/sync/adapters')
-rw-r--r--app/src/main/java/it/niedermann/nextcloud/deck/persistence/sync/adapters/db/migration/Migration_30_31.java1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/src/main/java/it/niedermann/nextcloud/deck/persistence/sync/adapters/db/migration/Migration_30_31.java b/app/src/main/java/it/niedermann/nextcloud/deck/persistence/sync/adapters/db/migration/Migration_30_31.java
index 99d6d169d..53d779362 100644
--- a/app/src/main/java/it/niedermann/nextcloud/deck/persistence/sync/adapters/db/migration/Migration_30_31.java
+++ b/app/src/main/java/it/niedermann/nextcloud/deck/persistence/sync/adapters/db/migration/Migration_30_31.java
@@ -28,6 +28,7 @@ public class Migration_30_31 extends Migration {
database.execSQL("CREATE UNIQUE INDEX `index_AccessControl_accountId_id` ON `AccessControl` (`accountId`, `id`)");
database.execSQL("CREATE TABLE `Activity_tmp` (`localId` INTEGER PRIMARY KEY AUTOINCREMENT, `accountId` INTEGER NOT NULL, `id` INTEGER, `status` INTEGER NOT NULL, `lastModified` INTEGER, `lastModifiedLocal` INTEGER, `etag` TEXT, `cardId` INTEGER NOT NULL, `subject` TEXT, `type` INTEGER NOT NULL, FOREIGN KEY(`cardId`) REFERENCES `Card`(`localId`) ON UPDATE NO ACTION ON DELETE CASCADE , FOREIGN KEY(`accountId`) REFERENCES `Account`(`id`) ON DELETE CASCADE )");
database.execSQL("DELETE FROM `Activity` where accountId not in (select id from `Account`)");
+ database.execSQL("UPDATE `Activity` SET `type` = 2 WHERE `type` IS NULL");
database.execSQL("INSERT INTO `Activity_tmp` select * from `Activity`");
database.execSQL("DROP TABLE `Activity`");
database.execSQL("ALTER TABLE `Activity_tmp` RENAME TO `Activity`");