Modify ↓
Opened 14 years ago
Closed 8 years ago
#7270 closed defect (fixed)
[Patch] ClientsPlugin not working with Postgres 8.4
Reported by: | Owned by: | Colin Guthrie | |
---|---|---|---|
Priority: | normal | Component: | ClientsPlugin |
Severity: | major | Keywords: | |
Cc: | Trac Release: | 0.11 |
Description
The plugin is sending invalid SQL statement to database:
postgresql.log
ERROR: syntax error at or near "CHANGE" at character 20 STATEMENT: ALTER TABLE client CHANGE COLUMN default_rate default_rate DECIMAL(10,2)
The correct command must be:
ALTER TABLE client ALTER COLUMN default_rate TYPE DECIMAL(10,2)
The following code resolved this problem:
-
api.py
121 121 if self.db_installed_version < 6: 122 122 print 'Updating clients table (v6)' 123 123 cursor.execute('ALTER TABLE client ' 124 ' CHANGE COLUMN default_rate default_rateDECIMAL(10,2)')124 'ALTER COLUMN default_rate TYPE DECIMAL(10,2)') 125 125 126 126 #if self.db_installed_version < 7: 127 127 # print 'Updating clients table (v7)'
Attachments (0)
Note: See
TracTickets for help on using
tickets.
Addressed in r9476.