﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
4678	"second and subsequent runs of syncdb fails with ""table already exists"""	dmitry@…	Adrian Holovaty	"Hi,

I'm using postgresql and psycopg2. I'm new to django so I just tried to follow the steps described in the tutorial. When I ran syncdb for the second time (after creating the model) I got the following:

{{{
$ python manage.py syncdb             
Creating table auth_message
Traceback (most recent call last):
  File ""manage.py"", line 11, in ?
    execute_manager(settings)
  File ""/usr/lib/python2.4/site-packages/django/core/management.py"", line 1736, in execute_manager
    execute_from_command_line(action_mapping, argv)
  File ""/usr/lib/python2.4/site-packages/django/core/management.py"", line 1633, in execute_from_command_line
    action_mapping[action](int(options.verbosity), options.interactive)
  File ""/usr/lib/python2.4/site-packages/django/core/management.py"", line 572, in syncdb
    cursor.execute(statement)
  File ""/usr/lib/python2.4/site-packages/django/db/backends/util.py"", line 18, in execute
    return self.cursor.execute(sql, params)
psycopg2.ProgrammingError: relation ""auth_message"" already exists
}}}"		closed	Database layer (models, ORM)	dev		fixed		tailofthesun@…	Accepted	1	0	0	0	0	0
