class ChangeDoorStatusResponseColumn < ActiveRecord::Migration
  def up
    change_column :door_monitor_records, :door_response, :integer
  end
  
  def down
    change_column :door_monitor_records, :door_response, :boolean
  end
end

class ChangeDoorStatusResponseColumn < ActiveRecord::Migration
  def up
    change_column :door_monitor_records, :door_response, 'integer USING CAST(door_response AS integer)'
  end
  
  def down
    change_column :door_monitor_records, :door_response, 'boolean USING CAST(door_response AS boolean)'
  end
end

Correct migration for Postgres requirements
Correct migration for Postgres requirements
