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

Remove pre 3.x db migrations and protect migration-log doc from edits #9639

Open
dianabarsan opened this issue Nov 12, 2024 · 0 comments
Open
Labels
Type: Improvement Make something better

Comments

@dianabarsan
Copy link
Member

What feature do you want to improve?
Database migrations are messy. Some of the early database migrations were so heavy, they took down deployments for days when they ran. They're also quite complex, can be destructive and are gatekept by a document migration-log. If a migration doesn't exist in this log, it will run the next time api starts. Editing the migration-log doc is not validated in any way, it's not protected by validate_doc_update, so deletes or edits can be extremely dangerous to a deployment.

Describe the improvement you'd like

  1. Make sure only admins can edit the migration log. And never allow it to be deleted. We can also make some specific rule about never removing a migration from being run.
  2. Remove migrations that were added before 3.x. These are the heaviest and most destructive. Nobody runs CHT 2.x any more, we don't support it. The migrations can be kept for historical reasons, but their code should never run over a database.

Describe alternatives you've considered
Leave it as it is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Improvement Make something better
Projects
None yet
Development

No branches or pull requests

1 participant