mirror of
https://github.com/TeamNewPipe/NewPipe.git
synced 2025-10-06 12:00:19 +02:00
-Bump database version to 2.
-Added migration script for upgrading database from version 1 to 2. -Fixed database name of stream type in stream entity.
This commit is contained in:
parent
ba9d0d7707
commit
3c314ced0a
6 changed files with 62 additions and 11 deletions
|
@ -7,6 +7,7 @@ import android.support.annotation.NonNull;
|
|||
import org.schabi.newpipe.database.AppDatabase;
|
||||
|
||||
import static org.schabi.newpipe.database.AppDatabase.DATABASE_NAME;
|
||||
import static org.schabi.newpipe.database.Migrations.MIGRATION_11_12;
|
||||
|
||||
public final class NewPipeDatabase {
|
||||
|
||||
|
@ -17,9 +18,10 @@ public final class NewPipeDatabase {
|
|||
}
|
||||
|
||||
public static void init(Context context) {
|
||||
databaseInstance = Room.databaseBuilder(context.getApplicationContext(),
|
||||
AppDatabase.class, DATABASE_NAME
|
||||
).build();
|
||||
databaseInstance = Room
|
||||
.databaseBuilder(context.getApplicationContext(), AppDatabase.class, DATABASE_NAME)
|
||||
.addMigrations(MIGRATION_11_12)
|
||||
.build();
|
||||
}
|
||||
|
||||
@NonNull
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue