File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed
main/java/fr/free/nrw/commons/data
test/kotlin/fr/free/nrw/commons/contributions Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change 1414public class DBOpenHelper extends SQLiteOpenHelper {
1515
1616 private static final String DATABASE_NAME = "commons.db" ;
17- private static final int DATABASE_VERSION = 9 ;
17+ private static final int DATABASE_VERSION = 10 ;
1818
1919 /**
2020 * Do not use directly - @Inject an instance where it's needed and let
Original file line number Diff line number Diff line change @@ -126,6 +126,15 @@ class ContributionDaoTest {
126126 }
127127 }
128128
129+ @Test
130+ fun migrateTableVersionFrom_v9_to_v10 () {
131+ Table .onUpdate(database, 8 , 9 )
132+ // Table changed in version 9
133+ inOrder(database) {
134+ verify<SQLiteDatabase >(database).execSQL(Table .ADD_WIKI_DATA_ENTITY_ID_FIELD )
135+ }
136+ }
137+
129138 @Test
130139 fun saveNewContribution_nonNullFields () {
131140 whenever(client.insert(isA(), isA())).thenReturn(contentUri)
You can’t perform that action at this time.
0 commit comments