silverstripe/silverstripe-postgresql — pull request #6 by tractorcow (2012-09-17 05:12:49+00:00)
Title: 3.0 ddl fixes

This request compassed quite a few various bugfixes, updates, code cleanup, and improvement in data modelling.

Essentially this update project was created in response to https://github.com/silverstripe/sapphire/pull/782 and this request follows that discussion.

This request includes the following updates:
* Formalised the index parsing mechanism so that parseIndexSpec and convertIndexSpec complement each other. Instead of having to check if a spec is a string/array each time it is used it can be simply parsed and cleaned up using this method.
* All indexes and triggers are now created using mixed case names, rather than forcing all to be generated in lowercase. This was required to enable case-sensitive comparison between the current database schema and the indexes, etc... that SilverStripe requests that the postgres connector generates.
* A serious amount of code consolidation and refactoring to formalise a lot of common actions such as generating index names, parsing indexes, handling column lists,
* Better and more descriptive variable names used in various places (E.g. got rid of $k and $v and used $indexName and $indexSpec).
* Better conformance to silverstripe's coding conventions.

The following bugs have been fixed:
* Fixed paging on full text search
* Fixed errors where indexes would constantly be detected as changes during dev/build (related to the updates above). This was about 80% of the time invested. - Required to conform to the stricter test cases (See DataObjectSchemaGenerationTest in the above pull request to framework). Full text search columns were a nasty culprit here.
* Fixed error where quoted full text indexes would crash queries. (see the above pull request).

Still to test:
* Namespaced columns
* Additional test cases needed for postgres specific index types
* Postgres 8.X