Opened 17 years ago
Last modified 17 years ago
#6032 closed defect
Database Fried — at Version 6
Reported by: | anonymous | Owned by: | Jonas Borgström |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | general | Version: | 0.10.4 |
Severity: | normal | Keywords: | |
Cc: | brett@… | Branch: | |
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description (last modified by )
Hi there I need help! our trac database is broken. I tried a restore and no go which is odd.. what can i do?
Traceback (most recent call last): File "/usr/lib/python2.3/site-packages/trac/web/main.py", line 387, in dispatch_request dispatcher.dispatch(req) File "/usr/lib/python2.3/site-packages/trac/web/main.py", line 237, in dispatch resp = chosen_handler.process_request(req) File "/usr/lib/python2.3/site-packages/trac/ticket/web_ui.py", line 127, in process_request self._do_create(req, db) File "/usr/lib/python2.3/site-packages/trac/ticket/web_ui.py", line 190, in _do_create ticket.insert(db=db) File "/usr/lib/python2.3/site-packages/trac/ticket/model.py", line 170, in insert "VALUES (%s,%s,%s)", [(tkt_id, name, self[name]) File "/usr/lib/python2.3/site-packages/trac/db/util.py", line 57, in executemany return self.cursor.executemany(sql_escape_percent(sql), args) File "/usr/lib/python2.3/site-packages/sqlite/main.py", line 276, in executemany self.execute(query, _i) File "/usr/lib/python2.3/site-packages/sqlite/main.py", line 255, in execute self.rs = self.con.db.execute(SQL % parms) IntegrityError: columns ticket, name are not unique
Change History (6)
comment:1 by , 17 years ago
comment:2 by , 17 years ago
Resolution: | → worksforme |
---|---|
Status: | new → closed |
pls check out http://trac.edgewall.org/wiki/PySqlite#Checkifdatabaseisok, could be here in ticket/model.py and sqlite_backend.py:
tkt_id = db.get_last_id(cursor, 'ticket')
and
if have_pysqlite == 2: def get_last_id(self, cursor, table, column='id'): return cursor.lastrowid else: def get_last_id(self, cursor, table, column='id'): return self.cnx.db.sqlite_last_insert_rowid()
follow-up: 4 comment:3 by , 17 years ago
Resolution: | worksforme |
---|---|
Status: | closed → reopened |
none of these worked! any other ideas?
comment:4 by , 17 years ago
comment:5 by , 17 years ago
I upgraded to 10.4 from 10.3 last night, same issue.
It looks like there is a duplicate entry in the database for some reason. is there a way to increment it by one so it starts with the next ticket number?
oh this is when I try to create a new ticket!