You never mentioned what DBMS you’re using. If this is postgreSQL, the ActiveRecord postgres adapter has a reset_pk_sequences!
method that you could use:
ActiveRecord::Base.connection.reset_pk_sequence!('table_name')
You never mentioned what DBMS you’re using. If this is postgreSQL, the ActiveRecord postgres adapter has a reset_pk_sequences!
method that you could use:
ActiveRecord::Base.connection.reset_pk_sequence!('table_name')