Modify

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#11456 closed defect (duplicate)

ProgrammingError: relation "codereviews" does not existСТРОКА 1: ...iew, Author, Status, DateCreate, Name, Notes FROM CodeReview... ^

Reported by: olexander314@… Owned by: Olemis Lang
Priority: normal Component: PeerReviewPlugin
Severity: normal Keywords:
Cc: Trac Release: 1.0

Description

How to Reproduce

While doing a GET operation on /peerReviewMain, Trac issued an internal error.

Download zip, build from 'trunk' directory with python setup.py bdist_egg command, then call trac /path/to/ upgrade and restart apache.

Request parameters:

{}

User agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Firefox/24.0

System Information

Trac 1.0.2dev
Babel 0.9.6
Docutils 0.10
Genshi 0.8dev (with speedups)
GIT 1.8.1.5
Mercurial 2.5.4
mod_wsgi 3.4 (WSGIProcessGroup WSGIApplicationGroup %{GLOBAL})
psycopg2 2.4.6
Pygments 1.5
Python 2.7.3 (default, Mar 20 2013, 11:12:52)
[GCC 4.6.3]
pytz 2012c
RPC 1.1.2
setuptools 0.6c11
jQuery 1.7.2

Enabled Plugins

AdvancedTicketWorkflowPlugin 0.11dev
AutocompleteUsers 0.4.2dev
BlockDiagPlugin 0.5.1
graphviz 0.7.5dev-r11777
GroupTicketFields 0.0.1dev
NavAdd 0.1
nevernotifyupdaterplugin 0.1.4
PlantUML 2.0dev-r12389
Roadmap-Plugin 0.4.1
Trac-jsGantt 0.10-r12440
TracAccountManager 0.3.2
TracCodeReview 2.2dev
TracHTTPAuth 1.1
TracKeywordSuggest 0.5.0dev
TracMasterTickets 3.0.3
TracMercurial 1.0.0.3dev
TracNewsFlash 1.0.1
TracPoll 0.3.0dev
TracSubTicketsPlugin 0.2.0.dev-20130218
TracXMLRPC 1.1.2
WikiCalendarMacro 2.0.0dev

Python Traceback

Traceback (most recent call last):
  File "build/bdist.linux-x86_64/egg/trac/web/main.py", line 497, in _dispatch_request
    dispatcher.dispatch(req)
  File "build/bdist.linux-x86_64/egg/trac/web/main.py", line 214, in dispatch
    resp = chosen_handler.process_request(req)
  File "build/bdist.linux-x86_64/egg/codereview/peerReviewMain.py", line 76, in process_request
    codeReviewArray = dbBack.getMyCodeReviews(util.get_reporter_id(req))
  File "build/bdist.linux-x86_64/egg/codereview/dbBackend.py", line 38, in getMyCodeReviews
    return self.execCodeReviewQuery(query, False)
  File "build/bdist.linux-x86_64/egg/codereview/dbBackend.py", line 178, in execCodeReviewQuery
    cursor.execute(query)
  File "build/bdist.linux-x86_64/egg/trac/db/util.py", line 66, in execute
    return self.cursor.execute(sql)
ProgrammingError: relation "codereviews" does not exist
СТРОКА 1: ...iew, Author, Status, DateCreate, Name, Notes FROM CodeReview...
                                                               ^

Attachments (0)

Change History (3)

comment:1 Changed 10 years ago by Jun Omae

Resolution: duplicate
Status: newclosed

A duplicate of #10812.

comment:2 Changed 10 years ago by Ryan J Ollos

We'll need to quote the CamelCased table names, as described in SO:7262795, or change them to lowercase. We should probably change them to lowercase. The patch is simple enough, but we'll need to also write an upgrade step.

I might find time tomorrow morning to make the required changes.

  • peerreviewplugin/trunk/codereview/db_default.py

    diff --git a/peerreviewplugin/trunk/codereview/db_default.py b/peerreviewplugin/
    index fe74384..41e232d 100644
    a b from trac.db.schema import Table, Column 
    1212
    1313
    1414# Version of Code Review schema
    15 version = 1
     15version = 2
    1616
    1717#The tables for the Code Review Plugin
    1818tables = [
    19     Table('CodeReviews', key='IDReview')[
     19    Table('codereviews', key='IDReview')[
    2020        Column('IDReview', auto_increment=True, type='int'),
    2121        Column('Author'),
    2222        Column('Status'),
    tables = [ 
    2424        Column('Name'),
    2525        Column('Notes'),
    2626    ],
    27     Table('Reviewers', key=('IDReview', 'Reviewer'))[
     27    Table('reviewers', key=('IDReview', 'Reviewer'))[
    2828        Column('IDReview', type='int'),
    2929        Column('Reviewer'),
    3030        Column('Status', type='int'),
    3131        Column('Vote', type='int'),
    3232    ],
    33     Table('ReviewFiles', key='IDFile')[
     33    Table('reviewfiles', key='IDFile')[
    3434        Column('IDFile', auto_increment=True, type='int'),
    3535        Column('IDReview', type='int'),
    3636        Column('Path'),
    tables = [ 
    3838        Column('LineEnd', type='int'),
    3939        Column('Version', type='int'),
    4040    ],
    41     Table('ReviewComments', key='IDComment')[
     41    Table('reviewcomments', key='IDComment')[
    4242        Column('IDComment', auto_increment=True, type='int'),
    4343        Column('IDFile', type='int'),
    4444        Column('IDParent', type='int'),

comment:3 in reply to:  1 Changed 10 years ago by Ryan J Ollos

Replying to jun66j5:

A duplicate of #10812.

Oh, thanks. I looked but didn't spot that one.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Olemis Lang.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.