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

There are errors in the upgrade, but no transaction rollback #287

Open
kulta-jim opened this issue Feb 16, 2023 · 1 comment
Open

There are errors in the upgrade, but no transaction rollback #287

kulta-jim opened this issue Feb 16, 2023 · 1 comment

Comments

@kulta-jim
Copy link

python===3.10.6
aerich===0.7.1
tortoise-orm[aiomysql]==0.19.3

Aerich has no transaction rollback. I got a duplicate entry error after the first upgrade, and then I manually deleted the duplicate. However, during the second upgrade, it was found that the tables of some databases had been modified in the first upgrade.

@koffie
Copy link

koffie commented Aug 2, 2023

Did you run the upgrade with the --in-transaction option?

$ aerich upgrade --help
Usage: aerich upgrade [OPTIONS]

  Upgrade to specified version.

Options:
  -i, --in-transaction BOOLEAN  Make migrations in transaction or not. Can be
                                helpful for large migrations or creating
                                concurrent indexes.
  -h, --help                    Show this message and exit.

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