-
-
Notifications
You must be signed in to change notification settings - Fork 56
Open
Description
Problem Statement
GIN seems to be the recommended index for arrays & the like.
Proposed Solution
ORM\Index has an argument flags and options. Don't know what they are meant for - maybe they could be used:
#[ORM\Index(name: 'my_gin', fields: ['foo'], flags: ['GIN'], options: ['gin' => true])]Feature Type
Framework Integration Enhancement
PostgreSQL Feature/Function/Type
No response
PostgreSQL Documentation Link
https://www.postgresql.org/docs/current/gin.html
Use Case
Needed (more or less) every time you add an array column ;-)
Example Usage
Alternatives Considered
If it's not possible (or you don't want) to support them, you could add a note to the docs:
When defining a normal index, Doctrine schema tool creates:
CREATE INDEX my_gin ON foobar (foo);But you can manually change it to:
CREATE INDEX my_gin ON foobar USING GIN (foo);Then schema tool won't notice the difference (i.e. doesn't try to "fix" the index on every run).
Contribution
No
Additional Context
I could create a PR for the docs.
Checklist
- I have searched existing issues and discussions to ensure this feature hasn't been requested before
- This feature is related to PostgreSQL-specific functionality for Doctrine