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

Migrate primary key values on models to UUIDs #683

Open
ajstewart opened this issue Apr 12, 2023 · 0 comments
Open

Migrate primary key values on models to UUIDs #683

ajstewart opened this issue Apr 12, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@ajstewart
Copy link
Contributor

I've realised recently that migrating the primary keys to UUIDs will potentially have a large benefit in then being able to implement #383 (django-postgres-copy implementation).

Currently the default integer values are used which is fine, but has the complication that it becomes difficult to set primary keys manually. To implement the Postgres copy method - which should significantly speed up the database writing - the primary keys (or at least an index key) should be declared on upload and used for foreign keys. Generating UUIDs would be good for this and is a common practise.

At the moment the index values are returned on the upload step and are used from that point on.

Would have to be a careful migration but might be worth it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

No branches or pull requests

1 participant