Migrations can contain methods to create, drop, or rename tables; to add, remove, rename, or change columns; or to add or remove indexes.
- [Instructor] Migrations allow us to perform…mini-database operations.…Let's look at some of the options that are available to us,…and then try them out.…There are table migration methods.…We've already seen create_table and drop_table.…There's one more which is rename_table,…where you provide the old table name as the first argument,…and the new table name as the second one.…There are also column migration methods,…such as add_column, remove_column, rename-column…and change_column.…All four of these methods take the table name…and the column name as their first two arguments.…
When we're working with create_table,…we didn't have to specify table name…each and every time we wanted to create a column.…But here, because it's a stand alone method call,…we do need to tell it which table we're referring to.…With add_column, we are adding a column…with a type definition the same way we did…when we created table, but we can't use that short format…that we had with create_table,…we have to use the longer format…where we specify the type explicitly…
- Creating and configuring a new Ruby on Rails project
- Generating controllers and views
- Handling server requests
- Using different types of routes
- Rendering and viewing templates
- Generating migrations and models
- Creating, updating, and deleting records
- Finding records with queries
- Understanding relationship types
- Writing controllers for CRUD
- Working with layouts and helpers
- Managing application assets
- Building forms
- Validating data
- Authenticating users
Skill Level Beginner
1. What Is Ruby on Rails?
2. Get Started
3. Controllers, Views, and Dynamic Content
4. Databases and Migrations
5. Models and ActiveRecord
7. CRUD, REST, and Resourceful Routes
8. Controllers and CRUD
9. Layouts, Partials, and View Helpers
12. Data Validation
13. Controller Features
14. User Authentication
15. Improve the Simple CMS
Next steps1m 44s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.