Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automated upgrade of database on start of app #506

Open
4 tasks
andrew-codes opened this issue Aug 19, 2024 · 0 comments
Open
4 tasks

Automated upgrade of database on start of app #506

andrew-codes opened this issue Aug 19, 2024 · 0 comments
Labels
app:playnite-web Web app enhancement New feature or request

Comments

@andrew-codes
Copy link
Owner

andrew-codes commented Aug 19, 2024

Some major version changes require changes to the database's schema. Historically, the recommendation is to drop the entire database and perform a Playnite Web sync after starting the upgraded application. This only works because there is currently no data in the database that is not from a sync. However, there are upcoming features that will require non-synced data to be stored, in which case we would not want to drop the database due to schema changes. For this reason, we want to enable the ability to automatically migrate an existing database and its data to a new release's schema.

When starting the application, it should compare its version to the current database schema version (will require tracking the application version in persistent storage). If the versions are different, then it should perform an upgrade script (if defined) to go from the current version to the next major version. This should be done for each major version in between the database schema's version and the running application's version. This should be successfully completed before starting the rest of the application.

  • Migration should occur when starting the application. It should be successfully completed prior to the running of the application (web server, etc.).
  • Unsuccessful migrations should prevent the application from starting
  • A migration is defined for a given major release. A major release may or may not have a migration associated to it.
  • If there are multiple migrations available, then they are performed sequentially in ascending order.
@andrew-codes andrew-codes added app:playnite-web Web app enhancement New feature or request labels Aug 19, 2024
@github-project-automation github-project-automation bot moved this to Needs Triage 🗃️ in Playnite-Web Aug 19, 2024
@andrew-codes andrew-codes moved this from Needs Triage 🗃️ to Backlog in Playnite-Web Aug 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
app:playnite-web Web app enhancement New feature or request
Projects
Status: Backlog
Development

No branches or pull requests

1 participant