Guest User

Untitled

a guest
May 27th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.15 KB | None | 0 0
  1. start_id = Product.maximum(:id) + 1
  2. table = :products
  3. ApplicationRecord.connection.execute("ALTER SEQUENCE #{table}_id_seq RESTART WITH #{start_id}")
Add Comment
Please, Sign In to add comment