From the course: Ruby on Rails 6 Essential Training

Unlock the full course today

Join today to access over 22,500 courses taught by industry experts or purchase this course individually.

Create a database for a Ruby on Rails project

Create a database for a Ruby on Rails project - Ruby on Rails Tutorial

From the course: Ruby on Rails 6 Essential Training

Start my 1-month free trial

Create a database for a Ruby on Rails project

- [Instructor] In this chapter, we're going to be learning to work with databases and migrations. If you think back to the MVC web architecture diagram, we have that triangle between browser, controller, and view. And that's what we focused on in the last chapter. Now we want to move to the right side of that diagram and work on the model and the database. We're going to start with the databases, and then we'll build models that connect to them. In the getting started chapter, we already set up the database that we're going to need for this project. As a refresher, I'll just give you the quick steps that you would need to create them. You can go into MySQL and you can issue commands to create a new database. You can then issue the commands in order to create a new user who has a username and password to log in to the database and access data. And then you need to grant privileges for that user to access all the tables on…

Contents