"Nick Murdoch" <[EMAIL PROTECTED]> writes:
> Now, I want to be able to assign each Task a priority, but I want two
> Users to be able to prioritise a Task differently. To me, this would
> mean putting an extra column in the user_tasks table to hold the
> priority for each user/task pair, so I wrote:
>
> class UserTasks(SQLObject):
> user = ForeignKey('User')
> task = ForeignKey('Task')
> priority = FloatCol()
>
> I then ran 'tg-admin sql create', and it didn't throw up any errors,
> but when I inspected the sqlite database, the extra priority field
> wasn't included!
Drop the database and recreate it. Remember to tell RelatedJoin to *not*
create intermediate tables since you're specifying it by yourself.
> Any help here would be great; I really need that priority column for
> this project!
After you created your model you have to update it. The easier way is to
update by hand with ALTER TABLE commands. There are instructions on how to
use SQL Object to update the database on the SQLObject website somewhere...
--
Jorge Godoy <[EMAIL PROTECTED]>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" 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/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---