-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #620 from alphagov/update-petition-ids-for-2017
Update petition id sequences for re-opening
- Loading branch information
Showing
2 changed files
with
16 additions
and
3 deletions.
There are no files selected for viewing
11 changes: 11 additions & 0 deletions
11
db/migrate/20170903162156_adjust_petition_sequences_for_twenty_seventeen.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
class AdjustPetitionSequencesForTwentySeventeen < ActiveRecord::Migration | ||
def up | ||
execute "ALTER SEQUENCE archived_petitions_id_seq MAXVALUE 199999" | ||
execute "ALTER SEQUENCE petitions_id_seq START WITH 200000 RESTART WITH 200000 MINVALUE 200000" | ||
end | ||
|
||
def down | ||
execute "ALTER SEQUENCE archived_petitions_id_seq MAXVALUE 99999" | ||
execute "ALTER SEQUENCE petitions_id_seq START WITH 100000 RESTART WITH 100000 MINVALUE 100000" | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters