Skip to content
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

Merged
merged 1 commit into from
Jul 17, 2014

Conversation

deeky666
Copy link
Member

Adding documentation about currently accepted column options in mappings. Also providing some more examples how to map column options for each driver.

@doctrinebot
Copy link

Hello,

thank you for creating this pull request. I have automatically opened an issue
on our Jira Bug Tracker for you. See the issue link:

http://www.doctrine-project.org/jira/browse/DDC-3216

We use Jira to track the state of pull requests and the versions they got
included in.

@@ -109,6 +109,26 @@ Optional attributes:

- **nullable**: Determines if NULL values allowed for this column.

- **options**: Array of additional options:
Copy link
Member

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)

Copy link
Member Author

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.

Copy link
Member

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.

Copy link
Member Author

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.

Copy link
Member

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 ;-)

Ocramius added a commit that referenced this pull request Jul 17, 2014
[DDC-3073] Add documentation about how to map column options
@Ocramius Ocramius merged commit 205a5de into doctrine:master Jul 17, 2014
@Ocramius Ocramius self-assigned this Jul 17, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants