# `rails console`


## Model





    > ActiveRecord::Base.connection.tables.map { |t| "#{t} => " + ActiveRecord::Base.connection.execute("select count(*) from #{t}").fetch_row.first}


This actually uses method [ActiveRecord::ConnectionHandling.connection](http://api.rubyonrails.org/classes/ActiveRecord/ConnectionHandling.html#method-i-connection) 





    > ActiveRecord::Migration.add_column 

You need to konw the Model name, and access (both read and write) here. 
    
    > JxRailsMd::Aa::Account.all

##Refs

[see-all-tables-all-records-from-console](http://stackoverflow.com/questions/4572249/see-all-tables-all-records-from-console)