[Trac] Database Patch 13 available
Brad Anderson
brad at dsource.org
Mon Apr 4 01:22:43 EDT 2005
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.
Enjoy,
BA
More information about the Trac
mailing list