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:
- Open a database with CDO 4.33.0; the schema version is set to 5, and the database is migrated if necessary.
- Open the database with CDO 4.32.0; the schema version is set to 4.
- 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.
The schema version must not be downgraded
Every time a database is opened, the
org.eclipse.emf.cdo.server.db.schemaVersionproperty is set toDBStore.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:
nrefscolumn already exists in thecdo_lobstable.