Welcome to Working With Rails


Discussion Forums

Discuss all things Ruby on Rails with perhaps the web's most vibrant group of Ruby on Rails enthusiasts.
recreating database from cloned site?
3 Posts
recreating database from cloned site?

Unfortunately, I don't have access to the database on the website creator's development server and there wasn't a schema file included in what I cloned. But knowing how it's created from the command you gave is a huge help (meaning, I can ask the website creator to make one for me). Thank you for responding!

I am not quite sure if I fully understand what you want to do but... You can use @mysqldump@ and @mysqlimport@ tools to move MySQL database from one server to another. If you have database in place and want to have db/schema.rb up to date just run

$ rake db:schema:dump

Do not forget to put your correct database connection settings in config/database.yml Hope it will help.

Sign In To Rate Post

I'm very new to RoR, but have worked with php and mySQL previously...

I've cloned our website from the development server from company that created it. There is a mySQL database associated with it. Attempting to recreate the database tables by hand from the looking through files seems a bit much (and not at all how it should be done). I've seen reference to a db/schema.rb file, but there isn't one in what I have. Is this what is needed to recreate the database? How else would I do it? I feel like there's something basic I'm just not getting in trying to recreate the database... Thank you in advance.

3 Posts
Login to add your message