Robert Walker wrote:
>   def self.up
>     create_table :products do |t|
>       t.references :category
>     end
>     #add unique constraint
>     execute <<-SQL
>       ALTER TABLE products
>       ADD CONSTRAINT my_constraint UNIQUE (namespace, name)
>     SQL
>   end

Ugh! Still got ahead of myself. Ignore that the table name and 
attributes don't match yours. You should get the idea anyway. Sorry.
-- 
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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to