[midPoint-git] [Evolveum/midpoint] b7d35e: Add outdated DB schema checking (MID-4923)

Pavol Mederly mederly at evolveum.com
Wed Oct 3 23:01:18 CEST 2018


  Branch: refs/heads/tmp/tier
  Home:   https://github.com/Evolveum/midpoint
  Commit: b7d35e8ee7042a31300f6a526300de0cfe1a4754
      https://github.com/Evolveum/midpoint/commit/b7d35e8ee7042a31300f6a526300de0cfe1a4754
  Author: Pavol Mederly <mederly at evolveum.com>
  Date:   2018-09-29 (Sat, 29 Sep 2018)

  Changed paths:
    M config/sql/_all/h2-3.9-all.sql
    M config/sql/_all/h2-upgrade-3.8-3.9.sql
    M config/sql/_all/mysql-3.9-all-utf8mb4.sql
    M config/sql/_all/mysql-3.9-all.sql
    M config/sql/_all/mysql-upgrade-3.8-3.9-utf8mb4.sql
    M config/sql/_all/mysql-upgrade-3.8-3.9.sql
    M config/sql/_all/oracle-3.9-all.sql
    M config/sql/_all/oracle-upgrade-3.8-3.9.sql
    M config/sql/_all/postgresql-3.9-all.sql
    M config/sql/_all/postgresql-upgrade-3.8-3.9.sql
    M config/sql/_all/sqlserver-3.9-all.sql
    M config/sql/_all/sqlserver-upgrade-3.8-3.9.sql
    M repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/SchemaChecker.java
    M repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/SqlRepositoryConfiguration.java
    A repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RGlobalMetadata.java

  Log Message:
  -----------
  Add outdated DB schema checking (MID-4923)

This is a preliminary support for outdated DB schema checking.
Preliminary because e.g.
1) it assumes that any version mismatch means that the schema is
   outdated (as opposed to newer than required);
2) no attempt at automated remediation is made -- only a generic
   error message is output, pointing to midPoint wiki (release notes)


  Commit: b31acb19ea184aabb43055fd549aee5ff646e612
      https://github.com/Evolveum/midpoint/commit/b31acb19ea184aabb43055fd549aee5ff646e612
  Author: Pavol Mederly <mederly at evolveum.com>
  Date:   2018-09-30 (Sun, 30 Sep 2018)

  Changed paths:
    R repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/SchemaChecker.java
    M repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/SqlRepositoryConfiguration.java
    A repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/schemacheck/DataStructureCompliance.java
    A repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/schemacheck/DeclaredVersion.java
    A repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/schemacheck/SchemaAction.java
    A repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/schemacheck/SchemaActionComputer.java
    A repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/schemacheck/SchemaChecker.java
    A repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/schemacheck/SchemaState.java

  Log Message:
  -----------
  Do more sophisticated schema checking (MID-4923)

Now we properly check for upgradable/non-upgradable schema version
mismatch, taking care of many special cases. See SchemaActionComputer
class. TODO: change INFO to DEBUG level for logging at specified places.


  Commit: 89bdbbf7fcc0ecd3ed62889b64a3101309386dab
      https://github.com/Evolveum/midpoint/commit/89bdbbf7fcc0ecd3ed62889b64a3101309386dab
  Author: Pavol Mederly <mederly at evolveum.com>
  Date:   2018-09-30 (Sun, 30 Sep 2018)

  Changed paths:
    M repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/schemacheck/SchemaChecker.java

  Log Message:
  -----------
  Eliminate stack trace if no metadata table


  Commit: 8c355dad53fca337b2f02b0ed8f9b47aea899c9f
      https://github.com/Evolveum/midpoint/commit/8c355dad53fca337b2f02b0ed8f9b47aea899c9f
  Author: Pavol Mederly <mederly at evolveum.com>
  Date:   2018-10-01 (Mon, 01 Oct 2018)

  Changed paths:
    M repo/repo-sql-impl/pom.xml
    M repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/SqlRepositoryConfiguration.java
    M repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/schemacheck/DeclaredVersion.java
    M repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/schemacheck/SchemaAction.java
    M repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/schemacheck/SchemaActionComputer.java
    M repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/schemacheck/SchemaChecker.java

  Log Message:
  -----------
  Do automatic schema upgrade if possible (MID-4923)

Currently supported only from 3.8 to 3.9.

Also, switched default hbm2ddl from "validate" to "none" for non-H2
databases. This puts new schema-validation code into action.


Compare: https://github.com/Evolveum/midpoint/compare/8658c8ca8ce3...8c355dad53fc
      **NOTE:** This service has been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/

      Functionality will be removed from GitHub.com on January 31st, 2019.


More information about the midPoint-svn mailing list