[Trac] Database Patch 13 available
Christopher Lenz
cmlenz at gmx.de
Mon Apr 4 12:43:21 EDT 2005
Am 04.04.2005 um 07:22 schrieb Brad Anderson:
> Patch 13 is available for download. Maybe this is the 'lucky' one
> that gets into the trunk.
>
> http://trac.dsource.org/projects/test/wiki/PostgresqlPatch
>
> From the changelog:
> Patch 13
>
> * sync'd with trunk at r1487
> * moved SQLiteConnection and PyPGSQLConnection back into
> trac/db.py and got rid of the trac/dbms/* module.
> * changed trac-admin to have one extra parameter, db_str instead
> of the individual prompts. This should be universally acceptable for
> this (temporary ?) database independence layer.
> * expanded the notion of union_fields, which are fields (currently
> in Search and Timeline modules) that need to be 'cast' in Postgres to
> be a part of a UNION ALL query. Since Timeline now needs them, due to
> the rev field now being text, I refactored to make it a bit more
> generic. The get_union_fields() methods for each db connection class
> now take a parameter to identify the module for which they need to
> give the field names. Another reason for this separation was that the
> table aliases were different between Timeline and Search.
> * creating of the databases now happens in the respective db
> connection class.
> o SQLite uses the code that was in trac/env.py
> o Postgres uses a call to a command-line app: createdb
> (note: *nix only, Win32 not implemented, so make the db separately)
> * trac/db_default no longer has raw SQL code. It has a tuple that
> can be handled by the create_db() method in the db connection class.
> This allows for different CREATE TABLE semantics around 'auto-number'
> or 'auto-increment' fields, as well as creation of primary/unique
> keys.
This looks cool, I like how the size of the patch has dropped
significantly ;-)
Thanks a *lot* for keeping to work on this patch all this time, I know
it must have been a pain.
Just two points/questions:
1) IIUC you've not adopted the SQLObject syntax for specifying the
connection parameters. Any reason for that?
2) Is there a windows-equivalent for `createdb`?
Cheers,
Chris
--
Christopher Lenz
cmlenz at gmx.de
http://www.cmlenz.net/
More information about the Trac
mailing list