Skip to content
This repository was archived by the owner on Feb 4, 2025. It is now read-only.

Commit b473446

Browse files
author
Thomas Horta
authored
Merge pull request #2916 from wordpress-mobile/release/2.55.2
Merge Release/2.55.2 in release/2.57.1
2 parents 8076d17 + 01c8802 commit b473446

File tree

1 file changed

+0
-36
lines changed

1 file changed

+0
-36
lines changed

fluxc/src/main/java/org/wordpress/android/fluxc/persistence/WPAndroidDatabase.kt

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@ abstract class WPAndroidDatabase : RoomDatabase() {
105105
.addMigrations(MIGRATION_18_19)
106106
.addMigrations(MIGRATION_19_20)
107107
.addMigrations(MIGRATION_20_21)
108-
.addMigrations(MIGRATION_21_22)
109108
.build()
110109

111110
val MIGRATION_1_2 = object : Migration(1, 2) {
@@ -311,40 +310,5 @@ abstract class WPAndroidDatabase : RoomDatabase() {
311310
}
312311
}
313312
}
314-
315-
val MIGRATION_21_22 = object : Migration(21, 22) {
316-
override fun migrate(database: SupportSQLiteDatabase) {
317-
// migrate old data to new table schema
318-
database.apply {
319-
execSQL(
320-
"CREATE TABLE IF NOT EXISTS `BloggingPrompts_new` (" +
321-
"`id` INTEGER NOT NULL," +
322-
"`siteLocalId` INTEGER NOT NULL," +
323-
"`text` TEXT NOT NULL," +
324-
"`date` TEXT NOT NULL," +
325-
"`isAnswered` INTEGER NOT NULL," +
326-
"`respondentsCount` INTEGER NOT NULL," +
327-
"`attribution` TEXT NOT NULL," +
328-
"`respondentsAvatars` TEXT NOT NULL," +
329-
"`answeredLink` TEXT NOT NULL," +
330-
"PRIMARY KEY(`date`)" +
331-
")"
332-
)
333-
334-
val tagPrefix = "https://wordpress.com/tag/dailyprompt-"
335-
execSQL(
336-
"INSERT INTO BloggingPrompts_new (" +
337-
"id, siteLocalId, text, date, isAnswered, " +
338-
"respondentsCount, attribution, respondentsAvatars, answeredLink) " +
339-
"SELECT id, siteLocalId, text, date, isAnswered, " +
340-
"respondentsCount, attribution, respondentsAvatars, " +
341-
"'$tagPrefix' || id FROM BloggingPrompts"
342-
)
343-
344-
execSQL("DROP TABLE `BloggingPrompts`")
345-
execSQL("ALTER TABLE `BloggingPrompts_new` RENAME TO `BloggingPrompts`")
346-
}
347-
}
348-
}
349313
}
350314
}

0 commit comments

Comments
 (0)