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

Missing migrations #48

Closed
wants to merge 1 commit into from

Conversation

@fizista
Copy link

commented May 30, 2016

No description provided.

@thornomad

This comment has been minimized.

Copy link
Owner

commented May 31, 2016

Hi - thanks for submitting a pull request ... trying to understand, though, why the migration was generated.

Check out the initial migration:

https://github.com/thornomad/django-hitcount/blob/master/hitcount/migrations/0001_initial.py#L65

Is it just changing the verbose_name from b'object ID' to 'object ID' ?

Thanks,
Damon

@fizista

This comment has been minimized.

Copy link
Author

commented May 31, 2016

Also I wonder what kind of situation migrations include the text of type bytes.

And that's what I came once, that if in a file "models.py", the text is the type of bytes, then Django separates this type of type of str.

And if you change the type of str to the bytes, then a migration Django is able to detect.

@thornomad

This comment has been minimized.

Copy link
Owner

commented May 31, 2016

I think that Django no longer uses b in their migrations to prevent crashes ... so, it would seem that with the b it is creating a migration. See this ticket.

I wonder if, rather than create a whole new migration, the initial migration can just be edited and have the b removed. Without the bytes flag no new migrations are detected.

What do you think? I am not as familiar with migrations as I would like and wonder if that would cause a problem.

@fizista

This comment has been minimized.

Copy link
Author

commented May 31, 2016

In this case, there should not be any problems when you change the initial migration.

Regardless of how to resolve this problem, you will need to publish a new version of the application.

@thornomad

This comment has been minimized.

Copy link
Owner

commented May 31, 2016

Yea - I will bump a minor version for this. I need to check one other thing then will push all the changes.

thornomad added a commit that referenced this pull request May 31, 2016

@thornomad

This comment has been minimized.

Copy link
Owner

commented May 31, 2016

Pushed 1.2.2 - hopefully this fixes it all. Thanks for pointing it out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.