You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 8, 2022. It is now read-only.
The stop_seq field is part of the primary key of table stop_times. As we remap stop_seq in an increasing order, remapping negative values can lead to unique constraint failure as we move indexes to larger values (for example -1 is remapped to 0 before 0 is remapped to 1).
To solve this, we need to analyze the graph of remapping and start with the non-conflicting indexes first, as processing in a decreasing order for negative values can also fail if we have non-consecutive indexes: for example the following sequence: { -2, -1, 0, 4, 6 } => { 0, 1, 2, 3, 4 } (Here the first remap 6 to 4 will fail).
The text was updated successfully, but these errors were encountered:
laurentg
changed the title
Normalization of negative stop_sequence cause unique constraint failure
Normalization of negative stop_sequence can cause unique constraint failure
Feb 8, 2016
laurentg
changed the title
Normalization of negative stop_sequence can cause unique constraint failure
Normalization of negative stop_seq can cause unique constraint failure
Feb 8, 2016
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The
stop_seq
field is part of the primary key of tablestop_times
. As we remapstop_seq
in an increasing order, remapping negative values can lead to unique constraint failure as we move indexes to larger values (for example -1 is remapped to 0 before 0 is remapped to 1).To solve this, we need to analyze the graph of remapping and start with the non-conflicting indexes first, as processing in a decreasing order for negative values can also fail if we have non-consecutive indexes: for example the following sequence: { -2, -1, 0, 4, 6 } => { 0, 1, 2, 3, 4 } (Here the first remap 6 to 4 will fail).
The text was updated successfully, but these errors were encountered: