Skip to content

Use "factory" method for creating db migrations#12990

Merged
TobiGr merged 1 commit intodevfrom
unknown repository
Jan 9, 2026
Merged

Use "factory" method for creating db migrations#12990
TobiGr merged 1 commit intodevfrom
unknown repository

Conversation

@ghost
Copy link
Copy Markdown

@ghost ghost commented Jan 2, 2026

What is it?

  • Codebase improvement (dev facing)

Description of the changes in your PR

  • Use "factory" method for creating db migrations

git diff is ugly but only real change is from

    val MIGRATION_XXX = object : Migration(DB_VER_X, DB_VER_X) {
        override fun migrate(db: SupportSQLiteDatabase) {

to

    val MIGRATION_XXX = Migration(DB_VER_X, DB_VER_X) { db ->

+ subsequent remove of one indent level

APK testing

The APK can be found by going to the "Checks" tab below the title. On the left pane, click on "CI", scroll down to "artifacts" and click "app" to download the zip file which contains the debug APK of this PR. You can find more info and a video demonstration on this wiki page.

Due diligence

@github-actions github-actions Bot added the size/large PRs with less than 750 changed lines label Jan 2, 2026
@ghost
Copy link
Copy Markdown
Author

ghost commented Jan 4, 2026

When you will be reviewing it select "hide whitespace" in diff settings of github

@ghost ghost closed this Jan 7, 2026
@ghost ghost deleted the db_migration_kotlin branch January 7, 2026 18:51
@ghost ghost restored the db_migration_kotlin branch January 7, 2026 18:51
@ghost ghost reopened this Jan 7, 2026
@TobiGr TobiGr added code quality Improvements to the codebase to improve the code quality database Issue and PRs related to database operations labels Jan 9, 2026
@TobiGr TobiGr merged commit e61bc01 into TeamNewPipe:dev Jan 9, 2026
13 checks passed
@ghost ghost deleted the db_migration_kotlin branch January 9, 2026 03:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

code quality Improvements to the codebase to improve the code quality database Issue and PRs related to database operations size/large PRs with less than 750 changed lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant