Tag Archives: schema

Rails: dump db schema from mysql

gem install mysql2

edit config/database.yml

development:
    adapter: mysql2
    encoding: utf8
    database: db_name
    username: user_name
    password: password_of_user
    host: host_ip
    timeout: 5000

edit Gemfile

gem 'mysql2'

bundle install

rake db:schema:dump

db/schema.rb has been created