diff --git a/libpretixsync/src/main/java/eu/pretix/libpretixsync/db/Migrations.java b/libpretixsync/src/main/java/eu/pretix/libpretixsync/db/Migrations.java index 94343ddd..8254fe39 100644 --- a/libpretixsync/src/main/java/eu/pretix/libpretixsync/db/Migrations.java +++ b/libpretixsync/src/main/java/eu/pretix/libpretixsync/db/Migrations.java @@ -440,6 +440,9 @@ public static void migrate(DataSource dataSource, boolean dbIsNew) throws SQLExc } public static void android_manual_migrations(Connection c, int oldVersion, int newVersion) throws SQLException { + if (oldVersion < 58 && newVersion >= 58) { + execIgnore(c, "UPDATE checkin SET listId = list WHERE (listId IS NULL OR listID = 0) AND list IS NOT NULL AND list > 0", new String[] {"no such column", "existiert", "syntax error"}); + } if (oldVersion < 87 && newVersion >= 87) { execIgnore(c, "CREATE INDEX receipt_open ON receipt (open) WHERE open = 1;", new String[] {"already exists", "existiert bereits"}); } diff --git a/libpretixsync/src/main/java/eu/pretix/libpretixsync/sync/SyncManager.java b/libpretixsync/src/main/java/eu/pretix/libpretixsync/sync/SyncManager.java index f8f185a2..82c8ad21 100644 --- a/libpretixsync/src/main/java/eu/pretix/libpretixsync/sync/SyncManager.java +++ b/libpretixsync/src/main/java/eu/pretix/libpretixsync/sync/SyncManager.java @@ -306,13 +306,6 @@ private void bumpKnownVersion() { configStore.setLastFailedSync(System.currentTimeMillis()); configStore.setLastFailedSyncMsg(e.getMessage()); } - - // This is kind of a manual migration, added in 2020-19. Remove at some late point in time - try { - dataStore.raw("UPDATE checkin SET listId = list WHERE (listId IS NULL OR listID = 0) AND list IS NOT NULL AND list > 0"); - } catch (Exception e) { - // old column doesn't exist? ignore! - } } protected void upload(ProgressFeedback feedback) throws SyncException {