Bigint AutoField (fixes #56, #13774) #308

Closed
wants to merge 14 commits into
from

Conversation

Projects
None yet
9 participants
@pzinovkin

Alternative approach to fix ticket 56.
Based on discussion #49
This approach doesn't change AutoField behavior. Only those who need extended int range may use it.
It keeps values ranges consistent between databases. Also it works nice with related fields.
Now with tests.

claudep added some commits Aug 23, 2012

Fixed #12460 -- Improved inspectdb handling of special field names
Thanks mihail lukin for the report and elijahr and kgibula for their
work on the patch.
@magevadi

This comment has been minimized.

Show comment
Hide comment
@magevadi

magevadi Aug 23, 2012

Shouldn't it be
if new_name.find('') >0:
instead of
if new_name.find('
') >= 0: ?
same goes for the following conditions. Please correct me if I am wrong. Thanks!

Shouldn't it be
if new_name.find('') >0:
instead of
if new_name.find('
') >= 0: ?
same goes for the following conditions. Please correct me if I am wrong. Thanks!

This comment has been minimized.

Show comment
Hide comment
@ramiro

ramiro Aug 24, 2012

Member

@mageshkhanna

From help(str.find) output: S.find(sub [,start [,end]]) -> int -- Return the lowest index in S where substring sub is found [...] Return -1 on failure.

So, the code is correct as it is.

Member

ramiro replied Aug 24, 2012

@mageshkhanna

From help(str.find) output: S.find(sub [,start [,end]]) -> int -- Return the lowest index in S where substring sub is found [...] Return -1 on failure.

So, the code is correct as it is.

ramiro and others added some commits Aug 24, 2012

Added a GeoDjango test with a raw query (Refs #17448)
Thanks David Eklund for the initial patch.
Fixed #16715 -- Fixed join promotion logic for nested nullable FKs
The joins for nested nullable foreign keys were often created as INNER
when they should have been OUTER joins. The reason was that only the
first join in the chain was promoted correctly. There were also issues
with select_related etc.

The basic structure for this problem was:
  A -[nullable]-> B -[nonnull]-> C

And the basic problem was that the A->B join was correctly LOUTER,
the B->C join not.

The major change taken in this patch is that now if we promote a join
A->B, we will automatically promote joins B->X for all X in the query.
Also, we now make sure there aren't ever join chains like:
   a LOUTER b INNER c
If the a -> b needs to be LOUTER, then the INNER at the end of the
chain will cancel the LOUTER join and we have a broken query.

Sebastian reported this problem and did also major portions of the
patch.
Fixed #18852 -- Restored backwards compatibility
in django.core.signing. Specifically, kept the same return types
(str/unicode) under Python 2. Related to [92b2dec].
Bigint AutoField
Fixes #56, #13774
@timgraham

This comment has been minimized.

Show comment
Hide comment
@timgraham

timgraham Feb 7, 2014

Member

This PR needs to be reworked so it doesn't include unrelated commits (caused by when someone accidentally force pushed to (django/django)).

Member

timgraham commented Feb 7, 2014

This PR needs to be reworked so it doesn't include unrelated commits (caused by when someone accidentally force pushed to (django/django)).

@timgraham timgraham closed this Feb 7, 2014

nanuxbe pushed a commit to nanuxbe/django that referenced this pull request Jul 2, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment