Class SchemaDiff

java.lang.Object
com.kingsrook.qqq.backend.core.model.metadata.tables.SchemaDiff

public final class SchemaDiff extends Object
The difference between two table schema fingerprints' descriptors: fields added, removed and changed, plus any change to the table-level properties (name, primary key, backend type, unique keys, associations). "before" is typically the stored fingerprint (e.g., from a backup manifest) and "after" the current table.
  • Method Details

    • of

      public static SchemaDiff of(TableSchemaFingerprint before, TableSchemaFingerprint after)
      Compare two fingerprints' descriptors.
    • getAddedFields

      public List<String> getAddedFields()
      Names of fields in "after" but not in "before", sorted.
    • getRemovedFields

      public List<String> getRemovedFields()
      Names of fields in "before" but not in "after", sorted.
    • getChangedFields

      public List<SchemaDiff.FieldChange> getChangedFields()
      Fields in both, whose descriptor attributes differ, sorted by field name.
    • getChangedTableProperties

      public List<SchemaDiff.PropertyChange> getChangedTableProperties()
      Changed table-level descriptor properties (table, primaryKeyField, backendType, uniqueKeys, associations), sorted by property name.
    • isEmpty

      public boolean isEmpty()
      True when nothing differs.
    • toString

      public String toString()
      Short human-readable summary, e.g., for logs and review lines.
      Overrides:
      toString in class Object