Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8170363
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T21:06:57+00:00 2026-06-06T21:06:57+00:00

When I read Rails book, each time they create a new database, always follow

  • 0

When I read Rails book, each time they create a new database, always follow a db:migrate.

rails generate scaffold school
rake db:migrate

In console view, I see at first line, Rails create some files, no problem. but in second line, I see that Rails isn’t really change anything. I have view some files that Rails nearly create and see no change too.

So, what the purpose of line 2, please tell me.

Thanks 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T21:06:58+00:00Added an answer on June 6, 2026 at 9:06 pm

    The rake migrates the changes into your database. It is which acttually changes the database schema to match your previously generated scaffolded model.

    Without it, you wouldn’t have a table to write your objects into. Or in case of changed model, the table could differ from your model, leading to error.

    When you generate a model (or scaffold one) a migration file is created in your db/migration directory. It is a pure text file, you can create such manually, if you want. This is the tool for the iterative development in rails regarding the database. Each migration adds some change to the system. When you run rake db:migrate your database is updated by the given migrations. This is a handy tool in case of distributed development, when one programmer can check out the code from the repository, and can run the migrations on his own development database.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am new to rails and read this guide to get all the info
I had read through a rails book and once found we can add #
Im modeling an online book with ruby on rails. The book has chapters, each
The command rails generate scaffold Post name:string title:string content:text generated the following 20101109001203_create_posts.rb file:
I have method which updating data in database from CSV. csv_text = File.read(#{Rails.root}/db/seed/books.csv) csv
I would like to read Rails documentation locally though gem server. I go to
I have read through the Rails docs for Routing , Restful Resources , and
I read that when executing bundle install in command-line inside a Rails project, gems
I've read about many to many relationship in rails 3 and saw that HABTM
Moving rails app to production and running into the routing issues. I've read this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.