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

[5.5] Allow StudlyCase and snake_case migration names #22648

Merged
merged 1 commit into from
Jan 5, 2018
Merged

[5.5] Allow StudlyCase and snake_case migration names #22648

merged 1 commit into from
Jan 5, 2018

Conversation

jasonmccreary
Copy link
Contributor

@jasonmccreary jasonmccreary commented Jan 5, 2018

This includes a small change to allow the developer to use a StudlyCase migration name for consistency with conventions used by other artisan commands.

This was previously with the new additions in #20760. However, since that was closed, I wanted to separate this as I believe it has value in core.

@mnabialek
Copy link
Contributor

This is a bit problematic for me. Sometimes I create migrations with name like this add_whatherver_to_TABLE_table and now after this change I get add_whatherver_to_t_a_b_l_e_table. I use uppercase because tables for some clients I work are in upper case so either I have to use lowercase table name or I have manually change name of file.

@jasonmccreary
Copy link
Contributor Author

Not sure the adoption of such a naming convention given snake_case is inherently lower. It's likely an easy fix if you are entering the migration name as snake_case, but using CAPS.

However, the opposite (going from StudlyCase to snake_case) will always be problematic unless the migration name was checked to contain a table name. Seems like a lot of code for what I would consider an edge case.

I'll see if I can add a small check to at least not "double snake_case" a migration name.

@GrahamCampbell GrahamCampbell changed the title Allow StudlyCase and snake_case migration names [5.5] Allow StudlyCase and snake_case migration names Jun 16, 2018
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