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

Add a migration for the short-lived intermediate v1 format #176

Merged
merged 3 commits into from
Jan 20, 2024

Conversation

JamesWrigley
Copy link
Member

Part of #151. This allows to migrate the proposals using the original v1 format to the current format. I don't intend to write tests for this migration because it's a one-off for a small number of proposals and I've already tested it on all of them 😛

This ends up making it a bit easier to test database changes, and it's safe
since the migrations always create a new database anyway.
@JamesWrigley JamesWrigley added the enhancement New feature or request label Jan 19, 2024
@JamesWrigley JamesWrigley self-assigned this Jan 19, 2024
print("If all seems OK, re-run the migration without --dry-run.")
else:
db_path = db_dir / DB_NAME
backup_path = db_dir / "runs.v0-backup.sqlite"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
backup_path = db_dir / "runs.v0-backup.sqlite"
backup_path = db_dir / "runs.oldfmt-backup.sqlite"

Not really significant, but might avoid some confusion if we need to go back to the backup for any reason, to see that this is different from v0.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, renamed to runs.intermediate-v1-backup.sqlite in 3048e2c.

@takluyver
Copy link
Member

LGTM, and I see in chat that you've been testing it, so presumably we know it works.

I wonder if we should have a subcommand a bit like extra-data-validate for damnit directories?

@JamesWrigley
Copy link
Member Author

I wonder if we should have a subcommand a bit like extra-data-validate for damnit directories?

Like, to check that the files have the right schema/datasets/attributes etc?

@JamesWrigley JamesWrigley merged commit 68b6a01 into master Jan 20, 2024
3 checks passed
@JamesWrigley JamesWrigley deleted the intermediate-migration branch January 20, 2024 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants