Do I need to look at the migration file to understand the model structure in Rail?

Asked 1 years ago, Updated 1 years ago, 95 views

Do I need to look at the migration file to understand the model structure in Rail?

The model defines only the relationship between models. To view the model structure, you need to view the migration file If you modify the column, the final form of the model can only be known by the person who made it,

If someone else wants to understand the model structure, do you need to open the migration file sequentially to understand it?

ruby ruby-on-rails model

2022-09-22 12:01

2 Answers

When I first figured it out, I looked at the diagram and then I looked at the model and schema. I haven't seen the migration file separately.

It's a Gem link that pulls out the diagram. If you follow the getting started part, pull it out

https://github.com/voormedia/rails-erd


2022-09-22 12:01

First of all, I understand basically by looking at the schema and check the connection structure of the code base with rails-erd, etc. It is true that even this is hard to see if the service becomes complicated.;


2022-09-22 12:01

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.