http://blackanger.blog.51cto.com/140924/122472/

Migration API

不設定主鍵 create_table :goods, :id => false do |t| t.integer :good_id t.string :good_desc

改變主鍵 create_table :goods, :id => good_id do |t| t.string :good_desc end