This is a good introduction to migrations and schema, though it's a little strange to be creating a table :haunted_houses in a migration titled CreateCats. When you get to associations, things get confusing. Because you've made ShoeStore the join model between a Shoe and a Brand, it's a child of both a Shoe instance and a Brand instance, i.e. a particular store cannot exist independently of a particular shoe and brand. This relationship bears no logical relationship to the real-world domain it is modeling and is thus confusing. A more logical relationship using these models might look like: ShoeStore -< InventoryItem >- Shoe >- Brand
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
This is a good introduction to migrations and schema, though it's a little strange to be creating a table
:haunted_houses
in a migration titledCreateCats
. When you get to associations, things get confusing. Because you've made ShoeStore the join model between a Shoe and a Brand, it's a child of both a Shoe instance and a Brand instance, i.e. a particular store cannot exist independently of a particular shoe and brand. This relationship bears no logical relationship to the real-world domain it is modeling and is thus confusing. A more logical relationship using these models might look like: ShoeStore -< InventoryItem >- Shoe >- Brand