If you did this from a shell using the -S and -M web2py.py options then the code must do a db.commit() as part of the program flow. A request through the web server has commit and rollback operations embedded in the request processing transaction management.
Ron