Export the database schema

Also set .gitlab-ci.yml to publish them at every build for convenience.

The exports should be committed (manually) to the git repository right after an
increase in database version.

Having the exports enables using autoMigrations when possible, for the future
database migrations.
This commit is contained in:
ggabr
2025-02-15 15:11:51 +01:00
parent 229989f4ec
commit 68628e8fd0
3 changed files with 6 additions and 1 deletions

View File

@@ -17,6 +17,7 @@ assembleDebug:
artifacts:
paths:
- $DEBUG_BINARY_PATH
- 'app/schemas/com.aurora.store.data.room.AuroraDatabase/'
uploadDebug:
stage: upload

View File

@@ -131,6 +131,10 @@ android {
}
}
ksp {
arg("room.schemaLocation", "$projectDir/schemas")
}
dependencies {
//Google's Goodies

View File

@@ -14,7 +14,7 @@ import com.aurora.store.data.room.update.UpdateDao
@Database(
entities = [Download::class, Favourite::class, Update::class],
version = 5,
exportSchema = false
exportSchema = true
)
@TypeConverters(DownloadConverter::class)
abstract class AuroraDatabase : RoomDatabase() {