{"record":{"id":"c08f5e5189888f23","repo":"flowable/flowable-engine","slug":"could-not-update-flowable-database-schema-unknown","errorCode":null,"errorMessage":"Could not update Flowable database schema: unknown version from database: '","messagePattern":"Could not update Flowable database schema: unknown version from database: '","errorType":"exception","errorClass":"FlowableException","httpStatus":null,"severity":"critical","filePath":"modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/FlowableVersions.java","lineNumber":205,"sourceCode":"    public static int getFlowableVersionIndexForDbVersion(String dbVersion) {\n        int matchingVersionIndex;\n        \n        if (\"fox\".equalsIgnoreCase(dbVersion)) {\n            dbVersion = \"5.13\";\n        }\n        \n        // Determine index in the sequence of Flowable releases\n        matchingVersionIndex = findMatchingVersionIndex(dbVersion);\n\n        // If no match has been found, but the version starts with '5.x',\n        // we assume it's the last version (see comment in the VERSIONS list)\n        if (matchingVersionIndex < 0 && dbVersion != null && dbVersion.startsWith(\"5.\")) {\n            matchingVersionIndex = findMatchingVersionIndex(FlowableVersions.LAST_V5_VERSION);\n        }\n\n        // Exception when no match was found: unknown/unsupported version\n        if (matchingVersionIndex < 0) {\n            throw new FlowableException(\"Could not update Flowable database schema: unknown version from database: '\" + dbVersion + \"'\");\n        }\n        \n        return matchingVersionIndex;\n    }\n\n    public static boolean hasCamMigrationVersion(String version) {\n        int index = findMatchingCamMigrationIndex(version);\n        if (index >= 0) {\n            return true;\n        } else {\n            return false;\n        }\n    }\n    \n    protected static int findMatchingCamMigrationIndex(String dbVersion) {\n        int index = 0;\n        int matchingVersionIndex = -1;\n        while (matchingVersionIndex < 0 && index < FlowableVersions.CAM_MIGRATION_VERSIONS.size()) {","sourceCodeStart":187,"sourceCodeEnd":223,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/FlowableVersions.java#L187-L223","documentation":"Thrown by FlowableVersions.getFlowableVersionIndexForDbVersion when the schema version recorded in the ACT_GE_PROPERTY table does not match any known Flowable release version (including the last v5/v6 versions), so the schema updater cannot determine how to migrate the database. This protects the engine from silently upgrading an unknown or foreign schema.","triggerScenarios":"Engine startup with a database whose flowable version property contains an unrecognized string (e.g. '7.1.0.x-SNAPSHOT' from a dev build, a version from a newer Flowable release than the engine on the classpath, or a corrupted/empty property).","commonSituations":"Downgrading the Flowable jar against a database already upgraded by a newer engine; mixing modules of different Flowable versions; databases created by Activiti forks with odd version strings; manual edits or corruption of the schema version property.","solutions":["Check the recorded version (ACT_GE_PROPERTY, property 'schema.version' or 'cfg.database-version') and compare with the Flowable version on the classpath; align the engine version with the DB (usually upgrade the library).","Never downgrade Flowable below the version that last wrote the schema; either restore the newer jar or restore a DB backup from before the upgrade.","Ensure all Flowable modules (engine, cmmn, idm, dmn, event-registry) are on the same version via a single flowable-root BOM dependency.","As a last resort for dev/test only, correct the version property manually after backing up the database."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"String dbVersion = managementService.getProperty(\"schema.version\");\nif (dbVersion != null && !SUPPORTED_VERSIONS.contains(dbVersion)) {\n  throw new IllegalStateException(\"DB schema version \" + dbVersion + \" not supported by engine \" + FlowableVersions.CURRENT_VERSION);\n}","typeGuard":null,"tryCatchPattern":"try {\n  processEngine = ProcessEngineConfiguration.createProcessEngineConfigurationFromResource(\"flowable.cfg.xml\").buildProcessEngine();\n} catch (FlowableException e) {\n  if (e.getMessage().contains(\"unknown version from database\")) {\n    // halt deployment: alert ops, do not auto-fix schema\n  }\n  throw e;\n}","preventionTips":["Pin all Flowable modules to one version with the flowable-root BOM.","Never point a new engine version at a DB written by a newer one; check schema.version before startup.","Snapshot/backup the database before every engine upgrade.","Test schema upgrades against a staging copy first."],"tags":["database","schema","upgrade","version-mismatch"],"backgroundTag":"incompatible-source-type","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}