I am having an issue with Heroku in regards to adding an integer column to an existing table.
Here is how I setup my migration file:
class AddFieldsToNetwork < ActiveRecord::Migration
def self.up
add_column :networks, :phone, :integer, :limit => 10
add_column :networks, :contact, :string
end
def self.down
remove_column :networks, :phone
remove_column :networks, :contact
end
end
Now this works locally, but when I push to Heroku, I get what most people get:
!!! Caught Server Exception
HTTP CODE: 500
Taps Server Error: PGError: ERROR: integer out of range
If I change :integer to :string, then adding the columns works and functions great on Heroku. If I leave it under :integer, the :network model crashes when I create new "network".
Can anyone tell me what I might be doing wrong?
edited ...above my name.