Hi Johny,

I am facing the same problem, since there seems to be no proper
solution I use the following workaround:

I move everything that has to do with auth to its own db_01 file and
define all my tables in a separate db_00.py file. Now every time a
table definition changes, and I save db_00.py auth doesn't complain
about the already existing tables.

Now when I move the app containing auth to the deployment environment
I delete the auth_ tables from both the app and PostgreSQL in the
development environment. Once on the server, I open and save db_01.py,
which creates the auth_ tables on the server.

Every time I upgrade the app on the server I remove the auth_ .table
and sql.log from the databases folder, pack all, upload and install
the app on the server, and put the auth_ .table and sql.log files back
into the databases folder.

I know this is awkward, but I tried everything else, setting
fake_migrate=False etc. but none of this solved the problem, whereas
this procedure works for me.


I posted a similar question on 6th January, to which Massimo posted
the following reply:

""Tables have to be redefined (at the web2py level) every time you
need them. Therefore you must call auth.define_tables() or, as far as
web2py is concerned, they do not exist. When you define them at the
web2py level, if migrate=False, web2py assumes thay also exist in the
DB, if migrate=True it does not assumes that and looks into the .table
files.""


Kind regards,

Annet.

Reply via email to