Displaying 1 result from an estimated 1 matches for "product_photos".
Did you mean:
product_photo
2006 Jul 18
2
newbie help re: loading data and relationships in migrations
Hi folks,
I''m new to Ruby & Rails, and have been reading the Agile Web dev &
Pickaxe books with much joy!
However, I need some guidance re: using migrations to load in data for
tables that have relationships.
For example, I have one products table and one product_photos table
(defined in separate migration files). The second table has a foreign
key associated with the products table:
execute "alter table product_photos
add constraint fk_products
foreign key (product_id) references products(id)"
The models have the relationships defined:
c...