if you want reset your table primary key from first then follow the below steps

first delete all records from table

Model.delete_all

Next reset your data from id one

ActiveRecord::Base.connection.reset_pk_sequence!(“table_name”)

Leave a comment