The problem is that my workaround is not retroactive. I believe the bug is 
fixed but does not apply to tables created before the upgrade with the 
fixed code.
You have to manually alter table and remove the UNIQUE attribute. web2py is 
not smart enough to be able to do that.

On Tuesday, 17 December 2013 16:38:11 UTC-6, Chris Hepworth wrote:
>
> Running version 2.8.2-stable+timestamp.2013.11.28.13.54.07 I recieved the 
> same error as described above. I also tried to use the workaround Massimo 
> suggested below, but without success, the update still fails. Do I need to 
> delete my current archive table before attempting this? 
>
> On Monday, July 16, 2012 3:54:54 PM UTC-6, Remco K wrote:
>>
>> Hi everyone,
>>
>> I got stuck in creating an update form for an auth_user.
>>
>> In the auth_user table i made an extra field:
>>
>> Field('email', length=128, default='', unique=True, notnull=True),
>>
>> Now everytime i try to update the user information (the last name) i get 
>> the error:
>>
>> IntegrityError: column email is not unique
>>
>> I try to combine updating the user information with creating an archive 
>> entry for the previous entry:
>>
>> _id = db.auth_user(request.args(0)) or redirect(URL('index'))
>> form = SQLFORM(db.auth_user, _id)
>> if form.process(onsuccess=auth.archive).accepted:
>>
>> This method works for an other table which doesnt have an Field with 
>> Unique=True but not for this table with this Unique=True value.
>>
>> Someone who can help me out a bit?
>>
>> Thanks in advance!
>> Remco
>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to