DDC-3014: [GH-973] Added index flags support in annotation, xml & yaml mapping drivers. #3747

Closed
opened 2026-01-22 14:27:09 +01:00 by admin · 3 comments
Owner

Originally created by @doctrinebot on GitHub (Mar 6, 2014).

Originally assigned to: @Ocramius on GitHub.

Jira issue originally created by user @doctrinebot:

This issue is created automatically through a Github pull request on behalf of adrianolek:

Url: https://github.com/doctrine/doctrine2/pull/973

Message:

It allows specifying eg. fulltext index for MysqlPlatform (the platform already supports it - https://github.com/doctrine/dbal/blob/master/lib/Doctrine/DBAL/Platforms/MySqlPlatform.php#L714 , but it couldn't be used in annotations/xml/yaml/php schemas). And also other platforms use flags for indexes (virtual, clustered etc.).

So now flags can be used like:

/****
 * @Table(...,indexes={@Index(columns={"description"},flags={"fulltext"})})
 */
class Foo
{ ... }
...
    <indexes>
      <index name="0" columns="description" flags="fulltext"/>
    </indexes>
...
Foo:
  ...
  indexes:
    -
      columns: [ description ]
      flags: [ fulltext ]
$metadata->setPrimaryTable(array(
   ...
   'indexes' => array(
       array(
          'columns' => array('description'),
          'flags' => array('fulltext'),
       )
   ),
   ...
));
Originally created by @doctrinebot on GitHub (Mar 6, 2014). Originally assigned to: @Ocramius on GitHub. Jira issue originally created by user @doctrinebot: This issue is created automatically through a Github pull request on behalf of adrianolek: Url: https://github.com/doctrine/doctrine2/pull/973 Message: It allows specifying eg. fulltext index for MysqlPlatform (the platform already supports it - https://github.com/doctrine/dbal/blob/master/lib/Doctrine/DBAL/Platforms/MySqlPlatform.php#L714 , but it couldn't be used in annotations/xml/yaml/php schemas). And also other platforms use flags for indexes (virtual, clustered etc.). So now flags can be used like: ``` php /**** * @Table(...,indexes={@Index(columns={"description"},flags={"fulltext"})}) */ class Foo { ... } ``` ``` xml ... <indexes> <index name="0" columns="description" flags="fulltext"/> </indexes> ... ``` ``` yml Foo: ... indexes: - columns: [ description ] flags: [ fulltext ] ``` ``` php $metadata->setPrimaryTable(array( ... 'indexes' => array( array( 'columns' => array('description'), 'flags' => array('fulltext'), ) ), ... )); ```
admin added the Improvement label 2026-01-22 14:27:09 +01:00
admin closed this issue 2026-01-22 14:27:11 +01:00
Author
Owner

@doctrinebot commented on GitHub (Apr 13, 2014):

Comment created by @doctrinebot:

A related Github Pull-Request [GH-973] was closed:
https://github.com/doctrine/doctrine2/pull/973

@doctrinebot commented on GitHub (Apr 13, 2014): Comment created by @doctrinebot: A related Github Pull-Request [GH-973] was closed: https://github.com/doctrine/doctrine2/pull/973
Author
Owner

@doctrinebot commented on GitHub (Apr 13, 2014):

Comment created by @ocramius:

Merged: 3a1e24e680

@doctrinebot commented on GitHub (Apr 13, 2014): Comment created by @ocramius: Merged: https://github.com/doctrine/doctrine2/commit/3a1e24e6801961128c27104919050d40d745030b
Author
Owner

@doctrinebot commented on GitHub (Apr 13, 2014):

Issue was closed with resolution "Fixed"

@doctrinebot commented on GitHub (Apr 13, 2014): Issue was closed with resolution "Fixed"
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#3747