From 62b7d74da997fbaf716a7227c32f58323ca41912 Mon Sep 17 00:00:00 2001 From: litetex <40789489+litetex@users.noreply.github.com> Date: Sat, 26 Mar 2022 22:03:42 +0100 Subject: [PATCH] Updated Database (markdown) --- Database.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Database.md b/Database.md index ab14635..72f7f0f 100644 --- a/Database.md +++ b/Database.md @@ -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) +
How to update this diagram? + +TODO: Add procedure here. + +
+ ### 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.