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

Imperial College London
Carnegie Mellon University
City University of Hong Kong
Hack Reactor
Cisco Meraki
University of Oxford
Swift
Bazaarvoice
Waterloo
Uber
AtlanTech
Tumblr
Boston College
Bombardier Aerospace
University of St. Andrews
New York University
Minerva Schools at KGI
Merrill Lynch
Riot Games
JP Morgan
Morgan Stanley
Advanced Placement®
Google
KPMG
The University of Hong Kong
University of Toronto
SCMP
Moat
Zynga
Hello Toby
Deloitte
Goldman Sachs
Yahoo
HSBC
General Assembly
Tesla
McGill University
Microsoft

Join the upcoming Cohort #101

Enroll for May 5th, 2025