Skip to content

Check database version in CLI#66

Open
Yannicked wants to merge 3 commits intoiterorganization:developfrom
Yannicked:feature/cli-alembic
Open

Check database version in CLI#66
Yannicked wants to merge 3 commits intoiterorganization:developfrom
Yannicked:feature/cli-alembic

Conversation

@Yannicked
Copy link
Copy Markdown
Collaborator

Verifies the local database version using alembic

else:
raise e
except DatabaseOutdatedError as e:
if Confirm.ask("Local database schema is out of date. Run migrations now?"):
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Would you recommend users create a backup of the existing database (or even create it automatically for them) in case the migration fails?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It would not be easy to find database files and restore (if something went wrong) for every user. I would suggest to create database backup automatically and incase if migration fails should be able to rollback.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Also good to inform the user is what is backed up and where it stored.

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

Successfully merging this pull request may close these issues.

3 participants