not every model can be safely applied to an empty database. What - probably - happened is that you had at some point in development - state a - state b --> migrations were triggered - state c
Now, with an empty database, you're trying to recreate state c, but the model doesn't know about the "stages" between a and b. On Wednesday, December 16, 2015 at 11:35:23 AM UTC+1, Mat Miles wrote: > > 1. In the Web2py administrative interface I select "pack all" to output > an application I have created. > 2. I then select "Upload and install packed application" to a new project > with the name of dev and upload the application I just packed. > 3. I then edit db.py to change the db = DAL to a different database > 4. When I click on database administration it fails with the error below. > > <class '_mysql_exceptions.IntegrityError'> (1452, 'Cannot add or update a > child row: a foreign key constraint fails > (`milesm$scheduler_dev`.`auth_permission`, CONSTRAINT > `auth_permission_ibfk_1` FOREIGN KEY (`group_id`) REFERENCES `auth_group` > (`id`) ON DELETE CASCADE)') > > This is on pythonanywhere using mysql. > > Any help wold be greatly appreciated. > > > -- 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.