cloudfoundry/cloud_controller_ng — pull request #38 by youngm (2013-04-16 20:22:14+00:00)
Title: Initial commit of Schema changes necessary to support Oracle.

I am working on porting the cloud controller to Oracle. There are several issues with the current cloud controller schema that make it incompatible with Oracle. This is a no-op pull request that makes an initial set of changes to the migration scripts necessary to support Oracle. The main issues addressed in this pull request are:

* Oracle has a fixed 30 char limit for all "identifiers" (column names, table names, constraints, etc). This pull request includes changes to the migration scripts to reduce the size of several Sequel default identifiers, index names mostly. And renamed some of the existing FK constraints.

* In Oracle "timestamp" is a reserved word. So I have renamed that column in the billing_events table to "event_timestamp", added methods to alias it, and updated a query that referenced :timestamp as a column.

* Oracle has no formal "boolean" type. Sequel appears to have some functionality to abstract boolean types across databases using its "TrueClass/FalseClass" types. To support this I have changed the type of all "Boolean" columns to "TrueClass".

All tests pass using sqlite.

I have tested these migrations on Oracle and all of the migrations execute successfully against Oracle. Nothing else works in Oracle yet but the migrations do execute.

For further context to this pull request see this thread on the mailling list. (https://groups.google.com/a/cloudfoundry.org/forum/?fromgroups=#!topic/vcap-dev/1hKCkItFQmo)

I plan to continue addressing other Oracle related issues in subsequent pull requests.

Mike