Flyspray - The bug killer!

“If debugging is the process of removing bugs, then programming must be the process of putting them in.” – Edsger Dijkstra

This is the Bug Tracking System for the Flyspray project. This is not a demo! Before opening a new task, please read the guidelines!

Do not issue bugs reports against versions earlier than 0.9.9.6

Security problem? Check the security section.

| Tasklist |

FS#1364 - Postgres support for 1.0

Attached to Project: Flyspray - The bug killer!
Opened by Tobias Schittkowski (tobias.schittkowski) - Tuesday, 23 October 2007, 18:03 GMT+1
Task Type TODO
Category Database Queries
Status Unconfirmed
Assigned To No-one
Operating System All
Severity Low
Priority Normal
Reported Version 1.0.0 devel
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 1
Private No

Details

Included is a patch for pgsql-support in postgres. Note: some database fields have to be changed manually after an update from 0.x (the NOT NULL has to be removed). These fields are stated in the patch.

This task depends upon

Comment by Florian Schmitz (Floele) - Wednesday, 24 October 2007, 12:16 GMT+1

I suppose that you tested everything with mysql as well?

Comment by Tobias Schittkowski (tobias.schittkowski) - Wednesday, 24 October 2007, 14:02 GMT+1

I did a quick test with mysql, I also see the problems with db columns beeing NOT NULL and the problem displaying the tasklist (...field0), perhaps this is due to my changes...

Comment by Tobias Schittkowski (tobias.schittkowski) - Wednesday, 24 October 2007, 16:34 GMT+1

Attached is a new patch (including the first one) which fixes my problems with the field0 in some templates.

Comment by Florian Schmitz (Floele) - Saturday, 27 October 2007, 15:14 GMT+1

I'll look into it as soon as possible...in the meantime can do further testing if you like. Changes like yours are extremly sensitive unfortunately...

Comment by Florian Schmitz (Floele) - Wednesday, 31 October 2007, 23:04 GMT+1

Why did you add comments like "You have to change field_changed in PGSQL for NOT NULL=false after upgrade from 0.x"? Such comments don't make sense in the code.

Also, the field0 fixes are not wanted, since the "field0" must not exist in the first place. Fixing the symptoms doesn't fix any problems.

Comment by Tobias Schittkowski (tobias.schittkowski) - Friday, 02 November 2007, 09:52 GMT+1

The comments to change the field type where meant for me for debugging - so that I know what to change when the same code gives an error again.

I was not able to find out the reason for the field0-bug, so I had to change the templates to handle the error.

Comment by Florian Schmitz (Floele) - Monday, 05 November 2007, 06:42 GMT+1

Could you please adjust the comments so that they are more clear? Comments which are not obvious for all developers on first sight might not exactly be useful.

I'll look into the field0 problem myself.

Comment by francisco (fjleon) - Monday, 07 April 2008, 01:57 GMT+1

I haven't researched on how flyspray is handling database support, but i will give my opinion. All software that runs under more than one engine should more or less have this structure:

  • An external file containing all the sql queries done with a single database implementation. Each sql query should have a name.
  • Some kind of initializer code that load up a connection to the database, which should read a configuration file to select the proper database engine
  • Each page, class or whatever that needs database support just calls an instance of the initializer class and just calls a sql query name. That page or class doesn't know what database is being used, it doesn't care :)

Any decent ORM package can do this. My thesis (done in Java) uses sqlmaps, so the code in each web page is the same for any database, the only thing that changes is the external file with the sql statements.

This would make it extremely easy to add new database engine support.

Loading...