-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DDC-3073] Add documentation about how to map column options #1083
Conversation
Hello, thank you for creating this pull request. I have automatically opened an issue http://www.doctrine-project.org/jira/browse/DDC-3216 We use Jira to track the state of pull requests and the versions they got |
@@ -109,6 +109,26 @@ Optional attributes: | |||
|
|||
- **nullable**: Determines if NULL values allowed for this column. | |||
|
|||
- **options**: Array of additional options: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a note that these options can also be arbitrarily added and may be platform-specific?
Also, defining these options will likely break schema tool migrations, and people WILL open issues about them if they expect everything to run smooth (which is not the case)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Ocramius I added a note to each option below where a specific platform might not support it. Should I still add the note upfront?
I will add another note that you can specify options arbitrarily.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@deeky666 it's not really about platform support, but about the schema tool. It is well known that defining those options (especially stuff like comments) breaks the schema tool's ability to determine the D2 type to use, for example.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm is that really so? AFAIK a custom D2 type that requires a comment will just extract the D2 information part from the comment and leave the original comment as is for the comparator, no? And AFAIK other options are also explicitly compared by the comparator so I don't see why the schema tool should have any problems with them. The only attribute I know that doesn't work with the schema tool is columnDefinition
but that's not part of the options here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you think it works, then fine :D You're the DBAL chief ;-)
[DDC-3073] Add documentation about how to map column options
Adding documentation about currently accepted column options in mappings. Also providing some more examples how to map column options for each driver.