Forum: Ruby on Rails Truncate table to reset id back to 1

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
D277b2cc19e19b1de760fe2f17b7c21e?d=identicon&s=25 Nic __ (nobobyhere)
on 2007-07-18 10:05
What im using now is ActiveRecord::Base.connection.execute('TRUNCATE
table_products') to reset the id back to 1. Is there another way without
using direct sql command to reset the id back to 1?
A2c85dc5ee81b12e3cc0a6522e8d079d?d=identicon&s=25 Chris Hall (au5lander)
on 2007-07-18 12:33
(Received via mailing list)
in mysql:

This topic is locked and can not be replied to.