What steps will reproduce the problem?
Having such a description... users_default_prices: user_id: [int, notnull] resource_type_id: [int, notnull] price: [float, notnull] modified: [timestamp]
What is the expected output? What do you see instead?
How to create a unique key on both fields (user_id, resource_type_id) excepting raw SQL usage.
Comment #1
Posted on Mar 25, 2008 by Grumpy OxWell any column name ending in '_id' will automatically be given a type of Integer and given an index. If you want them unique, then simply add 'unique' to the columns params.
Also, the modified field gets created automatiocally, so you don't need to specify that.
That answer your questions?
Comment #2
Posted on Mar 25, 2008 by Quick BearActually, not.
I need a unique pair (user_id, resource_type_id) but not separate fields being unique.
Status: Fixed
Labels:
Type-Defect
Priority-Medium