issueNumber: MDL-86798
notes:
  core_question:
    - message: >
        In order to prevent re-use of question version numbers after a version
        is deleted, the `nextversion` column was added to
        `question_bank_entries`. This serves as a counter incremented each time
        a version is created.

        Do not query this field directly. Instead use
        `core_question\versions::get_next_version()` to read the value, which
        will initialise it based on the existing versions if it is not set yet.
        By default, it will increment the version number automatically, unless
        you pass `increment: false`. Because of this, it is advisable to call
        it inside a transaction, that is only committed after the version number
        is used in a `question_versions` record.
      type: fixed
