I modified the script to compute a "safe" order (so no table is created before any that it references), although it looks like the original order is fine.
But when it tries to define the first table (auth_cas, which has no references), I get: (1005, "Can't create table xxx.auth_cas' (errno: 150)") On Monday, December 23, 2013 12:51:21 PM UTC-5, Alan Etkin wrote: > > Note that, when I tried to use the script to copy to a MySQL DB on >> pythonanywhere, I got a 150 error, that it couldn't create an auth table, >> and this may be related to foreign keys as well. >> > > Note that there is another issue about cpdb (actually about the DAL class > constructor and the table creation order), check that this not the same. > > https://code.google.com/p/web2py/issues/detail?id=1799&start=100 > > Some backends allow to disable constraint checks (i.e. postgresql), maybe > you can try issuing a command to disable them with executesql before the > inserts (editing the script) > > -- 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.