-
Notifications
You must be signed in to change notification settings - Fork 212
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
Make app AutoField configurable on first deployment #465
base: main
Are you sure you want to change the base?
Make app AutoField configurable on first deployment #465
Conversation
1d87f48
to
0d75c01
Compare
0d75c01
to
94380cb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should also think about what if existing projects want to migrate to this
Thta's true, but that is more complicated and I don't think I want to tackle migrating existing installations in this pull request. Such migration might not even be feasible in a database agnostic way, as writing a safe migration might need to use database specific features. The project is tested against Postgres only, but it doesn't seem to use any PG only features? Is it supposed to work on other databases backend supported by Django? |
@@ -0,0 +1,19 @@ | |||
Configuration |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is another setting DJANGO_CELERY_RESULTS_TASK_ID_MAX_LENGTH
which should probably be added here but I'd rather do this separately if you don't mind.
what is your take on this PR? although it is not 100% design wise #314 |
That could also be a solution to the problem described in #307, although I would argue that's solving an othogonal problem. It's a bit heavy handed for thoses who only want to customise the primary key, and new users usually won't know about the primary key overflow until it's too late. I'm seeing a fundamental missing piece betwen both PRs: formalising If you have another pattern you prefer, I'm happy to use another example as a blueprint. I can contribute this piece separately first. |
While not fully addressing the problem reported in #307, it switches new installations to use a
BigAutoField
for primary key. Existing installations won't see any changes unless they replay the migrations and to recreate the result table.