Skip to content

Instantly share code, notes, and snippets.

@ilyakatz
Created February 5, 2014 19:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ilyakatz/8831264 to your computer and use it in GitHub Desktop.
Save ilyakatz/8831264 to your computer and use it in GitHub Desktop.
Update the value of the primary key auto increment for a model in rails
klazz = SoftwareMember
klazz .connection.execute("ALTER TABLE #{klazz .table_name} AUTO_INCREMENT = 1000")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment