views:

33

answers:

1

To add the phone column to the tickets table, I can write:

ruby script/generate migration AddPhoneToTickets phone:string

There seems to be a redundancy here. But is it necessary?

Aren't we repeating ourselves by being required to specify "phone" both in the name of the migration (AddPhoneToTickets) as well as in the column definition (phone:string)?

+2  A: 

You're not required to put Phone in the migration name. For example, if you were adding a bunch of contact fields, you could just as easily call it AddContactFieldsToTickets and specify all the fields. It's not specific enough to use the name of the migration for anything but the table name, really.

Tim Sullivan
You're right. I misread the documentation. Thanks.
eggdrop