Rails Migration Error w/ Postgres when pushing to Heroku

后端 未结 2 954
长发绾君心
长发绾君心 2020-12-09 09:04

I\'m trying to perform the following up migration to change the column \"number\" in the \"tweet\" model\'s table

class ChangeDataTypeForTweetsNumber < Ac         


        
2条回答
  •  情深已故
    2020-12-09 10:07

    Same as above but a little bit more concise:

    change_column :yourtable, :column_to_change, 'integer USING CAST("column_to_change" AS integer)'
    

提交回复
热议问题