-
Notifications
You must be signed in to change notification settings - Fork 64
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
Suggestion: Validation between class fields and table columns #187
Comments
Hi Peter, This sounds like a really excellent module. What is the state of your proof of concept? If it's not ready for a full PR yet, would you mind linking to it here so we can take a look and provide some feedback? Did you have any questions we can help with to get this ready for a PR? |
Hi Christopher, |
Hi @petercranston, thanks for your patience on this. Could you submit a draft PR for this per this new GH feature? |
Also, I've just taken a quick look at this and at first blush it looks good. I did notice that in my clean 11 instance table name case is giving some false negatives. So, one thing that could be improved is to make table names case-insensitive like you did for column names. My other testing showed exactly what I expected though (column in class, but not DB; column in DB, but not class; and field type "not represented in database" not being returned in report) I think you're probably safe to go straight to a normal PR if you add the table name case insensitivity. Thanks for the excellent work! |
@ChristopherJennings I've made the updates as suggested. Thanks! |
Thanks for the PR! I've pulled the changes into master and it'll be included in the next release. I'm currently waiting on one more PR that's nearly done before I issue a new release, but it should be soon. |
Motivation
I recently came across a site where previous developers had added new columns directly to the database, without going through the recommended process of adding them as a field on a kentico class. I wanted an easy way to validate all kentico classes against the database to see how widespread the problem was.
Proposed solution
A new module to lookup the fields for each class (parsing the ClassXmlSchema) and comparing that with the columns in the database. I've developed a proof of concept module to do this which I can create a pull request for.
The text was updated successfully, but these errors were encountered: