SwitchUp SwitchUp Ranked Best Coding Bootcamps 2025

Database vs. Database Migrations vs. Model

Written in Ruby on Rails
updated on 10 Jan 2023

In Rails, when it comes to creating / updating / deleting data, you can think in the Model level.

However, for the Model level to work properly, your Database level must be set up correctly.

And, to set up the Database level correct, you have to run migrations, which is in the Migration level.

Migration level is for setting up Database level correct, so you can purely think in the Model level in the future.

If your Database level isn't set up correctly, your Model level won't work properly.


Trusted by

Students and instructors from world-class organizations

Join the upcoming Cohort #120

Enroll for December 7th, 2026