Last Updated: February 25, 2016
·
410
· yassoraa88

change sql table column on heroku

ActiveRecord::Base.connection.execute(ALTER TABLE thetable ALTER COLUMN colname TYPE integer USING (trim(col_name)::integer);)

// that's written on heroku's console