This Fork adds the missing capabilities for Oracle 12.x
- Function Based Indexes (with expressions on any index column)
- IDENTITY columns instead of sequences/triggers
- Column-level collations
- Huge performance improvement on schema introspection
Use 'autoincrement' => true
in the options of a column to define a column as GENERATED BY DEFAULT ON NULL AS IDENTITY
Add 'platformOptions' => ['collation' => 'XGERMAN_CI']
to the options array
Other DBMS either do not support function based indexes at all or support only one WHERE-condition for the whole index,
that's why Doctrine does not support a convenient way to manage several expressions in one index.
With this fork you can define as many expressions as different column names are mentioned in the expressions.
You have to write the expression exactly in the same way as Oracle stores it in user_ind_expressions.column_expression
,
except that trailing spaces and double spaces are removed.
Doctrine requires that the expressions are mapped to existing columns, use the column names in the order in which they appear in the expressions.
It is a known limitation that not every possible combination of expressions can be mapped this way.
Example:
$table->addUniqueIndex(
['COLUMN_A', 'COLUMN_B'],
'UX_INDEX_NAME',
['where' => [
'COLUMN_A' => 'CASE WHEN ("COLUMN_A"=0 AND "COLUMN_B"=1) THEN "COLUMN_C" END',
'COLUMN_B' => 'CASE WHEN ("COLUMN_A"=0 AND "COLUMN_B"=1) THEN "COLUMN_D" END',
]]);
Master | 2.12 |
---|---|
Powerful database abstraction layer with many features for database schema introspection, schema management and PDO abstraction.