[Patch] ClientsPlugin not working with Postgres 8.3 (possibly other versions) as trac backend
|Reported by:||scott.mead@…||Owned by:||coling|
The clientsplugin is emitting some SQL that is bad when it comes to postgresql 8.3 (haven't tried with lower versions, it may be the same). I have modified the api.py and model.py files to try and make this work. The 'broken' behavior is as follows:
- Cannot upgrade
During inital schema creation, a rollback is being issue when trying to populate the 'client_events' table. This is because surrounding a string with a " (double quote) in postgres is just asking for a column. The solution was to change the " to ' (double quotes to single quotes).
- Next, the problem is that during client 'creation' (via webadmin) there was an error being thrown: "" Invalid input syntax for INTEGER
- The last problem was on updating the client, if you erased the '0' in the billrate box, and submitted, you would get the same error as before. I just added to checks (one for default_rate and one for currency) right before the execution of the UPDATE statement.
MODEL.PY Line 95
This is working on my setup now, but there are a couple of things to note:
- It was a new setup with no existing tickets
- PostgreSQL 8.3.6
- Trac being run through apache with ldap based authentication
If you have questions or want more info, please feel free to contact me.