Hi Richard, > I don't know whether the problems you're having might stem from not > following this structure.
I am pretty sure I got the structure right, Massimo helped me sort that out. auth.settings.table_user = db.define_table('auth_user', Field('first_name',length=24,default=''), Field('last_name',length=42,default=''), Field('bedrijf_id',db.bedrijf,default='',notnull=True,ondelete='CASCADE',writable=False, readable=False), Field(...), Field('reset_password_key',length=512,default='',writable=False, readable=False)) db.auth_user.first_name.requires=... auth.define_tables() When I moved my PostgreSQL database from development to production, I did not have authentication and authorization enabled. After developing a CSM app on the database, I had to run auth.define_tables in the production environment to add the auth_ tables to the production database. This could only be done with an empty databases folder in the CMS app. Now every time I update/upgrade the cms application I empty the databases folder, to prevent the .table files from being overwritten. The auth_... already exists problem also occurred when I extended my database with a new table, to prevent this from happening I put all my table definition in a separate db_xx.py file. I am very much aware that these are layman solutions, and I am very much looking forward to the day I come up with am more professional solution. Kind regards, Annet.