Reset auto increment field in a ActiveRecord migration

User.connection.execute('ALTER SEQUENCE users_id_seq RESTART WITH 1')

Comments