[1.4] Database error, no such column: bricktracker_parts.spare. when viewling sets or parts #140

Closed
opened 2026-02-16 02:54:55 +01:00 by fatherfork · 2 comments
Contributor

When I click on a set to view it I receive the following error. The same error occurs when clicking the Parts tab, and shows up in the Problems tab.

ERROR:bricktracker.views.error:Database error: no such column: bricktracker_parts.spare

No other errors occur when browsing around or adding sets and parts to the db. I just can't view the sets or parts.

I tried checking database integrity and optimizing, which both returned successful.

The data is freshly copied from a working 1.3.1. The only change made was upgrading the database to 27.

When I click on a set to view it I receive the following error. The same error occurs when clicking the Parts tab, and shows up in the Problems tab. `ERROR:bricktracker.views.error:Database error: no such column: bricktracker_parts.spare` No other errors occur when browsing around or adding sets and parts to the db. I just can't view the sets or parts. I tried checking database integrity and optimizing, which both returned successful. The data is freshly copied from a working 1.3.1. The only change made was upgrading the database to 27.
Owner

This is actually something i already fixed, but forgot to put in the changelog. This error occurs when you have a custom BK_PARTS_DEFAULT_ORDER setting in your environment file that references bricktracker_parts.spare (the old column name). In version 1.4, the parts query structure was updated and the column is now referenced as "combined"."spare" instead of "bricktracker_parts"."spare". To fix this:

  1. Open your .env file or go to /admin/ under Live Settings (or data/.env depending on your setup)
  2. Find the BK_PARTS_DEFAULT_ORDER setting
  3. Replace any references to bricktracker_parts.X with combined.X

For example, if you have:

BK_PARTS_DEFAULT_ORDER="bricktracker_parts"."spare" ASC

Change it to:

BK_PARTS_DEFAULT_ORDER="combined"."spare" ASC

Or you can simply comment out or remove the custom BK_PARTS_DEFAULT_ORDER line to use the new defaults. The available column names are documented in the .env.sample file in the release/1.4 branch.

This is actually something i already fixed, but forgot to put in the changelog. This error occurs when you have a custom `BK_PARTS_DEFAULT_ORDER` setting in your environment file that references `bricktracker_parts.spare` (the old column name). In version 1.4, the parts query structure was updated and the column is now referenced as `"combined"."spare"` instead of `"bricktracker_parts"."spare"`. To fix this: 1. Open your `.env` file or go to `/admin/` under Live Settings (or `data/.env` depending on your setup) 2. Find the `BK_PARTS_DEFAULT_ORDER` setting 3. Replace any references to `bricktracker_parts.X` with `combined.X` For example, if you have: `BK_PARTS_DEFAULT_ORDER="bricktracker_parts"."spare" ASC` Change it to: `BK_PARTS_DEFAULT_ORDER="combined"."spare" ASC` Or you can simply comment out or remove the custom `BK_PARTS_DEFAULT_ORDER` line to use the new defaults. The available column names are documented in the `.env.sample` file in the `release/1.4` branch.
Owner

Documented in the changelog.

Documented in the [changelog](https://gitea.baerentsen.space/FrederikBaerentsen/BrickTracker/src/branch/release/1.4/CHANGELOG.md#breaking-changes).
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: FrederikBaerentsen/BrickTracker#140