mbarre / schemacrawler-additional-lints

Some additionnal lints for Schemacrawler
Other
12 stars 7 forks source link

Non referenced table with important number of rows #169

Open adriens opened 5 years ago

adriens commented 5 years ago

Detect tables that are not referenced in the model and for which the number of rows exceeds a given/parametrized (I propose 0 by default) threeshold.

bheemreddy181-zz commented 5 years ago

Do you have any approach for this? How can we know whether a table isn't referenced in the rails models from PSQL Implementation - this will be little difficult I guess? I would say we should have some gem which kind of has the privilege to query model attributes - something like that. I would like to hear if you already have something in mind.

adriens commented 5 years ago

Schemacrawler totally relies on the database data model. If ou have relations in you rails project that uou do not have in your database :

1 - It's bad 2- Fixt it ASAP :laughing:

I don't know a lot about rails. All I can tell you is that if you have the privielege to read (just read) a table, you will be able to get its metadatas : does it answer your question :grey_question:

bheemreddy181-zz commented 5 years ago

I was confused with the lint now , Can you please elaborate a bit please

bheemreddy181-zz commented 5 years ago

What do you mean by Model here ? @adriens