StaticCheckFor a given entity, fields should be in sequence starting from 1. There should be no duplicate sequences within a given entity. Invalidation of this could cause downstream issues with the system in particular with execution of Create/Update operations.
Protected StaticCheckChecks every in-scope entity on its own, so one failing entity does not hide the next one (#4737). For each entity the EntityField sequences must run 1..N with no duplicates, and the fields must line up with the base view's columns as the database catalog reports them. The catalog is read instead of a sample row so a view with no rows is still checked.
Scope follows the run's schema configuration: excludeSchemas is skipped, and when
includeSchemas is set only those schemas are checked.
Protected StaticCheckChecks one entity's fields (already ordered by Sequence).
an empty string when the entity passes, otherwise the failure text
StaticCheckChecks the sequence of fields for a single entity. This is useful when you want to check a single entity at a time.
StaticClassifyClassifies the output of RunIntegrityChecks. Pure: it decides, it does not report.
This lives here rather than inline in the caller so the decision can be tested without
standing up the CodeGen pipeline. The case that needs the test is none-ran: it is
indistinguishable from a pass by every signal except the array's length, so a caller that
forgets it looks correct and is not.
Protected StaticExcludedBase-view column exclusions (baseViewExcludedFields) keep an EntityField whose column the
view leaves out on purpose, so those fields are skipped in the column comparison. Entries are
Entity.Field or a bare Field (any entity). Empty unless exclusions are permitted.
Protected StaticIsTrue when the schema is checked: not in excludeSchemas, and in includeSchemas when that
list is set. Compared case-insensitively.
Protected StaticLoadReads the column order of every view and table in the given schemas from INFORMATION_SCHEMA.COLUMNS, which both SQL Server and PostgreSQL provide.
schema.object (lower case) → column names in ordinal order
StaticRunRuns integrity checks on the system. If onlyEnabled is true, then only checks that are enabled in the configuration will be run. If false, all checks will be run.
This class has methods that can check various aspects of a MemberJunction installation's integrity. Code Gen will run the various integrity checks based on configuration options that can be set in the master configuration file.