Skip to content

Commit

Permalink
Add app.db migration to v57 (#5617)
Browse files Browse the repository at this point in the history
### Description
Fixes a missing DB migration from
#5599
  • Loading branch information
LukasPaczos authored Feb 7, 2025
1 parent 748ae69 commit 9c67bf0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions app/src/main/java/com/duckduckgo/app/global/db/AppDatabase.kt
Original file line number Diff line number Diff line change
Expand Up @@ -687,6 +687,12 @@ class MigrationsProvider(val context: Context, val settingsDataStore: SettingsDa
}
}

private val MIGRATION_56_TO_57: Migration = object : Migration(56, 57) {
override fun migrate(database: SupportSQLiteDatabase) {
database.execSQL("CREATE TABLE IF NOT EXISTS `experiment_app_usage_entity` (`isoDateET` TEXT NOT NULL, PRIMARY KEY(`isoDateET`))")
}
}

/**
* WARNING ⚠️
* This needs to happen because Room doesn't support UNIQUE (...) ON CONFLICT REPLACE when creating the bookmarks table.
Expand Down Expand Up @@ -768,6 +774,7 @@ class MigrationsProvider(val context: Context, val settingsDataStore: SettingsDa
MIGRATION_53_TO_54,
MIGRATION_54_TO_55,
MIGRATION_55_TO_56,
MIGRATION_56_TO_57,
)

@Deprecated(
Expand Down

0 comments on commit 9c67bf0

Please sign in to comment.