# 'users' is whatever table you need to fix.
# http://stackoverflow.com/questions/13670235/after-importing-data-in-postgresql-duplicate-key-value-violates-unique-constrai
ActiveRecord::Base.connection.reset_pk_sequence!('users')
Created
September 29, 2014 14:42
-
-
Save matthaliski/419faf08c77d258d4224 to your computer and use it in GitHub Desktop.
Fix for -> PG::Error: ERROR: duplicate key value violates unique constraint
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment