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

DANDI database migration procedure #19

Open
kabilar opened this issue Jan 5, 2024 · 2 comments
Open

DANDI database migration procedure #19

kabilar opened this issue Jan 5, 2024 · 2 comments

Comments

@kabilar
Copy link
Member

kabilar commented Jan 5, 2024

  • Discuss strategies with Kitware team on the Django migrations. Since LINC is now dependent on the changes in DANDI, perhaps squash migrations should not occur.
@aaronkanzer
Copy link

Root of the problem is that linc-archive (and any other dandi-archive forks) will rely on Django DB migrations as a source-of-truth for their own database schemas.

We should limit this operation in the future so that downstream users do not find themselves with inconsistent migration history. The common resolution to this issue is manual invocation of Django commands and Python scripts. Manual alteration of Django migrations presents substantial risk so this is less than ideal.

See dandi#1778 (comment) for some context. I would politely disagree with the rationale of squashing migrations.

@aaronkanzer
Copy link

Noting for future reference --

In this most recent scenario, I had to backup the DB via heroku pg:backups, then reset the DB, then heroku pg:backups:restore <db-backup-id> DATABASE_URL --app linc-staging-terraform --confirm linc-staging-terraform

Process worked OK -- could not confirm though how bad downtime may have been....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants