```ruby
class TasksStatusType < ActiveRecord::Migration[5.0]
  def change
    change_column :tasks, :status, "integer USING CAST(status AS integer)"
  end
end
```

Change the migration file for the postgresql bug.
user
```ruby
class TasksStatusType < ActiveRecord::Migration[5.0]
  def change
    change_column :tasks, :status, "integer using status::integer"
  end
end
```
assistant