class CreateChildResources < ActiveRecord::Migration def change create_table :child_resources do |t| t.string :name t.string :description t.references :ParentResource t.timestamps end add_index :child_resources, :ParentResource_id end end