-
Additional Information About Database Type
I noticed that this issue might be related to the database type difference. While the official OneDev project uses native PostgreSQL, my installation uses pgvector (PostgreSQL with vector extension).
Specific Concerns:
- Could the database version mismatch be related to pgvector compatibility?
- Is it possible that the automatic database structure synchronization code:
- Works with native PostgreSQL
- Fails with pgvector due to extension-specific differences
Questions:
- Are there any known issues when using OneDev with pgvector instead of native PostgreSQL?
- Should we handle the database migration differently when using pgvector?
- Is there a recommended approach for version upgrades when using PostgreSQL with extensions?
This might be important for other users who are using PostgreSQL with extensions rather than the standard PostgreSQL installation.
-
Data version 196 is corresponding to app version 11.8.4. Please use this version instead. If it starts fine, then change to use 11.8.6 for auto-migration.
-
Thank you for your suggestion. However, I'm encountering a different issue when following your advice:
When trying to use version 11.8.4 (corresponding to data version 196), I get this error: ERROR - OneDev program is too old, please use a newer version
So it seems I'm in a catch-22 situation:
- 11.8.6 says the database version (196) is too old
- 11.8.4 says the program is too old

This suggests there might be some intermediate state or version that I need to use. Could you please advise:
- Is there a specific version between 11.8.4 and 11.8.6 that I should try?
- Or is there another approach to resolve this version conflict?
Additional context: As mentioned in my previous comment, I'm using pgvector (PostgreSQL with vector extension) rather than native PostgreSQL, which might be relevant to this situation.
-
I found some interesting details that might help understand the situation:
- Local File System Status:
- All plugin JAR files in the lib directory are version 11.8.6 (authenticator-ldap, buildspec-bazel, buildspec-cmake, etc.)
- Database Status:
- The o_modelversion table's o_versioncolumn value is 196
- While all application files are at 11.8.6
This seems to suggest:
- The file system has been updated to 11.8.6
- But the database schema is still at version 196
- The automatic migration didn't occur or failed
Questions:
- Is it possible to manually upgrade the database schema from 196 to 197?
- If manual migration isn't possible, do I need to:
- Start a fresh installation
- Manually migrate projects and database information to the new instance?
Looking for confirmation if my understanding is correct and what would be the safest path forward.
-
Assume OneDev volume is mounted from
/data/onedevinto/opt/onedev. Delete all files and directories under/data/onedevEXCEPT for below directories:- /data/onedev/conf
- /data/onedev/site
Then start the container using
11.8.4. After OneDev starts successfully, switch to11.8.6. -
Thank you for the migration solution!
I actually solved it differently, but I appreciate your suggested approach which seems like a more standard solution that could help others:
- Keep only /conf and /site directories
- Start with 11.8.4
- Then upgrade to 11.8.6
For reference, my solution was:
- Generated an empty v197 database schema
- Migrated compatible data from v196 to v197
- It worked, but your solution seems more robust and official
Thanks again for the help. This thread might be useful for others facing similar version mismatch issues, especially the official solution you provided which preserves critical data in /conf and /site directories.
-
Thanks for the summary. This issue normally happens when OneDev is configured to connect to a database used by some other OneDev version. As long as not changing database, this issue should never happen across upgrades. If you do want to migrate data from existing data, make sure to use database backup and restore.
-
Previous Value Current Value Open
Closed
| Type |
Question
|
| Priority |
Normal
|
| Assignee | |
| Labels |
No labels
|
Need Database Migration Path from v196 to v197
Description
Attempting to upgrade OneDev installation, but encountering version mismatch issues. Need guidance on the correct database migration path.
Current Situation
Error Messages
When using OneDev 11.8.6: Data version mismatch (app data version: 197, db data version: 196)
When downgrading to OneDev 11.8.5: ERROR - Unable to upgrade specified installation as data version of application and database is not the same INFO - *** After solving the problem, please restart container with correct image ***
Environment
Question
Additional Context
What I've Tried
Any guidance on the correct upgrade path would be greatly appreciated.