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

Add migration guide for integer PK field #48

Closed
florimondmanca opened this issue Jun 21, 2019 · 2 comments
Closed

Add migration guide for integer PK field #48

florimondmanca opened this issue Jun 21, 2019 · 2 comments
Labels
docs Request for documentation
Milestone

Comments

@florimondmanca
Copy link
Owner

florimondmanca commented Jun 21, 2019

Is your feature request related to a problem? Please describe.
#40 (Integer primary key field) got merged, but it includes a breaking change for users that have models that reference APIKey as a foreign key, e.g.:

class Person(models.Model):
    api_key = models.ForeignKey("APIKey")

A proper migration guide for users is a prerequisite for 2.0.

Describe the solution you'd like
Add a migration guide to a new docs/ folder. It should explain:

  • What the change is
  • How to check if one is affected
  • Steps to securely upgrade without losing existing data

This guide will be referenced in the changelog when preparing the 2.0 release.

Many hints were already provided by @eagle-r in #41, especially here: #41 (comment)

Another detailed plan for migrating FKs was shared here: #42 (comment)

Describe alternatives you've considered
/

Additional context
Please read #41 for the initial full conversation.

@florimondmanca florimondmanca added docs Request for documentation cleanup labels Jun 21, 2019
@florimondmanca florimondmanca added this to the 2.0 milestone Jun 21, 2019
@florimondmanca
Copy link
Owner Author

I’ve just brought the changes from master back onto dev/2.0. The tests were already using the abstract model which means that the derived model did not benefit from the migrations from #41 right away — I had to edit the migration to basically replicate the one from #41. We should also document this here.

@florimondmanca
Copy link
Owner Author

Closing as this issue (and the dev/2.0 branch…) is now very out of date with master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Request for documentation
Projects
None yet
Development

No branches or pull requests

1 participant