search

Home  >  Q&A  >  body text

数据库 - 用 devise 建 User 表时,个人信息详细资料是否需要单独建一张表?

用 devise 新建 User 表时,个人信息的详细资料建在 User 表里,还是需要分离另一张表 has_one 呢,一般哪种常用?

黄舟黄舟2774 days ago738

reply all(1)I'll reply

  • 阿神

    阿神2017-04-22 09:01:15

    Separation is good, even more so when using Devise.

    The main reason is not the performance, but the convenience of modification. It is more troublesome to change things in the User table with Devise due to various verifications and callbacks. Users can change personal information at any time, such as changing their Weibo address or something.

    reply
    0
  • Cancelreply