0

How do I make a migration that changes an existing column so that it is an identity? Meaning, I want that integer column to automatically increment.

Is it something like:

add_identity :tablename, [:columnname]

It is not a primary key column.

Chris Travers
  • 25,424
  • 6
  • 65
  • 182
Nathan McKaskle
  • 2,926
  • 12
  • 55
  • 93

0 Answers0