Database style guide |
Table naming style guide.
Hi guys, I was just talking with mwhitney about coding guidelines and he mentioned PSR. At the moment I try to use codeigniter's style guide. https://ellislab.com/codeigniter/user-gu...guide.html But I don't get how to do the tables. Do tables names and column follow the same convention? eg Table name : users Table columm: permission_id All lowercase separated with underscores? Any tips would be useful.
Practical guide to IgnitedCMS - Book coming soon, www.ignitedcms.com
You've linked to the old CI2 styleguide on EllisLab's website, while you should always be looking at codeigniter.com:
http://www.codeigniter.com/user_guide/ge...guide.html ... where the title pretty much answers your question - it's a PHP styleguide, it doesn't have any database-related rules.
Thank you for the reply Narf!
You are right there are no database related rules although I think it is a good idea to keep naming consistency throughout for example not to mix camel case with underscores, unfortunately one of my tables contravenes this rule!! Also I'm NOT using "===" for comparison which was a big wake up call! Thanks for the link I'll use CI 3.0 as the official guide now. Thanks for replying to my PM, I was also told to use password_hash() instead of crypt by another experienced user and I'm just about to push my update to github. P.S if you ever do get some time to review my CMS PM me and let me know
Practical guide to IgnitedCMS - Book coming soon, www.ignitedcms.com
|
Welcome Guest, Not a member yet? Register Sign In |