Getting error adding any sets #119

Closed
opened 2025-12-20 15:38:09 +01:00 by Thinning9833 · 13 comments

Error: Error while importing set 75383-1: FOREIGN KEY constraint failed

Tried several different sets and it gets to 50-50% and then hangs and i get this error.

Error: Error while importing set 75383-1: FOREIGN KEY constraint failed Tried several different sets and it gets to 50-50% and then hangs and i get this error.
Owner

What docker tag are you using and what database version are you on?

What docker tag are you using and what database version are you on?
FrederikBaerentsen added the Kind/Bug label 2025-12-20 16:22:14 +01:00
Author

Believe I am on the latest tag and it is the database that deploys with the container.

Here is my Compose:
bricktracker:
container_name: bricktracker
image: gitea.baerentsen.space/frederikbaerentsen/bricktracker:latest
labels:
- homepage.group=Documentation Containers
- homepage.name=Bricktracker
- homepage.icon=https://gitea.baerentsen.space/FrederikBaerentsen/BrickTracker/raw/branch/master/static/brick.png
- homepage.href=https://bricktracker.wigginsmedia.us
- homepage.description=Bricktracker - For organizing and tracking LEGO sets, parts, and minifigures
### WhatsUpDocker Settings
- wud.display.name=BrickTracker
- wud.watch=true
### Docker-Volume-Backup
- docker-volume-backup.stop-during-backup=utilities
- docker-volume-backup.exec-label=utilities
ports:
- "5019:3333"
volumes:
- ${USERDIR}/utilities/bricktracker/bricktracker-data/:/app/data/
# - ${USERDIR}/utilities/bricktracker/instructions:/app/static/instructions/
# - ${USERDIR}/utilities/bricktracker/minifigures:/app/static/minifigures/
# - ${USERDIR}/utilities/bricktracker/parts:/app/static/parts/
# - ${USERDIR}/utilities/bricktracker/sets:/app/static/sets/
# Or define those in your .env file
#environment:
#BK_DATABASE_PATH: app/app.db
#BK_MINIFIGURES_FOLDER: app/minifigs
#BK_RETIRED_SETS_PATH: app/retired_sets.csv
#BK_THEMES_PATH: app/themes.csv
#BK_INSTRUCTIONS_FOLDER: app/instructions
#BK_PARTS_FOLDER: app/parts
#BK_SETS_FOLDER: app/sets
# BK_REBRICKABLE_API_KEY: "xxxxxxxxxxxxxxxxx"
# BK_DOMAIN_NAME: "127.0.0.1:5019"
#BK_PURCHASE_CURRENCY: "$"
#BK_PURCHASE_DATE_FORMAT: "%m/%d/%Y"
#BK_FILE_DATETIME_FORMAT: "%m/%d/%Y, %H:%M:%S"
#BK_REBRICKABLE_LINKS: true
#BK_BRICKLINK_LINKS: true
#BK_AUTHENTICATION_KEY: 'xxxxxxxxxxxxxxxxx'
#BK_AUTHENTICATION_PASSWORD: ${NTFY_PASS}
#env_file: ".env"
restart: unless-stopped

And the new .env file looks like:

# ================================================================================================
# BrickTracker Configuration File
# ================================================================================================
#
# FILE LOCATION (v1.3+):
# ----------------------
# This file can be placed in two locations:
#   1. data/.env (RECOMMENDED) - Included in data volume backup, settings persist via admin panel
#   2. .env (root) - Backward compatible
#
# Priority: data/.env > .env (root)
#
# The application automatically detects and uses the correct location at runtime.
#
# For Docker:
#   - Recommended: Place this file as data/.env (included in data volume)
#   - Backward compatible: Keep as .env in root (add "env_file: .env" to compose.yaml)
#
# ================================================================================================
#
# Note on *_DEFAULT_ORDER
# If set, it will append a direct ORDER BY <whatever you set> to the SQL query
# while listing objects. You can look at the structure of the SQLite database to
# see the schema and the column names. Some fields are compound and not visible
# directly from the schema (joins). You can check the query in the */list.sql and */base/*.sql files
# in the source to see all column names.
# The usual syntax for those variables is "<table>"."<column>" [ASC|DESC].
# For composite fields (CASE, SUM, COUNT) the syntax is <field>, there is no <table> name.
# For instance:
# - "table"."name" (by "table"."name", default order)
# - "table"."name" ASC (by "table"."name", ascending)
# - "table"."name" DESC (by "table"."name", descending)
# - "field" (by "field", default order)
# - ...
# You can combine the ordering options.
# You can use the special column name 'rowid' to order by insertion order.

# Optional: A unique password to protect sensitive areas of the app
# Useful if you want to share the page with other in read-only
# Security: Currently not fully protecting the socket action, would be better
# to have server-side sessions, with flask-session for instance
# BK_AUTHENTICATION_PASSWORD=my-secret-password

# Optional/Mandatory: A unique key used to sign the secrets when using authentication
# Do not share it with anyone, and you MUST make it random.
# You can use the following command in your terminal to generate such random secret:
#       python3 -c 'import secrets; print(secrets.token_hex())'
REBRICKABLE_API_KEY="xxxxxxxxx"

# Optional: Pattern of the link to Bricklink for a part. Will be passed to Python .format()
# Supports {part} and {color} parameters. BrickLink part numbers and color IDs are used when available.
# Default: https://www.bricklink.com/v2/catalog/catalogitem.page?P={part}&C={color}
# BK_BRICKLINK_LINK_PART_PATTERN=

# Optional: Pattern of the link to Bricklink for a set. Will be passed to Python .format()
# Supports {set_num} parameter. Set numbers in format like '10255-1' are used.
# Default: https://www.bricklink.com/v2/catalog/catalogitem.page?S={set_num}
# BK_BRICKLINK_LINK_SET_PATTERN=

# Optional: Display Bricklink links wherever applicable
# Default: false
BK_BRICKLINK_LINKS=true

# Optional: Display Rebirkcable links whenever applicable
# Default: true
BK_REBRICKABLE_LINKS: true

# Optional: Path to the database, relative to '/app/' folder
# Useful if you need it mounted in a Docker volume. Keep in mind that it will not
# do any check on the existence of the path, or if it is dangerous.
# Default: data/app.db
# BK_DATABASE_PATH=data/app.db

# Optional: Format of the timestamp added to the database file when downloading it
# Check https://docs.python.org/3/library/time.html#time.strftime for format details
# Default: %Y-%m-%d-%H-%M-%S
# BK_DATABASE_TIMESTAMP_FORMAT=%Y%m%d-%H%M%S

# Optional Dark Mode Enabled
# Default: false
BK_DARK_MODE: true

# Optional: Enable debugging.
# Default: false
# BK_DEBUG=true

# Optional: Default number of items per page displayed for big tables
# You can put whatever value but the exist steps are: 10, 25, 50, 100, 500, 1000
# Default: 25
# BK_DEFAULT_TABLE_PER_PAGE=50

# Optional: if set up, will add a CORS allow origin restriction to the socket.
# Default:
# Legacy name: DOMAIN_NAME
# BK_DOMAIN_NAME=http://localhost:3333

# Optional: Format of the timestamp for files on disk (instructions, themes)
# Check https://docs.python.org/3/library/time.html#time.strftime for format details
# Default: %d/%m/%Y, %H:%M:%S
BK_FILE_DATETIME_FORMAT=%m/%d/%Y, %H:%M:%S

# Optional: Format of the timestamp for Purchases
BK_PURCHASE_DATE_FORMAT: "%m/%d/%Y"

# Optional: Format of the Currency for Purchases
BK_PURCHASE_CURRENCY: "$"

# Optional: IP address the server will listen on.
# Default: 0.0.0.0
# BK_HOST=0.0.0.0

# Optional: By default, accordion items are linked together and only one can be in
# a collapsed state. This makes all the items indepedent.
# Default: false
# BK_INDEPENDENT_ACCORDIONS=true

# Optional: A comma separated list of extensions allowed for uploading and displaying
# instruction files. You need to keep the dot (.) in the extension.
# Security: not really
# Default: .pdf
# BK_INSTRUCTIONS_ALLOWED_EXTENSIONS=.pdf, .docx, .png

# Optional: Folder where to store the instructions, relative to '/app/' folder
# Default: data/instructions
# BK_INSTRUCTIONS_FOLDER=data/instructions

# Optional: Hide the 'Add' entry from the menu. Does not disable the route.
# Default: false
# BK_HIDE_ADD_SET=true

# Optional: Hide the 'Bulk add' entry from the add page. Does not disable the route.
# Default: false
# BK_HIDE_ADD_BULK_SET=true

# Optional: Hide the 'Admin' entry from the menu. Does not disable the route.
# Default: false
# BK_HIDE_ADMIN=true

# Optional: Admin sections to expand by default (comma-separated list)
# Valid sections: authentication, instructions, image, theme, retired, metadata, owner, purchase_location, status, storage, tag, database
# Default: database (maintains original behavior with database section expanded)
# Examples:
# BK_ADMIN_DEFAULT_EXPANDED_SECTIONS=database,theme
# BK_ADMIN_DEFAULT_EXPANDED_SECTIONS=instructions,metadata
# BK_ADMIN_DEFAULT_EXPANDED_SECTIONS=   (all sections collapsed)

# Optional: Hide the 'Instructions' entry from the menu. Does not disable the route.
# Default: false
# BK_HIDE_ALL_INSTRUCTIONS=true

# Optional: Hide the 'Minifigures' entry from the menu. Does not disable the route.
# Default: false
# BK_HIDE_ALL_MINIFIGURES=true

# Optional: Hide the 'Parts' entry from the menu. Does not disable the route.
# Default: false
# BK_HIDE_ALL_PARTS=true

# Optional: Hide the 'Problems' entry from the menu. Does not disable the route.
# Default: false
# Legacy name: BK_HIDE_MISSING_PARTS
# BK_HIDE_ALL_PROBLEMS_PARTS=true

# Optional: Hide the 'Sets' entry from the menu. Does not disable the route.
# Default: false
# BK_HIDE_ALL_SETS=true

# Optional: Hide the 'Storages' entry from the menu. Does not disable the route.
# Default: false
# BK_HIDE_ALL_STORAGES=true

# Optional: Hide the 'Statistics' entry from the menu. Does not disable the route.
# Default: false
# BK_HIDE_STATISTICS=true

# Optional: Hide the 'Instructions' entry in a Set card
# Default: false
# BK_HIDE_SET_INSTRUCTIONS=true

# Optional: Hide the 'Damaged' column from the parts table.
# Default: false
# BK_HIDE_TABLE_DAMAGED_PARTS=true

# Optional: Hide the 'Missing' column from the parts table.
# Default: false
# BK_HIDE_TABLE_MISSING_PARTS=true

# Optional: Hide the 'Checked' column from the parts table.
# Default: false
# BK_HIDE_TABLE_CHECKED_PARTS=true

# Optional: Hide the 'Wishlist' entry from the menu. Does not disable the route.
# Default: false
# BK_HIDE_WISHES=true

# Optional: Change the default order of minifigures. By default ordered by insertion order.
# Useful column names for this option are:
# - "rebrickable_minifigures"."figure": minifigure ID (e.g., "fig-001234")
# - "rebrickable_minifigures"."number": minifigure ID as an integer (e.g., 1234)
# - "rebrickable_minifigures"."name": minifigure name
# - "rebrickable_minifigures"."number_of_parts": number of parts in the minifigure
# - "bricktracker_minifigures"."quantity": quantity owned
# - "total_missing": number of missing parts (composite field)
# - "total_damaged": number of damaged parts (composite field)
# - "total_quantity": total quantity across all sets (composite field)
# - "total_sets": number of sets containing this minifigure (composite field)
# Default: "rebrickable_minifigures"."name" ASC
# Examples:
# BK_MINIFIGURES_DEFAULT_ORDER="rebrickable_minifigures"."number" DESC
# BK_MINIFIGURES_DEFAULT_ORDER="total_missing" DESC, "rebrickable_minifigures"."name" ASC

# Optional: Folder where to store the minifigures images, relative to '/app/' folder
# Default: data/minifigures
# BK_MINIFIGURES_FOLDER=data/minifigures

# Optional: Disable threading on the task executed by the socket.
# You should not need to change this parameter unless you are debugging something with the
# socket itself.
# Default: false
# BK_NO_THREADED_SOCKET=true

# Optional: Change the default order of parts. By default ordered by insertion order.
# Useful column names for this option are:
# - "bricktracker_parts"."part": part number (e.g., "3001")
# - "bricktracker_parts"."spare": part is a spare part (0 or 1)
# - "bricktracker_parts"."quantity": quantity of this part
# - "bricktracker_parts"."missing": number of missing parts
# - "bricktracker_parts"."damaged": number of damaged parts
# - "rebrickable_parts"."name": part name
# - "rebrickable_parts"."color_name": part color name
# - "total_missing": total missing across all sets (composite field)
# - "total_damaged": total damaged across all sets (composite field)
# - "total_quantity": total quantity across all sets (composite field)
# - "total_sets": number of sets containing this part (composite field)
# - "total_minifigures": number of minifigures with this part (composite field)
# Default: "rebrickable_parts"."name" ASC, "rebrickable_parts"."color_name" ASC, "bricktracker_parts"."spare" ASC
# Examples:
# BK_PARTS_DEFAULT_ORDER="total_missing" DESC, "rebrickable_parts"."name" ASC
# BK_PARTS_DEFAULT_ORDER="rebrickable_parts"."color_name" ASC, "rebrickable_parts"."name" ASC

# Optional: Folder where to store the parts images, relative to '/app/' folder
# Default: data/parts
# BK_PARTS_FOLDER=data/parts

# Optional: Enable server-side pagination for individual pages (recommended for large collections)
# When enabled, pages use server-side pagination with configurable page sizes
# When disabled, pages load all data at once with instant client-side search
# Default: false for all
# BK_SETS_SERVER_SIDE_PAGINATION=true
# BK_PARTS_SERVER_SIDE_PAGINATION=true
# BK_MINIFIGURES_SERVER_SIDE_PAGINATION=true
# BK_PROBLEMS_SERVER_SIDE_PAGINATION=true

# Optional: Number of parts to show per page on desktop devices (when server-side pagination is enabled)
# Default: 10
# BK_PARTS_PAGINATION_SIZE_DESKTOP=10

# Optional: Number of parts to show per page on mobile devices (when server-side pagination is enabled)
# Default: 5
# BK_PARTS_PAGINATION_SIZE_MOBILE=5

# Optional: Number of sets to show per page on desktop devices (when server-side pagination is enabled)
# Should be divisible by 4 for grid layout. Default: 12
# BK_SETS_PAGINATION_SIZE_DESKTOP=12

# Optional: Number of sets to show per page on mobile devices (when server-side pagination is enabled)
# Default: 4
# BK_SETS_PAGINATION_SIZE_MOBILE=4

# Optional: Number of minifigures to show per page on desktop devices (when server-side pagination is enabled)
# Default: 10
# BK_MINIFIGURES_PAGINATION_SIZE_DESKTOP=10

# Optional: Number of minifigures to show per page on mobile devices (when server-side pagination is enabled)
# Default: 5
# BK_MINIFIGURES_PAGINATION_SIZE_MOBILE=5

# Optional: Number of problems to show per page on desktop devices (when server-side pagination is enabled)
# Default: 10
# BK_PROBLEMS_PAGINATION_SIZE_DESKTOP=10

# Optional: Number of problems to show per page on mobile devices (when server-side pagination is enabled)
# Default: 5
# BK_PROBLEMS_PAGINATION_SIZE_MOBILE=5

# Optional: Port the server will listen on.
# Default: 3333
# BK_PORT=3333

# Optional: Format of the timestamp for purchase dates
# Check https://docs.python.org/3/library/time.html#time.strftime for format details
# Default: %d/%m/%Y
# BK_PURCHASE_DATE_FORMAT=%m/%d/%Y

# Optional: Currency to display for purchase prices.
# Default: €
# BK_PURCHASE_CURRENCY=£

# Optional: Change the default order of purchase locations. By default ordered by insertion order.
# Useful column names for this option are:
# - "bricktracker_metadata_purchase_locations"."name": purchase location name
# - "bricktracker_metadata_purchase_locations"."rowid": insertion order (special column)
# Default: "bricktracker_metadata_purchase_locations"."name" ASC
# Examples:
# BK_PURCHASE_LOCATION_DEFAULT_ORDER="bricktracker_metadata_purchase_locations"."name" DESC
# BK_PURCHASE_LOCATION_DEFAULT_ORDER="bricktracker_metadata_purchase_locations"."rowid" DESC

# Optional: Shuffle the lists on the front page.
# Default: false
# Legacy name: RANDOM
# BK_RANDOM=true

# Optional/Mandatory: The API key used to retrieve sets from the Rebrickable API.
# It is not necessary to set it to display the site, but it will limit its capabilities
# as you will not be able to add new sets
# Default:
# Legacy name: REBRICKABLE_API_KEY
# BK_REBRICKABLE_API_KEY=xxxx

# Optional: URL of the image representing a missing image in Rebrickable
# Default: https://rebrickable.com/static/img/nil.png
# BK_REBRICKABLE_IMAGE_NIL=https://rebrickable.com/static/img/nil.png

# Optional: URL of the image representing a missing minifigure image in Rebrickable
# Default: https://rebrickable.com/static/img/nil_mf.jpg
# BK_REBRICKABLE_IMAGE_NIL_MINIFIGURE=https://rebrickable.com/static/img/nil_mf.jpg

# Optional: Pattern of the link to Rebrickable for a minifigure. Will be passed to Python .format()
# Default: https://rebrickable.com/minifigs/{figure}
# BK_REBRICKABLE_LINK_MINIFIGURE_PATTERN=https://rebrickable.com/minifigs/{figure}

# Optional: Pattern of the link to Rebrickable for a part. Will be passed to Python .format()
# Default: https://rebrickable.com/parts/{part}/_/{color}
# BK_REBRICKABLE_LINK_PART_PATTERN=https://rebrickable.com/parts/{part}/_/{color}

# Optional: Pattern of the link to Rebrickable for instructions. Will be passed to Python .format()
# Default: https://rebrickable.com/instructions/{path}
# BK_REBRICKABLE_LINK_INSTRUCTIONS_PATTERN=https://rebrickable.com/instructions/{path}

# Optional: User-Agent to use when querying Rebrickable and Peeron outside of the Rebrick python library
# Default: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36
# BK_USER_AGENT=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36

# Legacy: User-Agent for Rebrickable (use BK_USER_AGENT instead)
# BK_REBRICKABLE_USER_AGENT=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36

# Optional: Delay in milliseconds between Peeron page downloads to avoid being potentially blocked
# Default: 1000
# BK_PEERON_DOWNLOAD_DELAY=1000

# Optional: Minimum image size (width/height) for valid Peeron instruction pages
# Images smaller than this are considered error placeholders and will be rejected
# Default: 100
# BK_PEERON_MIN_IMAGE_SIZE=100

# Optional: Pattern for Peeron instruction page URLs. Will be passed to Python .format()
# Supports {set_number} and {version_number} parameters
# Default: http://peeron.com/scans/{set_number}-{version_number}
# BK_PEERON_INSTRUCTION_PATTERN=

# Optional: Pattern for Peeron thumbnail URLs. Will be passed to Python .format()
# Supports {set_number} and {version_number} parameters
# Default: http://belay.peeron.com/thumbs/{set_number}-{version_number}/
# BK_PEERON_THUMBNAIL_PATTERN=

# Optional: Pattern for Peeron scan URLs. Will be passed to Python .format()
# Supports {set_number} and {version_number} parameters
# Default: http://belay.peeron.com/scans/{set_number}-{version_number}/
# BK_PEERON_SCAN_PATTERN=

# Optional: Display Rebrickable links wherever applicable
# Default: false
# Legacy name: LINKS
# BK_REBRICKABLE_LINKS=true

# Optional: The amount of items to retrieve per Rebrickable API call when.
# Default: 100
# BK_REBRICKABLE_PAGE_SIZE=200

# Optional: URL to the unofficial retired sets list on Google Sheets
# Default: https://docs.google.com/spreadsheets/d/1rlYfEXtNKxUOZt2Mfv0H17DvK7bj6Pe0CuYwq6ay8WA/gviz/tq?tqx=out:csv&sheet=Sorted%20by%20Retirement%20Date
# BK_RETIRED_SETS_FILE_URL=

# Optional: Path to the unofficial retired sets lists, relative to '/app/' folder
# You can name it whatever you want, but content has to be a CSV
# Default: data/retired_sets.csv
# BK_RETIRED_SETS_PATH=data/retired_sets.csv

# Optional: Change the default order of sets. By default ordered by insertion order.
# Useful column names for this option are:
# - "rebrickable_sets"."set": set number as a string (e.g., "10255-1")
# - "rebrickable_sets"."number": the number part of set as text (e.g., "10255")
# - "rebrickable_sets"."version": the version part of set as an integer (e.g., 1)
# - "rebrickable_sets"."name": set name
# - "rebrickable_sets"."year": set release year
# - "rebrickable_sets"."number_of_parts": set number of parts
# - "bricktracker_sets"."purchase_date": purchase date (as REAL/Julian day)
# - "bricktracker_sets"."purchase_price": purchase price
# - "total_missing": number of missing parts (composite field)
# - "total_damaged": number of damaged parts (composite field)
# - "total_minifigures": number of minifigures (composite field)
# Default: "rebrickable_sets"."number" DESC, "rebrickable_sets"."version" ASC
# Examples:
# BK_SETS_DEFAULT_ORDER="rebrickable_sets"."year" DESC, "rebrickable_sets"."name" ASC
# BK_SETS_DEFAULT_ORDER="rebrickable_sets"."number_of_parts" DESC
# BK_SETS_DEFAULT_ORDER="total_missing" DESC, "rebrickable_sets"."year" ASC

# Optional: Folder where to store the sets images, relative to '/app/' folder
# Default: data/sets
# BK_SETS_FOLDER=data/sets

# Optional: Enable set consolidation/grouping on the main sets page
# When enabled, multiple copies of the same set are grouped together showing instance count
# When disabled, each set copy is displayed individually (original behavior)
# Default: false
# BK_SETS_CONSOLIDATION=true

# Optional: Make the grid filters displayed by default, rather than collapsed
# Default: false
# BK_SHOW_GRID_FILTERS=true

# Optional: Make the grid sort displayed by default, rather than collapsed
# Default: false
# BK_SHOW_GRID_SORT=true

# Optional: Show duplicate filter button on sets page
# Default: true
# BK_SHOW_SETS_DUPLICATE_FILTER=true

# Optional: Skip importing spare parts when downloading sets from Rebrickable
# Default: false
# BK_SKIP_SPARE_PARTS=true

# Optional: Hide spare parts from parts lists (spare parts must still be in database)
# Default: false
# BK_HIDE_SPARE_PARTS=true

# Optional: Namespace of the Socket.IO socket
# Default: bricksocket
# BK_SOCKET_NAMESPACE=customsocket

# Optional: Namespace of the Socket.IO path
# Default: /bricksocket/
# BK_SOCKET_PATH=custompath

# Optional: Change the default order of storages. By default ordered by insertion order.
# Useful column names for this option are:
# - "bricktracker_metadata_storages"."name": storage name
# - "bricktracker_metadata_storages"."rowid": insertion order (special column)
# Default: "bricktracker_metadata_storages"."name" ASC
# Examples:
# BK_STORAGE_DEFAULT_ORDER="bricktracker_metadata_storages"."name" DESC
# BK_STORAGE_DEFAULT_ORDER="bricktracker_metadata_storages"."rowid" DESC

# Optional: URL to the themes.csv.gz on Rebrickable
# Default: https://cdn.rebrickable.com/media/downloads/themes.csv.gz
# BK_THEMES_FILE_URL=

# Optional: Path to the themes file, relative to '/app/' folder
# You can name it whatever you want, but content has to be a CSV
# Default: data/themes.csv
# BK_THEMES_PATH=data/themes.csv

# Optional: Timezone to use to display datetimes
# Check your system for available timezone/TZ values
# Default: Etc/UTC
# BK_TIMEZONE=Europe/Copenhagen

# Optional: Use remote image rather than the locally stored ones
# Also prevents downloading any image when adding sets
# Default: false
# BK_USE_REMOTE_IMAGES=true

# Optional: Change the default order of wishlist sets. By default ordered by insertion order.
# Useful column names for this option are:
# - "bricktracker_wishes"."set": set number as a string (e.g., "10255-1")
# - "bricktracker_wishes"."name": set name
# - "bricktracker_wishes"."year": set release year
# - "bricktracker_wishes"."number_of_parts": set number of parts
# - "bricktracker_wishes"."theme_id": theme ID
# - "bricktracker_wishes"."rowid": insertion order (special column)
# Default: "bricktracker_wishes"."rowid" DESC
# Examples:
# BK_WISHES_DEFAULT_ORDER="bricktracker_wishes"."year" DESC, "bricktracker_wishes"."name" ASC
# BK_WISHES_DEFAULT_ORDER="bricktracker_wishes"."number_of_parts" DESC
# BK_WISHES_DEFAULT_ORDER="bricktracker_wishes"."set" ASC

# Optional: Show collection growth charts on the statistics page
# Default: true
# BK_STATISTICS_SHOW_CHARTS=false

# Optional: Default state of statistics page sections (expanded or collapsed)
# When true, all sections start expanded. When false, all sections start collapsed.
# Default: true
# BK_STATISTICS_DEFAULT_EXPANDED=false

# Optional: Enable dark mode by default
# When true, the application starts in dark mode. 
# Default: false
# BK_DARK_MODE=true
Believe I am on the latest tag and it is the database that deploys with the container. **Here is my Compose:** bricktracker: container_name: bricktracker image: gitea.baerentsen.space/frederikbaerentsen/bricktracker:latest labels: - homepage.group=Documentation Containers - homepage.name=Bricktracker - homepage.icon=https://gitea.baerentsen.space/FrederikBaerentsen/BrickTracker/raw/branch/master/static/brick.png - homepage.href=https://bricktracker.wigginsmedia.us - homepage.description=Bricktracker - For organizing and tracking LEGO sets, parts, and minifigures ### WhatsUpDocker Settings - wud.display.name=BrickTracker - wud.watch=true ### Docker-Volume-Backup - docker-volume-backup.stop-during-backup=utilities - docker-volume-backup.exec-label=utilities ports: - "5019:3333" volumes: - ${USERDIR}/utilities/bricktracker/bricktracker-data/:/app/data/ # - ${USERDIR}/utilities/bricktracker/instructions:/app/static/instructions/ # - ${USERDIR}/utilities/bricktracker/minifigures:/app/static/minifigures/ # - ${USERDIR}/utilities/bricktracker/parts:/app/static/parts/ # - ${USERDIR}/utilities/bricktracker/sets:/app/static/sets/ # Or define those in your .env file #environment: #BK_DATABASE_PATH: app/app.db #BK_MINIFIGURES_FOLDER: app/minifigs #BK_RETIRED_SETS_PATH: app/retired_sets.csv #BK_THEMES_PATH: app/themes.csv #BK_INSTRUCTIONS_FOLDER: app/instructions #BK_PARTS_FOLDER: app/parts #BK_SETS_FOLDER: app/sets # BK_REBRICKABLE_API_KEY: "xxxxxxxxxxxxxxxxx" # BK_DOMAIN_NAME: "127.0.0.1:5019" #BK_PURCHASE_CURRENCY: "$" #BK_PURCHASE_DATE_FORMAT: "%m/%d/%Y" #BK_FILE_DATETIME_FORMAT: "%m/%d/%Y, %H:%M:%S" #BK_REBRICKABLE_LINKS: true #BK_BRICKLINK_LINKS: true #BK_AUTHENTICATION_KEY: 'xxxxxxxxxxxxxxxxx' #BK_AUTHENTICATION_PASSWORD: ${NTFY_PASS} #env_file: ".env" restart: unless-stopped **And the new .env file looks like:** ``` # ================================================================================================ # BrickTracker Configuration File # ================================================================================================ # # FILE LOCATION (v1.3+): # ---------------------- # This file can be placed in two locations: # 1. data/.env (RECOMMENDED) - Included in data volume backup, settings persist via admin panel # 2. .env (root) - Backward compatible # # Priority: data/.env > .env (root) # # The application automatically detects and uses the correct location at runtime. # # For Docker: # - Recommended: Place this file as data/.env (included in data volume) # - Backward compatible: Keep as .env in root (add "env_file: .env" to compose.yaml) # # ================================================================================================ # # Note on *_DEFAULT_ORDER # If set, it will append a direct ORDER BY <whatever you set> to the SQL query # while listing objects. You can look at the structure of the SQLite database to # see the schema and the column names. Some fields are compound and not visible # directly from the schema (joins). You can check the query in the */list.sql and */base/*.sql files # in the source to see all column names. # The usual syntax for those variables is "<table>"."<column>" [ASC|DESC]. # For composite fields (CASE, SUM, COUNT) the syntax is <field>, there is no <table> name. # For instance: # - "table"."name" (by "table"."name", default order) # - "table"."name" ASC (by "table"."name", ascending) # - "table"."name" DESC (by "table"."name", descending) # - "field" (by "field", default order) # - ... # You can combine the ordering options. # You can use the special column name 'rowid' to order by insertion order. # Optional: A unique password to protect sensitive areas of the app # Useful if you want to share the page with other in read-only # Security: Currently not fully protecting the socket action, would be better # to have server-side sessions, with flask-session for instance # BK_AUTHENTICATION_PASSWORD=my-secret-password # Optional/Mandatory: A unique key used to sign the secrets when using authentication # Do not share it with anyone, and you MUST make it random. # You can use the following command in your terminal to generate such random secret: # python3 -c 'import secrets; print(secrets.token_hex())' REBRICKABLE_API_KEY="xxxxxxxxx" # Optional: Pattern of the link to Bricklink for a part. Will be passed to Python .format() # Supports {part} and {color} parameters. BrickLink part numbers and color IDs are used when available. # Default: https://www.bricklink.com/v2/catalog/catalogitem.page?P={part}&C={color} # BK_BRICKLINK_LINK_PART_PATTERN= # Optional: Pattern of the link to Bricklink for a set. Will be passed to Python .format() # Supports {set_num} parameter. Set numbers in format like '10255-1' are used. # Default: https://www.bricklink.com/v2/catalog/catalogitem.page?S={set_num} # BK_BRICKLINK_LINK_SET_PATTERN= # Optional: Display Bricklink links wherever applicable # Default: false BK_BRICKLINK_LINKS=true # Optional: Display Rebirkcable links whenever applicable # Default: true BK_REBRICKABLE_LINKS: true # Optional: Path to the database, relative to '/app/' folder # Useful if you need it mounted in a Docker volume. Keep in mind that it will not # do any check on the existence of the path, or if it is dangerous. # Default: data/app.db # BK_DATABASE_PATH=data/app.db # Optional: Format of the timestamp added to the database file when downloading it # Check https://docs.python.org/3/library/time.html#time.strftime for format details # Default: %Y-%m-%d-%H-%M-%S # BK_DATABASE_TIMESTAMP_FORMAT=%Y%m%d-%H%M%S # Optional Dark Mode Enabled # Default: false BK_DARK_MODE: true # Optional: Enable debugging. # Default: false # BK_DEBUG=true # Optional: Default number of items per page displayed for big tables # You can put whatever value but the exist steps are: 10, 25, 50, 100, 500, 1000 # Default: 25 # BK_DEFAULT_TABLE_PER_PAGE=50 # Optional: if set up, will add a CORS allow origin restriction to the socket. # Default: # Legacy name: DOMAIN_NAME # BK_DOMAIN_NAME=http://localhost:3333 # Optional: Format of the timestamp for files on disk (instructions, themes) # Check https://docs.python.org/3/library/time.html#time.strftime for format details # Default: %d/%m/%Y, %H:%M:%S BK_FILE_DATETIME_FORMAT=%m/%d/%Y, %H:%M:%S # Optional: Format of the timestamp for Purchases BK_PURCHASE_DATE_FORMAT: "%m/%d/%Y" # Optional: Format of the Currency for Purchases BK_PURCHASE_CURRENCY: "$" # Optional: IP address the server will listen on. # Default: 0.0.0.0 # BK_HOST=0.0.0.0 # Optional: By default, accordion items are linked together and only one can be in # a collapsed state. This makes all the items indepedent. # Default: false # BK_INDEPENDENT_ACCORDIONS=true # Optional: A comma separated list of extensions allowed for uploading and displaying # instruction files. You need to keep the dot (.) in the extension. # Security: not really # Default: .pdf # BK_INSTRUCTIONS_ALLOWED_EXTENSIONS=.pdf, .docx, .png # Optional: Folder where to store the instructions, relative to '/app/' folder # Default: data/instructions # BK_INSTRUCTIONS_FOLDER=data/instructions # Optional: Hide the 'Add' entry from the menu. Does not disable the route. # Default: false # BK_HIDE_ADD_SET=true # Optional: Hide the 'Bulk add' entry from the add page. Does not disable the route. # Default: false # BK_HIDE_ADD_BULK_SET=true # Optional: Hide the 'Admin' entry from the menu. Does not disable the route. # Default: false # BK_HIDE_ADMIN=true # Optional: Admin sections to expand by default (comma-separated list) # Valid sections: authentication, instructions, image, theme, retired, metadata, owner, purchase_location, status, storage, tag, database # Default: database (maintains original behavior with database section expanded) # Examples: # BK_ADMIN_DEFAULT_EXPANDED_SECTIONS=database,theme # BK_ADMIN_DEFAULT_EXPANDED_SECTIONS=instructions,metadata # BK_ADMIN_DEFAULT_EXPANDED_SECTIONS= (all sections collapsed) # Optional: Hide the 'Instructions' entry from the menu. Does not disable the route. # Default: false # BK_HIDE_ALL_INSTRUCTIONS=true # Optional: Hide the 'Minifigures' entry from the menu. Does not disable the route. # Default: false # BK_HIDE_ALL_MINIFIGURES=true # Optional: Hide the 'Parts' entry from the menu. Does not disable the route. # Default: false # BK_HIDE_ALL_PARTS=true # Optional: Hide the 'Problems' entry from the menu. Does not disable the route. # Default: false # Legacy name: BK_HIDE_MISSING_PARTS # BK_HIDE_ALL_PROBLEMS_PARTS=true # Optional: Hide the 'Sets' entry from the menu. Does not disable the route. # Default: false # BK_HIDE_ALL_SETS=true # Optional: Hide the 'Storages' entry from the menu. Does not disable the route. # Default: false # BK_HIDE_ALL_STORAGES=true # Optional: Hide the 'Statistics' entry from the menu. Does not disable the route. # Default: false # BK_HIDE_STATISTICS=true # Optional: Hide the 'Instructions' entry in a Set card # Default: false # BK_HIDE_SET_INSTRUCTIONS=true # Optional: Hide the 'Damaged' column from the parts table. # Default: false # BK_HIDE_TABLE_DAMAGED_PARTS=true # Optional: Hide the 'Missing' column from the parts table. # Default: false # BK_HIDE_TABLE_MISSING_PARTS=true # Optional: Hide the 'Checked' column from the parts table. # Default: false # BK_HIDE_TABLE_CHECKED_PARTS=true # Optional: Hide the 'Wishlist' entry from the menu. Does not disable the route. # Default: false # BK_HIDE_WISHES=true # Optional: Change the default order of minifigures. By default ordered by insertion order. # Useful column names for this option are: # - "rebrickable_minifigures"."figure": minifigure ID (e.g., "fig-001234") # - "rebrickable_minifigures"."number": minifigure ID as an integer (e.g., 1234) # - "rebrickable_minifigures"."name": minifigure name # - "rebrickable_minifigures"."number_of_parts": number of parts in the minifigure # - "bricktracker_minifigures"."quantity": quantity owned # - "total_missing": number of missing parts (composite field) # - "total_damaged": number of damaged parts (composite field) # - "total_quantity": total quantity across all sets (composite field) # - "total_sets": number of sets containing this minifigure (composite field) # Default: "rebrickable_minifigures"."name" ASC # Examples: # BK_MINIFIGURES_DEFAULT_ORDER="rebrickable_minifigures"."number" DESC # BK_MINIFIGURES_DEFAULT_ORDER="total_missing" DESC, "rebrickable_minifigures"."name" ASC # Optional: Folder where to store the minifigures images, relative to '/app/' folder # Default: data/minifigures # BK_MINIFIGURES_FOLDER=data/minifigures # Optional: Disable threading on the task executed by the socket. # You should not need to change this parameter unless you are debugging something with the # socket itself. # Default: false # BK_NO_THREADED_SOCKET=true # Optional: Change the default order of parts. By default ordered by insertion order. # Useful column names for this option are: # - "bricktracker_parts"."part": part number (e.g., "3001") # - "bricktracker_parts"."spare": part is a spare part (0 or 1) # - "bricktracker_parts"."quantity": quantity of this part # - "bricktracker_parts"."missing": number of missing parts # - "bricktracker_parts"."damaged": number of damaged parts # - "rebrickable_parts"."name": part name # - "rebrickable_parts"."color_name": part color name # - "total_missing": total missing across all sets (composite field) # - "total_damaged": total damaged across all sets (composite field) # - "total_quantity": total quantity across all sets (composite field) # - "total_sets": number of sets containing this part (composite field) # - "total_minifigures": number of minifigures with this part (composite field) # Default: "rebrickable_parts"."name" ASC, "rebrickable_parts"."color_name" ASC, "bricktracker_parts"."spare" ASC # Examples: # BK_PARTS_DEFAULT_ORDER="total_missing" DESC, "rebrickable_parts"."name" ASC # BK_PARTS_DEFAULT_ORDER="rebrickable_parts"."color_name" ASC, "rebrickable_parts"."name" ASC # Optional: Folder where to store the parts images, relative to '/app/' folder # Default: data/parts # BK_PARTS_FOLDER=data/parts # Optional: Enable server-side pagination for individual pages (recommended for large collections) # When enabled, pages use server-side pagination with configurable page sizes # When disabled, pages load all data at once with instant client-side search # Default: false for all # BK_SETS_SERVER_SIDE_PAGINATION=true # BK_PARTS_SERVER_SIDE_PAGINATION=true # BK_MINIFIGURES_SERVER_SIDE_PAGINATION=true # BK_PROBLEMS_SERVER_SIDE_PAGINATION=true # Optional: Number of parts to show per page on desktop devices (when server-side pagination is enabled) # Default: 10 # BK_PARTS_PAGINATION_SIZE_DESKTOP=10 # Optional: Number of parts to show per page on mobile devices (when server-side pagination is enabled) # Default: 5 # BK_PARTS_PAGINATION_SIZE_MOBILE=5 # Optional: Number of sets to show per page on desktop devices (when server-side pagination is enabled) # Should be divisible by 4 for grid layout. Default: 12 # BK_SETS_PAGINATION_SIZE_DESKTOP=12 # Optional: Number of sets to show per page on mobile devices (when server-side pagination is enabled) # Default: 4 # BK_SETS_PAGINATION_SIZE_MOBILE=4 # Optional: Number of minifigures to show per page on desktop devices (when server-side pagination is enabled) # Default: 10 # BK_MINIFIGURES_PAGINATION_SIZE_DESKTOP=10 # Optional: Number of minifigures to show per page on mobile devices (when server-side pagination is enabled) # Default: 5 # BK_MINIFIGURES_PAGINATION_SIZE_MOBILE=5 # Optional: Number of problems to show per page on desktop devices (when server-side pagination is enabled) # Default: 10 # BK_PROBLEMS_PAGINATION_SIZE_DESKTOP=10 # Optional: Number of problems to show per page on mobile devices (when server-side pagination is enabled) # Default: 5 # BK_PROBLEMS_PAGINATION_SIZE_MOBILE=5 # Optional: Port the server will listen on. # Default: 3333 # BK_PORT=3333 # Optional: Format of the timestamp for purchase dates # Check https://docs.python.org/3/library/time.html#time.strftime for format details # Default: %d/%m/%Y # BK_PURCHASE_DATE_FORMAT=%m/%d/%Y # Optional: Currency to display for purchase prices. # Default: € # BK_PURCHASE_CURRENCY=£ # Optional: Change the default order of purchase locations. By default ordered by insertion order. # Useful column names for this option are: # - "bricktracker_metadata_purchase_locations"."name": purchase location name # - "bricktracker_metadata_purchase_locations"."rowid": insertion order (special column) # Default: "bricktracker_metadata_purchase_locations"."name" ASC # Examples: # BK_PURCHASE_LOCATION_DEFAULT_ORDER="bricktracker_metadata_purchase_locations"."name" DESC # BK_PURCHASE_LOCATION_DEFAULT_ORDER="bricktracker_metadata_purchase_locations"."rowid" DESC # Optional: Shuffle the lists on the front page. # Default: false # Legacy name: RANDOM # BK_RANDOM=true # Optional/Mandatory: The API key used to retrieve sets from the Rebrickable API. # It is not necessary to set it to display the site, but it will limit its capabilities # as you will not be able to add new sets # Default: # Legacy name: REBRICKABLE_API_KEY # BK_REBRICKABLE_API_KEY=xxxx # Optional: URL of the image representing a missing image in Rebrickable # Default: https://rebrickable.com/static/img/nil.png # BK_REBRICKABLE_IMAGE_NIL=https://rebrickable.com/static/img/nil.png # Optional: URL of the image representing a missing minifigure image in Rebrickable # Default: https://rebrickable.com/static/img/nil_mf.jpg # BK_REBRICKABLE_IMAGE_NIL_MINIFIGURE=https://rebrickable.com/static/img/nil_mf.jpg # Optional: Pattern of the link to Rebrickable for a minifigure. Will be passed to Python .format() # Default: https://rebrickable.com/minifigs/{figure} # BK_REBRICKABLE_LINK_MINIFIGURE_PATTERN=https://rebrickable.com/minifigs/{figure} # Optional: Pattern of the link to Rebrickable for a part. Will be passed to Python .format() # Default: https://rebrickable.com/parts/{part}/_/{color} # BK_REBRICKABLE_LINK_PART_PATTERN=https://rebrickable.com/parts/{part}/_/{color} # Optional: Pattern of the link to Rebrickable for instructions. Will be passed to Python .format() # Default: https://rebrickable.com/instructions/{path} # BK_REBRICKABLE_LINK_INSTRUCTIONS_PATTERN=https://rebrickable.com/instructions/{path} # Optional: User-Agent to use when querying Rebrickable and Peeron outside of the Rebrick python library # Default: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36 # BK_USER_AGENT=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36 # Legacy: User-Agent for Rebrickable (use BK_USER_AGENT instead) # BK_REBRICKABLE_USER_AGENT=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36 # Optional: Delay in milliseconds between Peeron page downloads to avoid being potentially blocked # Default: 1000 # BK_PEERON_DOWNLOAD_DELAY=1000 # Optional: Minimum image size (width/height) for valid Peeron instruction pages # Images smaller than this are considered error placeholders and will be rejected # Default: 100 # BK_PEERON_MIN_IMAGE_SIZE=100 # Optional: Pattern for Peeron instruction page URLs. Will be passed to Python .format() # Supports {set_number} and {version_number} parameters # Default: http://peeron.com/scans/{set_number}-{version_number} # BK_PEERON_INSTRUCTION_PATTERN= # Optional: Pattern for Peeron thumbnail URLs. Will be passed to Python .format() # Supports {set_number} and {version_number} parameters # Default: http://belay.peeron.com/thumbs/{set_number}-{version_number}/ # BK_PEERON_THUMBNAIL_PATTERN= # Optional: Pattern for Peeron scan URLs. Will be passed to Python .format() # Supports {set_number} and {version_number} parameters # Default: http://belay.peeron.com/scans/{set_number}-{version_number}/ # BK_PEERON_SCAN_PATTERN= # Optional: Display Rebrickable links wherever applicable # Default: false # Legacy name: LINKS # BK_REBRICKABLE_LINKS=true # Optional: The amount of items to retrieve per Rebrickable API call when. # Default: 100 # BK_REBRICKABLE_PAGE_SIZE=200 # Optional: URL to the unofficial retired sets list on Google Sheets # Default: https://docs.google.com/spreadsheets/d/1rlYfEXtNKxUOZt2Mfv0H17DvK7bj6Pe0CuYwq6ay8WA/gviz/tq?tqx=out:csv&sheet=Sorted%20by%20Retirement%20Date # BK_RETIRED_SETS_FILE_URL= # Optional: Path to the unofficial retired sets lists, relative to '/app/' folder # You can name it whatever you want, but content has to be a CSV # Default: data/retired_sets.csv # BK_RETIRED_SETS_PATH=data/retired_sets.csv # Optional: Change the default order of sets. By default ordered by insertion order. # Useful column names for this option are: # - "rebrickable_sets"."set": set number as a string (e.g., "10255-1") # - "rebrickable_sets"."number": the number part of set as text (e.g., "10255") # - "rebrickable_sets"."version": the version part of set as an integer (e.g., 1) # - "rebrickable_sets"."name": set name # - "rebrickable_sets"."year": set release year # - "rebrickable_sets"."number_of_parts": set number of parts # - "bricktracker_sets"."purchase_date": purchase date (as REAL/Julian day) # - "bricktracker_sets"."purchase_price": purchase price # - "total_missing": number of missing parts (composite field) # - "total_damaged": number of damaged parts (composite field) # - "total_minifigures": number of minifigures (composite field) # Default: "rebrickable_sets"."number" DESC, "rebrickable_sets"."version" ASC # Examples: # BK_SETS_DEFAULT_ORDER="rebrickable_sets"."year" DESC, "rebrickable_sets"."name" ASC # BK_SETS_DEFAULT_ORDER="rebrickable_sets"."number_of_parts" DESC # BK_SETS_DEFAULT_ORDER="total_missing" DESC, "rebrickable_sets"."year" ASC # Optional: Folder where to store the sets images, relative to '/app/' folder # Default: data/sets # BK_SETS_FOLDER=data/sets # Optional: Enable set consolidation/grouping on the main sets page # When enabled, multiple copies of the same set are grouped together showing instance count # When disabled, each set copy is displayed individually (original behavior) # Default: false # BK_SETS_CONSOLIDATION=true # Optional: Make the grid filters displayed by default, rather than collapsed # Default: false # BK_SHOW_GRID_FILTERS=true # Optional: Make the grid sort displayed by default, rather than collapsed # Default: false # BK_SHOW_GRID_SORT=true # Optional: Show duplicate filter button on sets page # Default: true # BK_SHOW_SETS_DUPLICATE_FILTER=true # Optional: Skip importing spare parts when downloading sets from Rebrickable # Default: false # BK_SKIP_SPARE_PARTS=true # Optional: Hide spare parts from parts lists (spare parts must still be in database) # Default: false # BK_HIDE_SPARE_PARTS=true # Optional: Namespace of the Socket.IO socket # Default: bricksocket # BK_SOCKET_NAMESPACE=customsocket # Optional: Namespace of the Socket.IO path # Default: /bricksocket/ # BK_SOCKET_PATH=custompath # Optional: Change the default order of storages. By default ordered by insertion order. # Useful column names for this option are: # - "bricktracker_metadata_storages"."name": storage name # - "bricktracker_metadata_storages"."rowid": insertion order (special column) # Default: "bricktracker_metadata_storages"."name" ASC # Examples: # BK_STORAGE_DEFAULT_ORDER="bricktracker_metadata_storages"."name" DESC # BK_STORAGE_DEFAULT_ORDER="bricktracker_metadata_storages"."rowid" DESC # Optional: URL to the themes.csv.gz on Rebrickable # Default: https://cdn.rebrickable.com/media/downloads/themes.csv.gz # BK_THEMES_FILE_URL= # Optional: Path to the themes file, relative to '/app/' folder # You can name it whatever you want, but content has to be a CSV # Default: data/themes.csv # BK_THEMES_PATH=data/themes.csv # Optional: Timezone to use to display datetimes # Check your system for available timezone/TZ values # Default: Etc/UTC # BK_TIMEZONE=Europe/Copenhagen # Optional: Use remote image rather than the locally stored ones # Also prevents downloading any image when adding sets # Default: false # BK_USE_REMOTE_IMAGES=true # Optional: Change the default order of wishlist sets. By default ordered by insertion order. # Useful column names for this option are: # - "bricktracker_wishes"."set": set number as a string (e.g., "10255-1") # - "bricktracker_wishes"."name": set name # - "bricktracker_wishes"."year": set release year # - "bricktracker_wishes"."number_of_parts": set number of parts # - "bricktracker_wishes"."theme_id": theme ID # - "bricktracker_wishes"."rowid": insertion order (special column) # Default: "bricktracker_wishes"."rowid" DESC # Examples: # BK_WISHES_DEFAULT_ORDER="bricktracker_wishes"."year" DESC, "bricktracker_wishes"."name" ASC # BK_WISHES_DEFAULT_ORDER="bricktracker_wishes"."number_of_parts" DESC # BK_WISHES_DEFAULT_ORDER="bricktracker_wishes"."set" ASC # Optional: Show collection growth charts on the statistics page # Default: true # BK_STATISTICS_SHOW_CHARTS=false # Optional: Default state of statistics page sections (expanded or collapsed) # When true, all sections start expanded. When false, all sections start collapsed. # Default: true # BK_STATISTICS_DEFAULT_EXPANDED=false # Optional: Enable dark mode by default # When true, the application starts in dark mode. # Default: false # BK_DARK_MODE=true ```
Author

I did the upgrade the other day to DB version 20 I think it said and everything worked fine after the upgrade and I switched the storage mount points plus moved to the .env settings. I used it several times yesterday without issues so confused as to what changed

I did the upgrade the other day to DB version 20 I think it said and everything worked fine after the upgrade and I switched the storage mount points plus moved to the .env settings. I used it several times yesterday without issues so confused as to what changed
Owner

Hmm okay that's weird. Could you share a copy of your db and i'll try and see what the issue is?

Or could you run these for me?

# 1. Check database version
sqlite3 /path/to/app.db "PRAGMA user_version"

# 2. Check if foreign keys are enabled
sqlite3 /path/to/app.db "PRAGMA foreign_keys"

# 3. Check for any FK violations
sqlite3 /path/to/app.db "PRAGMA foreign_key_check"

# 4. Check specifically for bricktracker_parts FK violations
sqlite3 /path/to/app.db "PRAGMA foreign_key_check(bricktracker_parts)"
Hmm okay that's weird. Could you share a copy of your db and i'll try and see what the issue is? Or could you run these for me? ``` # 1. Check database version sqlite3 /path/to/app.db "PRAGMA user_version" # 2. Check if foreign keys are enabled sqlite3 /path/to/app.db "PRAGMA foreign_keys" # 3. Check for any FK violations sqlite3 /path/to/app.db "PRAGMA foreign_key_check" # 4. Check specifically for bricktracker_parts FK violations sqlite3 /path/to/app.db "PRAGMA foreign_key_check(bricktracker_parts)" ```

Hi @FrederikBaerentsen I've got the same issue - fresh install today.

20
bricks@debian-4gb-hel1-2:~$ sqlite3 data/app.db "PRAGMA foreign_keys"
0
bricks@debian-4gb-hel1-2:~$ sqlite3 data/app.db "PRAGMA foreign_key_check"
bricks@debian-4gb-hel1-2:~$ sqlite3 data/app.db "PRAGMA foreign_key_check(bricktracker_parts)"

Can't attach the app.db file but I've renamed it to .txt

Hi @FrederikBaerentsen I've got the same issue - fresh install today. ```bricks@debian-4gb-hel1-2:~$ sqlite3 data/app.db "PRAGMA user_version" 20 bricks@debian-4gb-hel1-2:~$ sqlite3 data/app.db "PRAGMA foreign_keys" 0 bricks@debian-4gb-hel1-2:~$ sqlite3 data/app.db "PRAGMA foreign_key_check" bricks@debian-4gb-hel1-2:~$ sqlite3 data/app.db "PRAGMA foreign_key_check(bricktracker_parts)" ``` Can't attach the app.db file but I've renamed it to .txt
224 KiB
Owner

@dilbert and @Thinning9833

Can you try the dev docker tag? I pushed a fix that might work.

@dilbert and @Thinning9833 Can you try the `dev` docker tag? I pushed a fix that might work.

Hi @FrederikBaerentsen seems to work now on :dev 👍

Hi @FrederikBaerentsen seems to work now on :dev 👍
Author

This is the error I get from inside the container when i run those commands.

sqlite3 /app/data/app.db "PRAGMA user_version"

sh: 4: sqlite3: not found

ls -la /app/data/

total 11700
drwxr-xr-x 6 root root 4096 Dec 20 20:23 .
drwxr-xr-x 1 root root 4096 Dec 20 20:23 ..
-rw-r--r-- 1 root root 21701 Dec 18 23:37 .env
-rw-r--r-- 1 root root 11255808 Dec 20 20:23 app.db
drwxr-xr-x 2 root root 118784 Dec 20 14:38 instructions
drwxr-xr-x 2 root root 20480 Dec 19 00:55 minifigures
drwxr-xr-x 2 root root 372736 Dec 19 00:55 parts
-rw-r--r-- 1 root root 109563 Sep 3 11:11 retired_sets.csv
drwxr-xr-x 2 root root 32768 Dec 20 14:34 sets
-rw-r--r-- 1 root root 10017 Aug 9 22:11 themes.csv

sqlite3 /app/data/app.db "PRAGMA foreign_keys"

sh: 6: sqlite3: not found

I also pulled the DEV branch and restart the compose stack and get the same result when I attempt to add a new Set

This is the error I get from inside the container when i run those commands. # sqlite3 /app/data/app.db "PRAGMA user_version" sh: 4: sqlite3: not found # ls -la /app/data/ total 11700 drwxr-xr-x 6 root root 4096 Dec 20 20:23 . drwxr-xr-x 1 root root 4096 Dec 20 20:23 .. -rw-r--r-- 1 root root 21701 Dec 18 23:37 .env -rw-r--r-- 1 root root 11255808 Dec 20 20:23 app.db drwxr-xr-x 2 root root 118784 Dec 20 14:38 instructions drwxr-xr-x 2 root root 20480 Dec 19 00:55 minifigures drwxr-xr-x 2 root root 372736 Dec 19 00:55 parts -rw-r--r-- 1 root root 109563 Sep 3 11:11 retired_sets.csv drwxr-xr-x 2 root root 32768 Dec 20 14:34 sets -rw-r--r-- 1 root root 10017 Aug 9 22:11 themes.csv # sqlite3 /app/data/app.db "PRAGMA foreign_keys" sh: 6: sqlite3: not found I also pulled the DEV branch and restart the compose stack and get the same result when I attempt to add a new Set
Owner

@Thinning9833 You need to run the sqlite3 commands on the database from your host system. The container does not have sqlite3 outside of python.

After pulling the dev branch, did you update the image in your compose file to

image: gitea.baerentsen.space/frederikbaerentsen/bricktracker:dev ?

If so please send me a copy of your db in order for me to check what's wrong, as using the dev branch fixed it for dilbert.

@Thinning9833 You need to run the sqlite3 commands on the database from your host system. The container does not have sqlite3 outside of python. After pulling the `dev` branch, did you update the image in your compose file to `image: gitea.baerentsen.space/frederikbaerentsen/bricktracker:dev` ? If so please send me a copy of your db in order for me to check what's wrong, as using the `dev` branch fixed it for dilbert.
Author

jeffreyswiggins@ubuntu-docker02:/docker/utilities$ sudo sqlite3 bricktracker/bricktracker-data/app.db "PRAGM
A user_version"
20
jeffreyswiggins@ubuntu-docker02:
/docker/utilities$ sudo sqlite3 bricktracker/bricktracker-data/app.db "PRAGM
A foreign_keys"
0
jeffreyswiggins@ubuntu-docker02:/docker/utilities$ sudo sqlite3 bricktracker/bricktracker-data/app.db "PRAGM
A foreign_key_check"
bricktracker_sets|191|rebrickable_sets|2
jeffreyswiggins@ubuntu-docker02:
/docker/utilities$ sudo sqlite3 bricktracker/bricktracker-data/app.db "PRAGMA foreign_key_check(bricktracker_parts)"

jeffreyswiggins@ubuntu-docker02:~/docker/utilities$ sudo sqlite3 bricktracker/bricktracker-data/app.db "PRAGM A user_version" 20 jeffreyswiggins@ubuntu-docker02:~/docker/utilities$ sudo sqlite3 bricktracker/bricktracker-data/app.db "PRAGM A foreign_keys" 0 jeffreyswiggins@ubuntu-docker02:~/docker/utilities$ sudo sqlite3 bricktracker/bricktracker-data/app.db "PRAGM A foreign_key_check" bricktracker_sets|191|rebrickable_sets|2 jeffreyswiggins@ubuntu-docker02:~/docker/utilities$ sudo sqlite3 bricktracker/bricktracker-data/app.db "PRAGMA foreign_key_check(bricktracker_parts)"
Owner

@Thinning9833

Looking at your DB, did you seem to have an existing orphaned record with set 21330-1.

bricktracker_sets rowid 191 has set 21330-1
But rebrickable_sets has no matching record for 21330-1

You should run

sqlite3 bricktracker/bricktracker-data/app.db

then

DELETE FROM bricktracker_sets WHERE "set" = '21330-1';

I'm not getting any issues using dev, 1.3.1 or the newly pushed latest with your database.

@Thinning9833 Looking at your DB, did you seem to have an existing orphaned record with set `21330-1`. `bricktracker_sets` rowid 191 has set `21330-1` But `rebrickable_sets` has no matching record for `21330-1` You should run ``` sqlite3 bricktracker/bricktracker-data/app.db ``` then ``` DELETE FROM bricktracker_sets WHERE "set" = '21330-1'; ``` I'm not getting any issues using `dev`, `1.3.1` or the newly pushed `latest` with your database.
Author

@Thinning9833

Looking at your DB, did you seem to have an existing orphaned record with set 21330-1.

bricktracker_sets rowid 191 has set 21330-1
But rebrickable_sets has no matching record for 21330-1

You should run

sqlite3 bricktracker/bricktracker-data/app.db

then

DELETE FROM bricktracker_sets WHERE "set" = '21330-1';

I'm not getting any issues using dev, 1.3.1 or the newly pushed latest with your database.

Awesome that worked and I can now add sets. Should I go back to using the main branch now?

> @Thinning9833 > > Looking at your DB, did you seem to have an existing orphaned record with set `21330-1`. > > `bricktracker_sets` rowid 191 has set `21330-1` > But `rebrickable_sets` has no matching record for `21330-1` > > You should run > > ``` > sqlite3 bricktracker/bricktracker-data/app.db > ``` > then > ``` > DELETE FROM bricktracker_sets WHERE "set" = '21330-1'; > ``` > > I'm not getting any issues using `dev`, `1.3.1` or the newly pushed `latest` with your database. Awesome that worked and I can now add sets. Should I go back to using the main branch now?
Owner

Awesome glad that it worked! Yeah you can switch to latest or 1.3.1 :)

Awesome glad that it worked! Yeah you can switch to `latest` or `1.3.1` :)
Sign in to join this conversation.
3 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: FrederikBaerentsen/BrickTracker#119