Modify

Opened 13 years ago

Closed 13 years ago

#7925 closed defect (fixed)

trac-admin upgrade fails on postgresql/sqlite

Reported by: anonymous Owned by: Colin Guthrie
Priority: normal Component: ClientsPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description

Failing line is:

ERROR: WorklogPlugin Exception: ERROR: syntax error at or near "CHANGE" LINE 1: ALTER TABLE client CHANGE COLUMN default_rate default_rate DECIMAL(10,2)

In api.py I did a quick fix, commented out the V6 update, and changed from integer to decimal(10,2)

cursor.execute('CREATE TABLE client ('

'name TEXT,' 'description TEXT,' 'default_rate DECIMAL(10,2),' 'currency TEXT' ')')

cursor.execute('INSERT INTO client SELECT name, description, default_rate, currency FROM client_tmp') cursor.execute('DROP TABLE client_tmp')

#if self.db_installed_version < 6: # print 'Updating clients table (v6)' # cursor.execute('ALTER TABLE client ' # 'CHANGE COLUMN default_rate default_rate DECIMAL(10,2)')

Attachments (0)

Change History (3)

comment:1 Changed 13 years ago by Colin Guthrie

Summary: trac-admin upgrade fails on postgresqltrac-admin upgrade fails on postgresql/sqlite

Also affects Sqlite. Fix coming shortly.

comment:2 Changed 13 years ago by Colin Guthrie

(In [9476]) Apparently SQLite and Postgres don't support much in the way of CHANGE COLUMN statements :(

Here is an ugly workaround for that limitation. Refs #7925

comment:3 Changed 13 years ago by Colin Guthrie

Resolution: fixed
Status: newclosed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Colin Guthrie.
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.