How can I change the (default) type for ActiveRecord\'s IDs? int is not long enough, I would prefer long. I was surprised that there is no :long for the migrations - does on
You can do it like this:
class CreateUsers < ActiveRecord::Migration[5.0] def change create_table :users, id: :bigserial do |t| t.string :name end end end