Noticed when doing the migration, you have to both add the group and 
manually add the user in the database table. That solved my issue. 

On Friday, February 1, 2013 at 10:20:54 AM UTC-5, Loïc wrote:
>
> Dear All,
>
> I have a 'page' model with a sef-reference: 
> db.define_table('page',
>     Field('parent', 'reference page', readable=False, writable=False),
>     Field('title', unique=True, notnull=True)
>     //more fields not important here
> )
>
> When I insert a new page via appadmin without specifying a 'parent', 
> everything is OK with sqlite
>
> Since I moved my database to mysql, I have an error : 
> <class '_mysql_exceptions.IntegrityError'> (1452, 'Cannot add or update a 
> child row: a foreign key constraint fails (`dommartin25`.`page`, CONSTRAINT 
> `page_ibfk_1` FOREIGN KEY (`parent`) REFERENCES `page` (`id`) ON DELETE 
> CASCADE)')
> How can I allow null values for the 'parent' field?
>
> Thank you
>

-- 
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/d/optout.

Reply via email to