Annet,

have you tried:
            # defines all needed tables without migration/table files
            auth.define_tables(migrate=False)

where you configure auth for your app?

cfh

On May 4, 9:44 am, annet <annet.verm...@gmail.com> wrote:
> I have one application (called base) in which I define all the tables
> for three other applications. In the three applications I use the same
> db.py file. In these db.py files I set migrate=False on all tables.
>
> One of these applications is a CMS, in which I enabled Authorization
> and Authentication. This creates the .table files for auth_event,
> auth- group, auth_membership, auth_permission and auth_user in the
> databases folder of the cms application, all the .table files for the
> other tables are in the databases folder of the base application.
>
> When I extend the model in the base application's db.py file, i.e.
> define new tables, and set migrate=False on these tables and copy and
> paste them into the db.py file of the CMS application, after saving
> the db.py file, I keep getting the following error when I go to the
> database administration:
>
> ProgrammingError: relation "auth_user" already exists
>
> Am I right to conclude that I cannot make changes to the db.py file in
> which Authorization and Authentication are enabled? i.e. I can only
> save the db.py file once?
>
> Did anyone face the same problem? How did you solve it? Is there a
> best practice to dealing with db.py when it comes to defining and
> altering tables and using web2py's authentication and authorization
> features?
>
> Kind regards,
>
> Annet.

Reply via email to