class CreateCities
Create city migration file
Public Instance Methods
change()
click to toggle source
# File lib/generators/templates/migrations/create_cities.rb, line 3 def change create_table :cities do |t| t.string :name t.references :state, index: true, foreign_key: true t.timestamps null: false end end