Updated Database (markdown)
parent
ec2d23b344
commit
62b7d74da9
|
@ -8,6 +8,12 @@ Basically, stream information is used for feeds, playlists and watch history.
|
|||
|
||||
![NewPipe's database structure](https://user-images.githubusercontent.com/17365767/141841352-eefcd324-abfe-480b-9626-17db21f6c9de.png)
|
||||
|
||||
<details><summary><i>How to update this diagram?</i></summary>
|
||||
|
||||
TODO: Add procedure here.
|
||||
|
||||
</details>
|
||||
|
||||
### Modifying the database structure
|
||||
When modifying the database structure, the [database version needs to be increased](https://github.com/TeamNewPipe/NewPipe/blob/dev/app/src/main/java/org/schabi/newpipe/database/AppDatabase.java#L41).
|
||||
You also need to create a migration to update the structure on installations which run an old database version. This is done in the [`Migrations`](https://github.com/TeamNewPipe/NewPipe/blob/dev/app/src/main/java/org/schabi/newpipe/database/Migrations.java) class. After creating the migration, it needs to be [registered with the database](https://github.com/TeamNewPipe/NewPipe/blob/dev/app/src/main/java/org/schabi/newpipe/NewPipeDatabase.java#L26) to be executed if necessary.
|
||||
|
|
Loading…
Reference in New Issue