Re-sequencing primary keys in Rails to fix uniqueness violations
posted in fixes
Recently, I ran into an issue with migrating data from one table to another incorrectly set the sequence for the new table’s primary key. The issue stemmed from inserting all the data from one table into another.