active record useful commands
# check if column exist ActiveRecord::Base.connection.column_exists?(:table_name, :column_name)