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

Better support for downgrading Aerie & running down-migrations #1627

Open
dandelany opened this issue Jan 23, 2025 · 1 comment
Open

Better support for downgrading Aerie & running down-migrations #1627

dandelany opened this issue Jan 23, 2025 · 1 comment
Labels
database Anything related to the database documentation Improvements or additions to documentation feature A new feature or feature request

Comments

@dandelany
Copy link
Collaborator

Background

The Aerie DB migration script supports running down (ie. backward) migrations, for downgrading the database to older versions of Aerie - this is mostly used for troubleshooting, or if a customer encounters a blocker issue on a later version and wants to use an earlier version.

This process is somewhat documented in the docs here: https://nasa-ammos.github.io/aerie-docs/deployment/advanced-database-migrations/

Description

The docs for downgrading Aerie version could use improvement to make it clear what to do. It's a bit non-intuitive to run, and requires knowing which down migrations need to be run in advance. It would be great if the script could determine which migrations need to be run (maybe given a version number) - but failing that, the process for determining which ones to run should at least be documented

@dandelany dandelany added database Anything related to the database documentation Improvements or additions to documentation feature A new feature or feature request labels Jan 23, 2025
@dandelany dandelany added this to Aerie Jan 23, 2025
@github-project-automation github-project-automation bot moved this to Todo in Aerie Jan 23, 2025
@Mythicaeda
Copy link
Contributor

Two ideas to help track which migrations are needed to be on a specific Aerie DB version:

  1. Add a column to the migrations table that includes the Aerie release version of the migration. This would require developers to include and update the release version in both the up.sql and the init.sql, especially if a PR "slips" a release. This approach would have the benefit of the data being always available in the DB.
  2. Add a file to the deployment directory that tracks which migrations came out in the release. This has the advantage of being straightforward to update while cutting a new release. It has the disadvantage of requiring users to have and regularly pull the file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
database Anything related to the database documentation Improvements or additions to documentation feature A new feature or feature request
Projects
Status: Todo
Development

No branches or pull requests

2 participants