On Thursday, October 30, 2014 11:29:26 AM UTC-4, Daniel Gonzalez wrote: > > First, it seems that migrate_enabled=False prevents not only migrations, > but also table creation (am I right here?) >
Yes, as mentioned earlier and described in the documentation: http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Migrations > Second: while trying to guess the problems with my application, I am using > the test script provided. Running manually that script, and at the same > time working with pgadmin (that is, manually creating / droping > databases/tables), causes serious conflicts with web2py. It seems web2py > has its own caching mechanism on the file system for the table definitions > (pickled objects?) > Yes, this is also covered in the documentation on migrations. The *.table files store pickled objects that hold metadata about the table definitions. > 3. Call .commit(). I have the code to define_tables outside in a module, > and according to the manual, no autocommit is performed for modules. > If the code runs as part of an HTTP request to the framework, then the framework will automatically commit at the end of the request (unless an exception occurs), even if some of the DAL code is run in a module. Calling .commit() is fine, though, if you also need to run the same code outside of an HTTP request. Anthony -- 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.