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

Add the ability to specify the field length to the bake command #140

Merged
merged 1 commit into from
Oct 14, 2015

Conversation

HavokInspiration
Copy link
Member

This allows to specify the field length when baking a new migration file by allowing the fieldType syntax to accept a number written within brackets :

bin/cake bake migrations create_users username:string[128]

I went with brackets because parenthesis cause the shell call to fail.

I did not add any test to control the length specified other than the one that were already done because phinx does it with the adapters and default sizes based on the field type.

Refs to #128

@HavokInspiration HavokInspiration added this to the 1.4 milestone Oct 14, 2015
@lorenzo
Copy link
Member

lorenzo commented Oct 14, 2015

Great job! 👏

lorenzo added a commit that referenced this pull request Oct 14, 2015
Add the ability to specify the field length to the bake command
@lorenzo lorenzo merged commit b82d812 into master Oct 14, 2015
@lorenzo lorenzo deleted the bake-field-length branch October 14, 2015 20:12

The length parameter for the ``fieldType`` is optionnal and should always be
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extra n on optional here ;)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed with a432326

Thanks @josegonzalez

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants