Database error if version is greater than 1.0.0 #72
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Hello,
I am experiencing an issue with the database. I want to upgrade to the latest version, and the actual process is fine, but when I go to any version above 1.0.0 on docker, on unraid The Sets page throws a database error: "An error has occured: no such column: set_number."
I followed the migration procedure from pre 1.0.0 to 1.0.0 and when on 1.0.0 everything seems to work
I just realized that the Parts, Problems, and Minifigures pages also throw database errors for versions greater than 1.0.0 -
Parts: no such column: inventory.name
Problems: no such column: inventory.name
Minifigures: no such column: minifigures.fig_num
I just installed as new within Unraid and I'm getting the same errors and issues.
Folders, app.db, and .env files were present before starting the container for the first time. All folders and files within the bricktracker folder were given read/write permissions across the board.
I pulled v1.2.2 and the database is on version #15.
I don't see any issues within the logs about access or permissions:
[2025-03-28 11:00:41 -0400] [7] [INFO] Starting gunicorn 23.0.0
[2025-03-28 11:00:41 -0400] [7] [INFO] Listening at: http://0.0.0.0:3333 (7)
[2025-03-28 11:00:41 -0400] [7] [INFO] Using worker: eventlet
[2025-03-28 11:00:41 -0400] [8] [INFO] Booting worker with pid: 8
[2025-03-28 11:00:49,835] INFO - Loading set owners list
[2025-03-28 11:00:49,837] ERROR - Database error: Your database need to be upgraded from version 0 to version 15
[2025-03-28 11:00:51,768] INFO - Loading instructions file list
[2025-03-28 11:00:51,768] INFO - Loading set purchase locations list
[2025-03-28 11:00:51,770] WARNING - A database exception occured while loading the admin page: no such table: bricktracker_metadata_purchase_locations
[2025-03-28 11:00:51,770] INFO - Loading retired sets list
[2025-03-28 11:00:51,770] INFO - Loading themes list
[2025-03-28 11:01:00,696] INFO - Loading SQL migrations list
[2025-03-28 11:01:10,538] INFO - Applying migration 1
[2025-03-28 11:01:10,591] INFO - Applying migration 2
[2025-03-28 11:01:10,632] INFO - Applying migration 3
[2025-03-28 11:01:10,644] INFO - Applying migration 4
[2025-03-28 11:01:10,656] INFO - Applying migration 5
[2025-03-28 11:01:10,668] INFO - Applying migration 6
[2025-03-28 11:01:10,681] INFO - Applying migration 7
[2025-03-28 11:01:10,696] INFO - Applying migration 8
[2025-03-28 11:01:10,708] INFO - Applying migration 9
[2025-03-28 11:01:10,722] INFO - Applying migration 10
[2025-03-28 11:01:10,737] INFO - Applying migration 11
[2025-03-28 11:01:10,750] INFO - Applying migration 12
[2025-03-28 11:01:10,763] INFO - Applying migration 13
[2025-03-28 11:01:10,775] INFO - Applying migration 14
[2025-03-28 11:01:10,787] INFO - Applying migration 15
[2025-03-28 11:01:10,799] INFO - Loading instructions file list
[2025-03-28 11:01:10,800] INFO - Loading set owners list
[2025-03-28 11:01:10,802] INFO - Loading set purchase locations list
[2025-03-28 11:01:10,803] INFO - Loading set statuses list
[2025-03-28 11:01:10,804] INFO - Loading set storages list
[2025-03-28 11:01:10,806] INFO - Loading set tags list
[2025-03-28 11:01:10,807] INFO - Loading retired sets list
[2025-03-28 11:01:10,807] INFO - Loading themes list
[2025-03-28 11:01:10,807] INFO - Loading wish owners list
[2025-03-28 11:01:23,427] INFO - The database has been downloaded
[2025-03-28 11:02:48,539] INFO - Theme list updated
[2025-03-28 11:02:48,539] INFO - Loading themes list
[2025-03-28 11:02:53,634] INFO - Loading retired sets list
[2025-03-28 11:03:10,408] ERROR - Database error: no such column: minifigures.fig_num
[2025-03-28 11:03:11,516] ERROR - Database error: no such column: inventory.name
[2025-03-28 11:03:12,665] ERROR - Database error: no such column: inventory.name
[2025-03-28 11:03:14,474] ERROR - Database error: no such column: inventory.name
@bitkraken - do you have any input here? Still getting this issue. Not sure if its exclusive to unraid?
@joshmans well v1.2.2 us running fine for me ... BUT ... I'm not using unraid ... I'm running it inside a docker container running on ubuntu server.
(maybe you tagged me by mistake, as I was not a participant on this issue before)
have you checked, if the columns are really not there inside the app.db?
@joshmans Sorry, I have no idea how Unraid works. I have tested the image and it's upgrade/migration on several new VMs using plain Docker and it works without issues. I assume this is an Unraid issue.
@bitkraken yes. It was a mistake. Apologies!
@FrederikBaerentsen can you advise which columns should be present in each of the tables? I'm not well versed in SQL to be able to look at the code. But I do have a SQLLite browser I can use to look at and add the tables as needed. I'm wondering if some columns didn't get renamed in the jump from db version 0 to 6?
@joshmans
This is a schema dump from my database.
@FrederikBaerentsen your schema doesn't appear to have any "set_number" column, so I'm struggling to understand how the application would even be looking for it
rebrickable_sets uses number and version as set_number.
I would suggest you try and deploy using Docker Compose as it’s the only supported method.
so your concatenate those two columns into a virtual column or something? I'll see if I can get compose working. unraid and compose is always a pain lol
@usafa43tsolo @FrederikBaerentsen I figured it out.
The unraid CommunityApplications template for BrickTracker sets the default sorting environment variables (in the 'show more settings') area. I simply removed the variables so they would be set to their defaults and all is working as expected now.
@joshmans I had a feeling it was Unraid-specific for one reason or another. Thanks for sorting that out!
@FrederikBaerentsen We really appreciate all your work to maintain BrickTracker! I love it!