Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

22 Migrate Realm #1444

Merged
merged 1 commit into from
Oct 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,19 @@ class FileMigration : RealmMigration {

oldVersionTemp++
}

// Migrated to version 8
// - Add new field `fileId` in ShareLink table
// - Add new field `accessBlocked` in ShareLink table
if (oldVersionTemp == 7L) {
schema.get("ShareLink")?.apply {
addField("fileId", Int::class.java)
setNullable("fileId", true)
addField("accessBlocked", Boolean::class.java, FieldAttribute.REQUIRED)
}

oldVersionTemp++
}
}

override fun equals(other: Any?): Boolean {
Expand Down Expand Up @@ -376,7 +389,7 @@ class FileMigration : RealmMigration {
}

companion object {
const val dbVersion = 7L // Must be bumped when the schema changes
const val dbVersion = 8L // Must be bumped when the schema changes
const val LOGOUT_CURRENT_USER_TAG = "logout_current_user_tag"
}
}
Loading