[web2py] web2py ProgrammingError: relation auth_user already exists

2011-03-19 Thread VP
After upgrading debian to version 6, postgres was upgraded to 8.4.   I
had to create a new user, new database.   Well, this didn't go well.
I had previously backed up my database.  Now after restoring my
postgres db, I had the error above.

auth_user already exists.


I have no idea how to fix this.

Any help is appreciated.


[web2py] Re: web2py ProgrammingError: relation auth_user already exists

2011-03-19 Thread VP
To be clear, essentially this is what happened.  I backed up web2py
folder, and postgres database separately.  Then, I upgraded the os,
including postgres to version 8.4.   After that, I unzipped the web2py
folder and installed the database.

And I have this problem.

This is quite frustrating.   Here's part of the ticket.   Any help is
greatly appreciated.  THANKS.


  File /home/user/web2py/gluon/tools.py, line 1177, in define_tables
format='%(first_name)s %(last_name)s (%(id)s)')
  File /home/user/web2py/gluon/dal.py, line 3884, in define_table
polymodel=polymodel)
  File /home/user/web2py/gluon/dal.py, line 581, in create_table
self.create_sequence_and_triggers(query,table)
  File /home/user/web2py/gluon/dal.py, line 1575, in
create_sequence_and_triggers
self.execute(query)
  File /home/user/web2py/gluon/dal.py, line 1137, in execute
return self.log_execute(*a, **b)
  File /home/user/web2py/gluon/dal.py, line 1134, in log_execute
return self.cursor.execute(*a,**b)
ProgrammingError: relation auth_user already exists


[web2py] Re: web2py ProgrammingError: relation auth_user already exists

2011-03-19 Thread VP
btw, I backed up (in postgres 8.3) using: pg_dump database 
database.sql
and restored (in postgres 8.4) using: psql database  database.sql



[web2py] Re: web2py ProgrammingError: relation auth_user already exists

2011-03-19 Thread villas
Just a guess, but did you back up the DB and then restore to a
different name?

It looks like web2py is trying to re-create the DB.
Try setting migrate = False, fake_migrate = True.
Look up those settings in the book, in the DAL chapter.

Regards,  D



On Mar 20, 12:38 am, VP vtp2...@gmail.com wrote:
 btw, I backed up (in postgres 8.3) using: pg_dump database 
 database.sql
 and restored (in postgres 8.4) using: psql database  database.sql


[web2py] Re: web2py ProgrammingError: relation auth_user already exists

2011-03-19 Thread VP
Yes.  I've been able to fixed this, but it's ugly.  I'm going to
create a new topic to describe this problem (this topic is convoluted
with many variables (upgrades, etc.)).


On Mar 19, 8:29 pm, villas villa...@gmail.com wrote:
 Just a guess, but did you back up the DB and then restore to a
 different name?

 It looks like web2py is trying to re-create the DB.
 Try setting migrate = False, fake_migrate = True.
 Look up those settings in the book, in the DAL chapter.

 Regards,  D

 On Mar 20, 12:38 am, VP vtp2...@gmail.com wrote:

  btw, I backed up (in postgres 8.3) using: pg_dump database 
  database.sql
  and restored (in postgres 8.4) using: psql database  database.sql




[web2py] ProgrammingError: relation auth_user already exists

2010-04-12 Thread annet
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.

Today I defined four more tables in the base application's db.py file,
and copied and paste them to the db.py files of the other
applications, and set migrate=False on these tables. After saving the
db.py file of the CMS application I got the following error when I go
to the database administration:

ProgrammingError: relation auth_user already exists

Does this mean 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.


Kind regards,

Annet.


-- 
To unsubscribe, reply using remove me as the subject.