Skip to content

Database

Stypox edited this page Mar 27, 2022 · 3 revisions

This page is in an early state and not yet completed or reviewed!

This pages gives some information on the internal app database. In short, you learn about the database structure and how to modify it as well as how to access the stored data.

Database structure

NewPipe is a streaming frontend. For this reason, storing information on streams is the database's core functionality.
Basically, stream information is used for feeds, playlists and watch history.

NewPipe's database structure

How to update this diagram?

Use https://dbeaver.io/ (FOSS)

Modifying the database structure

When modifying the database structure, the database version needs to be increased.
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 class. After creating the migration, it needs to be registered with the database to be executed if necessary.

Access data

Add some info on the DAO pattern here; AppDatabase and NewPipeDatabase

Clone this wiki locally