@@ -16,17 +16,17 @@ import com.nextcloud.client.database.migrations.DatabaseMigrationUtil.TYPE_TEXT
1616
1717class RoomMigration : Migration (NextcloudDatabase .FIRST_ROOM_DB_VERSION - 1 , NextcloudDatabase .FIRST_ROOM_DB_VERSION ) {
1818
19- override fun migrate (database : SupportSQLiteDatabase ) {
20- migrateFilesystemTable(database )
21- migrateUploadsTable(database )
22- migrateCapabilitiesTable(database )
23- migrateFilesTable(database )
19+ override fun migrate (db : SupportSQLiteDatabase ) {
20+ migrateFilesystemTable(db )
21+ migrateUploadsTable(db )
22+ migrateCapabilitiesTable(db )
23+ migrateFilesTable(db )
2424 }
2525
2626 /* *
2727 * filesystem table: STRING converted to TEXT
2828 */
29- private fun migrateFilesystemTable (database : SupportSQLiteDatabase ) {
29+ private fun migrateFilesystemTable (db : SupportSQLiteDatabase ) {
3030 val newColumns = mapOf (
3131 " _id" to TYPE_INTEGER_PRIMARY_KEY ,
3232 " local_path" to TYPE_TEXT ,
@@ -38,13 +38,13 @@ class RoomMigration : Migration(NextcloudDatabase.FIRST_ROOM_DB_VERSION - 1, Nex
3838 " modified_at" to TYPE_INTEGER
3939 )
4040
41- DatabaseMigrationUtil .migrateTable(database , " filesystem" , newColumns)
41+ DatabaseMigrationUtil .migrateTable(db , " filesystem" , newColumns)
4242 }
4343
4444 /* *
4545 * uploads table: LONG converted to INTEGER
4646 */
47- private fun migrateUploadsTable (database : SupportSQLiteDatabase ) {
47+ private fun migrateUploadsTable (db : SupportSQLiteDatabase ) {
4848 val newColumns = mapOf (
4949 " _id" to TYPE_INTEGER_PRIMARY_KEY ,
5050 " local_path" to TYPE_TEXT ,
@@ -64,13 +64,13 @@ class RoomMigration : Migration(NextcloudDatabase.FIRST_ROOM_DB_VERSION - 1, Nex
6464 " folder_unlock_token" to TYPE_TEXT
6565 )
6666
67- DatabaseMigrationUtil .migrateTable(database , " list_of_uploads" , newColumns)
67+ DatabaseMigrationUtil .migrateTable(db , " list_of_uploads" , newColumns)
6868 }
6969
7070 /* *
7171 * capabilities table: "files_drop" column removed
7272 */
73- private fun migrateCapabilitiesTable (database : SupportSQLiteDatabase ) {
73+ private fun migrateCapabilitiesTable (db : SupportSQLiteDatabase ) {
7474 val newColumns = mapOf (
7575 " _id" to TYPE_INTEGER_PRIMARY_KEY ,
7676 " account" to TYPE_TEXT ,
@@ -122,13 +122,13 @@ class RoomMigration : Migration(NextcloudDatabase.FIRST_ROOM_DB_VERSION - 1, Nex
122122 " files_locking_version" to TYPE_TEXT
123123 )
124124
125- DatabaseMigrationUtil .migrateTable(database , " capabilities" , newColumns)
125+ DatabaseMigrationUtil .migrateTable(db , " capabilities" , newColumns)
126126 }
127127
128128 /* *
129129 * files table: "public_link" column removed
130130 */
131- private fun migrateFilesTable (database : SupportSQLiteDatabase ) {
131+ private fun migrateFilesTable (db : SupportSQLiteDatabase ) {
132132 val newColumns = mapOf (
133133 " _id" to TYPE_INTEGER_PRIMARY_KEY ,
134134 " filename" to TYPE_TEXT ,
@@ -174,6 +174,6 @@ class RoomMigration : Migration(NextcloudDatabase.FIRST_ROOM_DB_VERSION - 1, Nex
174174 " lock_timeout" to TYPE_INTEGER ,
175175 " lock_token" to TYPE_TEXT
176176 )
177- DatabaseMigrationUtil .migrateTable(database , " filelist" , newColumns)
177+ DatabaseMigrationUtil .migrateTable(db , " filelist" , newColumns)
178178 }
179179}
0 commit comments