Skip to content

The schema version can be downgraded, which could prevent the database from opening #159

@vsennedot

Description

@vsennedot

The schema version must not be downgraded

Every time a database is opened, the org.eclipse.emf.cdo.server.db.schemaVersion property is set to DBStore.SCHEMA_VERSION, even if the current schema version is higher. This can cause the schema migration to run on a database that has already been migrated, resulting in errors and preventing the database from opening.

Steps to reproduce the issue:

  1. Open a database with CDO 4.33.0; the schema version is set to 5, and the database is migrated if necessary.
  2. Open the database with CDO 4.32.0; the schema version is set to 4.
  3. Open the database again with CDO 4.33.0; the schema attempts to migrate and throws an exception because the nrefs column already exists in the cdo_lobs table.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions