数据库 - 用 devise 建 User 表时,个人信息详细资料是否需要单独建一张表?
黄舟
黄舟 2017-04-22 08:59:15
0
1
695

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

黄舟
黄舟

人生最曼妙的风景,竟是内心的淡定与从容!

reply all(1)
阿神

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.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!