Using the debug mode
Using the set_sql_debug()
function, you can see the SQL commands that Pony sends to the database. In order to turn the debug mode on, type the following:
>>> set_sql_debug(True)
If this command is executed before calling the generate_mapping()
method, then during the creation of the tables, you will see the SQL code used to generate them.