Ruby on Rails Thursday, December 9, 2010

My old tablename was products and sizes. Now it's fos_products and
fos_sizes.
I write "set_table_name fos_products" and "set_table_name fos_sizes"in
my products and sizes model.

After that I renamed my fixture files from products.yml and sizes.yml to
fos_products.yml and fos_sizes.yml and I renamed in my migration files
the "create table products" statement to "create table fos_products"
etc.

Now I dropped the DB-> after that rake:db:create->rake
db:migrate->rake:db:fixtures:load

Mysql::Error: Unknown column 'size' in 'field list':
INSERT INTO `fos_products` (`price`, `name`, `size`, `type`,
`description`, `provider`) VALUES (5.95, 'Pinot Grigio', '0.75l',
'wein', NULL, 'joeys')

--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

No comments:

Post a Comment