Problem migrating with Tracforge
|Reported by:||anonymous||Owned by:||pacopablo|
|Cc:||mathomas@…, coderanger||Trac Release:||0.10|
I was attempting to convert convert sqlite databases to postgres with the sqlite2pg script and encountered the following error:
Traceback (most recent call last): File "sqlite2pg", line 337, in ? Main(opts) File "sqlite2pg", line 244, in Main pgenv = getPostgreSQLEnvironment(opts) File "sqlite2pg", line 223, in getPostgreSQLEnvironment env.upgrade() File "/usr/local/lib/python2.4/site-packages/trac/env.py", line 342, in upgrade participant.upgrade_environment(db) File "/usr/local/lib/python2.4/site-packages/TracForge-1.0-py2.4.egg/tracforge/admin/api.py", line 66, in upgrade_environment cursor.execute(sql) File "/usr/local/lib/python2.4/site-packages/trac/db/util.py", line 50, in execute return self.cursor.execute(sql) File "/usr/local/lib/python2.4/site-packages/trac/db/util.py", line 50, in execute return self.cursor.execute(sql) psycopg2.ProgrammingError: syntax error at or near "user" at character 56
I am running Trac 0.10.1 with the following plugins:
I am attempting to convert the dbs to Postgres 8.1.4.
The script fails when trying to create a particular table in the DB, tracforge_members. The table schema follows:
CREATE TABLE tracforge_members ( project text, user text, role text, CONSTRAINT tracforge_members_pk PRIMARY KEY (project,user) )
The line "user text," causes the syntax error. I can find no indication that the string "user" is reserved as a keyword or function in this version of Postgres, but it's my guess that this is the case. I am able to add the same table as long as I change all instances of the string "user" in this CREATE statement to say something else.
I am not sure if this is an issue with TracForge or the sqlite2pg script; it could be that the Tracforge schema is ill-suited for Postgres, but it may also be that the script is misreading something. I'll post a link to this ticket with the TracForge developers.
Let me know if you need some more info.