auth_group: dropping unique on name

54 views
Skip to first unread message

zweb

unread,
Jan 19, 2010, 3:17:52 AM1/19/10
to Django users

I am planning to drop unique key constraint on "name" column of
auth_group table.

Any possible issues it may cause?


thanks

Karen Tracey

unread,
Jan 19, 2010, 9:03:24 AM1/19/10
to django...@googlegroups.com

Yes.  With the unique constraint in place, .get() by name is guaranteed to either find a single group or none with a matching name.  Removing the unique constraint removes that guarantee, opening up the possibility that .get() by name will raise MultipleObjectsReturned.

Karen

zweb

unread,
Jan 19, 2010, 11:39:13 AM1/19/10
to Django users
Since all my looks up are by id and I am not using admin, I should be
ok.
I was not sure if django auth framework used it internally anywhere.

On Jan 19, 6:03 am, Karen Tracey <kmtra...@gmail.com> wrote:

Reply all
Reply to author
Forward
0 new messages