Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Best Practices check #31

Closed
mcsnolte opened this issue Jun 27, 2014 · 9 comments
Closed

Feature: Best Practices check #31

mcsnolte opened this issue Jun 27, 2014 · 9 comments

Comments

@mcsnolte
Copy link

Similar to how PBP are checked with https://metacpan.org/pod/Perl::Critic it would be very useful for doing something similar for DBIC Schemas. Here are some examples:

  • Relationship names should not match column names
  • NULL-able belongs_to relationships should use LEFT join type
@frioux
Copy link
Owner

frioux commented Jun 27, 2014

also non null belongs_to should not use left.

@mcsnolte
Copy link
Author

more things to try and check:

  • relationships to a single record is singular
  • relationships to multiples is plural

tricky, but maybe could check for add_fk_index not enabled on relationships to large tables

@mcsnolte
Copy link
Author

also warn on duplicate relationship definitions under different names to prevent errors stemming from copy and paste.

@frioux
Copy link
Owner

frioux commented Oct 22, 2014

good one!

@frioux
Copy link
Owner

frioux commented May 2, 2015

@mcsnolte
Copy link
Author

mcsnolte commented May 5, 2015

Looks perfect! Cool, I hope I can work on this soon

@frioux
Copy link
Owner

frioux commented May 5, 2015

If not I'll get around to it eventually

sent from a rotary phone, pardon my brevity
On May 4, 2015 10:46 PM, "Steve Nolte" notifications@github.com wrote:

Looks perfect! Cool, I hope I can work on this soon


Reply to this email directly or view it on GitHub
#31 (comment)
.

@frioux
Copy link
Owner

frioux commented May 30, 2015

Got the relname != colname one released

@frioux
Copy link
Owner

frioux commented Jul 3, 2016

I'm gonna call this done. Create issues for each one that you think is worth doing.

@frioux frioux closed this as completed Jul 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants