add further clarifications on rails g migrate

add comment clarifying the use of snake_case

add comment clarifying that g can be used instead of 'generate'
This commit is contained in:
Ben Koshy 2017-03-01 16:34:40 +11:00 committed by GitHub
parent 5e38819c34
commit 290699daeb
1 changed files with 2 additions and 2 deletions

View File

@ -6,10 +6,10 @@ category: Rails
### Automatically make migrations
$ rails generate migration RemovePartNumberFromProducts part_number:string
$ rails generate migration remove_part_number_from_products part_number # rails assumes string if not type given
$ rails generate migration remove_part_number_from_products part_number # rails assumes string if not type given - and you can use snake_case
$ rails generate migration AddNameToWidgets name:string
$ rails generate migration add_name_to_widgets name:string
$ rails g migration add_name_to_widgets name:string # you can use the short cut 'g' instead of generate - they both do the same thing
### Run migrations