-
Notifications
You must be signed in to change notification settings - Fork 436
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
Messed up migration files #217
Comments
similarly to here https://github.com/EliotBerriot/django-dynamic-preferences/issues/23 would it be possible to limit the |
would you welcome a PR which makes the max_length configurable like so? https://github.com/python-social-auth/social-app-django/blob/master/social_django/migrations/0003_alter_email_max_length.py |
@tuky FYI, that's dangerous, since you can't change it after the migration runs. If this was my repo, I would never support that |
I object, you can change the setting and run a custom sql migration, which realizes the new value. |
True, but many users don't understand how to use that and it can cause a lot of issues. Either way, goal #1 should be to get the current migrations in a good place |
doesn't the 1.4 release fix the migration problems? |
i've had no problems applying all the migrations apart from |
It depends on what version you had installed. Migration files after a release shouldn't be edited since they are already being used |
Migrations were sane at 1.4.0 — except maybe two 0006 files both depending on 0005 — but things have gone "sideways" after that on Django's view on squashing migrations
Note the It goes on saying:
Out of those, (2) has not happened on Status quo on
|
@moseb Good write up. The issue was that whoever squashed the migrations did... something... that made backward migration and forward again fail. This I took the unconventional approach to get all migrations passing, and added tests as well to hopefully keep it from happening again. Maybe I messed up though! If you can make a PR and all the migration tests I added pass, then I’d accept it since it’s generally better to not have to manually touch the migrations table. |
@moseb and @liquidpele, I don't think it was the squashing that was the problem. I think it was multiple PR's got merged in that all were taken from the same point and all had I started with a patch in #210 that has everything working, other then migrating from v1.2.0, but I'm not entirely sure without some hacky-ness if they can all 100% work. But I also didn't devote too much time on it yet. @moseb, since the squash migration hasn't been finalized in a release, I don't feel there is a need to keep it, do you? The only benefit would be the faster install time for people running tests in their projects, at which point there could be a new one made to cover everything once it's all sorted out. The squashed migration can never get to If there is a way I can help, I would be happy to. |
@justmobilize The squashed migration exists in 1.4.0. https://github.com/celery/django-celery-beat/tree/v1.4.0/django_celery_beat/migrations Thus, we can't just undo the squash, we have to fix it. As I said, I'm happy to look at other solutions, just make sure all the new upgrade tests pass! :) |
I get the idea but since the file was published as part of 1.4.0, I think other projects might depend on the squashed version wince it has a distinct name that can be referenced. Also, keeping the file would allow faster updates for people doing a multi-step update. What do you think? |
I'll see what I can do |
This reverts part of 0c2586b For a detailed explanation why please check: celery#217 (comment)
For a detailed explanation why please check: celery#217 (comment)
It doesn't hurt to leave it in there. Just clutter in my opinion. Removing it would leave a ghost entry in the It could also be left in there with no |
This reverts part of 0c2586b For a detailed explanation why please check: celery#217 (comment)
For a detailed explanation why please check: celery#217 (comment)
Pull request #246 has just been merged. Is anything left to fix this issue? |
Hello! Are there plans to create a new version with corrected migrations? I would love to use some of the new features, but until the migrations are stable, I can't.
I would be happy to help if I can get commitment to the release being rolled out quickly.
The text was updated successfully, but these errors were encountered: