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

Separate the column type change and index creation for MessageLog.priority #118

Merged
merged 1 commit into from
Jan 10, 2020

Conversation

tim-schilling
Copy link
Contributor

Closes #115.

Changes proposed in this PR:

  • Separate the column type change and index creation for MessageLog.priority

@coveralls
Copy link

coveralls commented Jan 10, 2020

Coverage Status

Coverage increased (+21.0%) to 71.762% when pulling 0b34342 on tim-schilling:postgres-django-2-upgrade into f78db66 on pinax:master.

@spookylukey
Copy link
Contributor

Thanks, LGTM.

@spookylukey spookylukey merged commit 80f3d3d into pinax:master Jan 10, 2020
@davidszotten
Copy link
Contributor

any chance of a point release with this fix? i've also come across it. one thing i noticed is that, like in the #115 my index name also doesn't have the hash (mailer_messagelog_priority_like vs mailer_messagelog_priority_5e712cf3_like). i wonder if these are old index names from South (my project's been around for a while)

comparing the output of sqlmigrate, with this patch i also get DROP INDEX IF EXISTS "mailer_messagelog_priority_like"; as opposed to only DROP INDEX IF EXISTS "mailer_messagelog_priority_5e712cf3_like"; without, which of course leaves our old-style-named indexes around which then makes pg upset when changing the column type

@spookylukey
Copy link
Contributor

@davidszotten I've pushed a release now, 2.0.1

Most likely for your case you'll have to manually drop that index first, it should be a problem. I don't know there is much I can do about that.

@davidszotten
Copy link
Contributor

no, this patch fixes it. i'm still digging through django source to understand exactly why, but having a step that removes db_index, django does figure out how to delete the index without the hash in the name

@davidszotten
Copy link
Contributor

forgot to say, thanks!

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.

Migration Error with PostgreSQL when upgrading to v2.0
4 participants