2017-03-15 rails_g_model rails 创建数据表 上图创建了一张表,表名为:see_elders see_content,see_image为俩字符串类型的字段 t.references :company_doctor, foreign_key: true该代码将生成company_doctor这张表的外键及索引字段company_doctor_id comment: "看望老人图片记录"该代码为字段描述 t.timestamps该代码讲生成 created_at,updated两个字段 引擎使用 rails 数据库迁移(删除外键,删除索引,更改子弹类型等)