Câu hỏi phỏng vấn Ruby on Rails
Câu hỏi

Mention what is Rails Migration?

Câu trả lời

Rails Migration

Rails Migration is a feature in Ruby on Rails that allows developers to manage changes to the database schema over time. It provides a way to create, modify, and roll back database tables, columns, and indexes using Ruby code instead of writing raw SQL statements.

Here are some key points about Rails Migration:

  1. Versioning: Each migration is versioned with a timestamp, which allows Rails to keep track of the order in which migrations should be applied or rolled back.

  2. Up and Down Methods: Each migration has two methods: up and down. The up method defines the changes to be made to the database schema, while the down method defines how to revert those changes.

  3. Consistency: Migrations ensure that changes to the database schema are consistent across all environments (e.g., development, staging, production) by applying the same set of migrations to each environment.

  4. Rollback: If a migration introduces a bug or needs to be reverted for any reason, Rails allows you to roll back the migration to the previous state using the rollback ...

entry

entry

Gợi ý câu hỏi phỏng vấn

senior

Explain the difference between Page, Action, Fragment, Low-Level, SQL caching types

middle

Mention what is the function of garbage collection in Ruby on Rails?

entry

What Is ORM In Rails?

Bình luận

Chưa có bình luận nào

Chưa có bình luận nào