• The content is sound and fairly well thought out. As stated by others the code is a mess with errors, typos, etc. I do not like the ideal of creating "missing" indexes automatically. This leaves you wide open to problems down the road not to mention source control issues.

    In all I think you did a good job here technically but please test your code before posting.