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

Update sequences for the re-opening of the petitions website #959

Merged
merged 3 commits into from
Jul 12, 2024

Conversation

pixeltrix
Copy link
Contributor

When we start a new parliament we restart the petition id sequence at a nice round number to make it clear to the moderators whether a petition is in a previous parliament or not.

Otherwise tools like pg_dump and pg_restore will fail.
Depending on what version of Rails and PostgreSQL was being used at the time
the sequence type could be either integer or bigint. We keep the sequences
for departments, tags and topics as integer since we're keeping the primary
keys as integer for compatibility with the int_array extension. We also set
the MAXVALUE on archived_petitions to ensure it doesn't run into the sequence
values for the current petitions.
When we start a new parliament we restart the petition id sequence at a
nice round number to make it clear to the moderators whether a petition
is in a previous parliament or not.
@pixeltrix pixeltrix merged commit 15d5b8d into master Jul 12, 2024
12 checks passed
@pixeltrix pixeltrix deleted the ensure-sequence-types-are-correct branch July 12, 2024 03:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant