company logo

Database :: resetSchemaVersion - Reset schema version

The function allows resetting the schema version in a database to the schema version before the version number passed in iVersion . Since databases are automatically upgraded to the schema version defined in the dictionary used for opening the database (online evolution), opening a database with a newer dictionary will prohibit the database from running with the old dictionary anymore. Opening a database by mistake with a newer dictionary may be undone by calling this function.

Since instances may have changed after introducing new schema versions, data might get lost during this action. In order to suppress resetting and just displaying instances to be reset, false may be passed in bReset . In order to reset database entries, the database has to opened exclusively. When no instances with the schema version(s) to be reset are stored in the database, the schema version in the database header will be reset.

Notes:

In order to completely reset a schema version, schema downgrade is required, which is not yet supported. The function only resets the schema version number for instances without converting it to earlier data type definition.

Implementation details

Database  :: resetSchemaVersion ( int32 iVersion, bool bReset )
  • iVersion - Major version number

    Major versions are defined on database level. database versions are numbered consecutively beginning with 0, when consistent versioning has been enabled.

  • bReset - Reset option