Ticket #3290 (closed enhancement: fixed)

Opened 5 months ago

Last modified 5 months ago

Added compatibly with MysSQL

Reported by: anderson@ultraserver.com.br Assigned to: rharkins
Priority: high Component: TracFormsPlugin
Severity: major Keywords: tracforms-0.2.1
Cc: Trac Release: 0.11

Description

Some changes on form_db.py to work with MySQL.

Please put this modifications on the new version.

Attachments

formdb.py (11.2 kB) - added by anderson@ultraserver.com.br on 07/01/08 00:47:32.
The creation SQL scripts of this file were modified to work witk MySQL databases.

Change History

07/01/08 00:47:32 changed by anderson@ultraserver.com.br

  • attachment formdb.py added.

The creation SQL scripts of this file were modified to work witk MySQL databases.

07/01/08 07:34:07 changed by anonymous

  • type changed from defect to enhancement.

Thanks for the attachment on this. It may take a little bit for that to work its way in as I'll need to make sure that the plugin works with the default Trac database (sqlite3) as well as MySQL ultimately. I'll take a look at what may need to happen to make it work both ways.

Because of this, I'm switching the status to enhancement. If I can't find a quick solution then for the time being I'm also going to provide a reference to this ticket on the front page of the plugin with instructions on how to install it on 0.1/0.2. I think I've got an idea that may work but I'll have to see how it goes and will have to set up a test environment for it since I usually just use the default Trac db.

Thanks!

07/01/08 07:34:13 changed by anonymous

  • owner changed from rharkins to anonymous.
  • status changed from new to assigned.

07/01/08 07:34:49 changed by anonymous

  • keywords set to tracforms-0.2.
  • priority changed from normal to high.
  • severity changed from normal to major.

07/01/08 07:35:07 changed by rharkins

  • owner changed from anonymous to rharkins.
  • status changed from assigned to new.

07/01/08 07:35:14 changed by rharkins

  • status changed from new to assigned.

07/01/08 08:51:57 changed by rharkins

  • keywords changed from tracforms-0.2 to tracforms-0.2.1.

07/01/08 10:12:15 changed by rharkins

Check out r3928 (it's under the branches/tracforms-0.2 since it's under development) and let me know if this works out for you. It worked on my test environment for both sqlite and mysql.

I did make some tweaks to the schema, mainly in the form of VARCHAR lengths. As I understand it, MySQL really treats VARCHAR(1) through VARCHAR(127) pretty much the same in terms of space, etc. VARCHAR(128) through VARCHAR(255) are different on some older versions due to the sign bit.

So, I moved context to VARCHAR(255) since these are often URLs and I could imagine cases where the URL would be truncated at 100. The other fields I moved to 127 out of paranoia.

If there are strong reasons to keep these smaller, let me know. Either way, please try out the changes and note whether they work for you.

Thanks again!

07/01/08 11:37:15 changed by anderson@ultraserver.com.br

Worked fine.

But, occurred an error just on an new form (I think this would be in an new ticket but i preferred to put here cause i don´t know if is correlated yet):

get_last_id() takes at least 3 arguments (1 given)

When the form is already created and used everything works great. I´ve used the "Laundry list example" in trackforms wiki.

Thank you too for the feedback and concerns.

07/01/08 12:05:30 changed by rharkins

Ooops! Thanks for pointing that out. I've adjusted it and committed the change to the 0.2 branch (although I can't test it very thoroughly until later).

/me grumbles about postgreSQL's lack of a canonical last_insert_id facility...

07/05/08 13:44:58 changed by anonymous

  • status changed from assigned to closed.
  • resolution set to fixed.

Add/Change #3290 (Added compatibly with MysSQL)




Change Properties
Action