forked from FrederikBaerentsen/BrickTracker
Fix orphaned parts blocking database upgrade
This commit is contained in:
parent
6d70dbdf8b
commit
e28ad8b32c
@ -1,5 +1,9 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 1.2.2:
|
||||||
|
|
||||||
|
This release fixes a bug where orphaned parts in the `inventory` table are blocking the database upgrade.
|
||||||
|
|
||||||
## 1.2.1:
|
## 1.2.1:
|
||||||
|
|
||||||
This release fixes a bug where you could not add a set if no metadata was configured.
|
This release fixes a bug where you could not add a set if no metadata was configured.
|
||||||
|
@ -4,6 +4,19 @@ PRAGMA foreign_keys = ON;
|
|||||||
|
|
||||||
BEGIN TRANSACTION;
|
BEGIN TRANSACTION;
|
||||||
|
|
||||||
|
-- Fix: somehow a deletion bug was introduced in an older release?
|
||||||
|
DELETE FROM "inventory"
|
||||||
|
WHERE "inventory"."u_id" NOT IN (
|
||||||
|
SELECT "bricktracker_sets"."id"
|
||||||
|
FROM "bricktracker_sets"
|
||||||
|
);
|
||||||
|
|
||||||
|
DELETE FROM "missing"
|
||||||
|
WHERE "missing"."u_id" NOT IN (
|
||||||
|
SELECT "bricktracker_sets"."id"
|
||||||
|
FROM "bricktracker_sets"
|
||||||
|
);
|
||||||
|
|
||||||
-- Create a Bricktracker parts table: an amount of parts linked to a Bricktracker set
|
-- Create a Bricktracker parts table: an amount of parts linked to a Bricktracker set
|
||||||
CREATE TABLE "bricktracker_parts" (
|
CREATE TABLE "bricktracker_parts" (
|
||||||
"id" TEXT NOT NULL,
|
"id" TEXT NOT NULL,
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
from typing import Final
|
from typing import Final
|
||||||
|
|
||||||
__version__: Final[str] = '1.2.1'
|
__version__: Final[str] = '1.2.2'
|
||||||
__database_version__: Final[int] = 15
|
__database_version__: Final[int] = 15
|
||||||
|
@ -2,7 +2,7 @@ services:
|
|||||||
bricktracker:
|
bricktracker:
|
||||||
container_name: BrickTracker
|
container_name: BrickTracker
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
image: gitea.baerentsen.space/frederikbaerentsen/bricktracker:1.2.1
|
image: gitea.baerentsen.space/frederikbaerentsen/bricktracker:1.2.2
|
||||||
ports:
|
ports:
|
||||||
- "3333:3333"
|
- "3333:3333"
|
||||||
volumes:
|
volumes:
|
||||||
|
@ -2,7 +2,7 @@ services:
|
|||||||
bricktracker:
|
bricktracker:
|
||||||
container_name: BrickTracker
|
container_name: BrickTracker
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
image: gitea.baerentsen.space/frederikbaerentsen/bricktracker:1.2.1
|
image: gitea.baerentsen.space/frederikbaerentsen/bricktracker:1.2.2
|
||||||
ports:
|
ports:
|
||||||
- "3333:3333"
|
- "3333:3333"
|
||||||
volumes:
|
volumes:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user