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:
parent
5e38819c34
commit
290699daeb
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue