and along with all that, if you have DB migrations enabled (the web2py default), after it creates the tables you can view the log file from the admin interface (or a clever sleuth will find it on the disk in application/<app_name>/databases) and see exactly what SQL statements were executed. i use that from time to time to test a migration and then write scripts to do manual migrations on my production servers.
cfh

