alfonsodg / demo-web2py

Apache License 2.0
0 stars 0 forks source link

Postgresql: ProgrammingError: relation "auth_user_id_seq" already exists #171

Closed alfonsodg closed 10 years ago

alfonsodg commented 10 years ago

From gr...@jingojango.net on February 02, 2011 01:35:30

Ubuntu installation, postgresql 8.4.6.

On a new application install and database, web2py attempts to create sequences for ID fields on new database creations however postgresql does this automatically.

psycopg2 error:

ProgrammingError: relation "auth_user_id_seq" already exists

Quick solution was to comment out line #5139 in gluon/dal.py -- maybe a check to see if sequence table exists?

    #self.execute('CREATE SEQUENCE %s;' % sequence_name)

Original issue: http://code.google.com/p/web2py/issues/detail?id=173

alfonsodg commented 10 years ago

From massimo....@gmail.com on February 05, 2011 20:44:30

Status: Fixed

alfonsodg commented 10 years ago

From minkto...@gmail.com on February 06, 2011 05:39:08

Many thanks for the fix - all working now. Make sure to remove old dal.pyc to get fixes to work!