From fa50f3aa86e5a0e641032c85ef82058847249a13 Mon Sep 17 00:00:00 2001 From: Matthew Kilgore Date: Sun, 1 Jun 2025 12:02:19 -0400 Subject: [PATCH] fix: missing column from entities migration for postgres --- .../migrations/postgres/20250531120000_add_entity_tables.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/backend/internal/data/migrations/postgres/20250531120000_add_entity_tables.go b/backend/internal/data/migrations/postgres/20250531120000_add_entity_tables.go index 7ee522d9..0e72f652 100644 --- a/backend/internal/data/migrations/postgres/20250531120000_add_entity_tables.go +++ b/backend/internal/data/migrations/postgres/20250531120000_add_entity_tables.go @@ -66,6 +66,7 @@ func Up20250531120000(ctx context.Context, tx *sql.Tx) error { "entity_children" uuid NULL, "entity_parent" uuid NULL, "entity_type" uuid NOT NULL, + "sync_child_entities_locations" boolean NOT NULL DEFAULT false, PRIMARY KEY ("id"), CONSTRAINT "entities_groups_entities" FOREIGN KEY ("group_entities") REFERENCES "groups" ("id") ON UPDATE NO ACTION ON DELETE CASCADE, CONSTRAINT "entities_entities_children" FOREIGN KEY ("entity_children") REFERENCES "entities" ("id") ON UPDATE NO ACTION ON DELETE SET NULL, @@ -141,7 +142,7 @@ func Up20250531120000(ctx context.Context, tx *sql.Tx) error { "asset_id", "serial_number", "model_number", "manufacturer", "lifetime_warranty", "warranty_expires", "warranty_details", "purchase_time", "purchase_from", "purchase_price", "sold_time", "sold_to", - "sold_price", "sold_notes", "group_entities", "entity_children", + "sold_price", "sold_notes", "group_entities", "entity_children", "sync_child_entities_locations", "entity_parent", "entity_type") SELECT i."id", i."created_at", i."updated_at", i."name", i."description", @@ -149,7 +150,7 @@ func Up20250531120000(ctx context.Context, tx *sql.Tx) error { i."asset_id", i."serial_number", i."model_number", i."manufacturer", i."lifetime_warranty", i."warranty_expires", i."warranty_details", i."purchase_time", i."purchase_from", i."purchase_price", i."sold_time", i."sold_to", - i."sold_price", i."sold_notes", i."group_items", i."item_children", + i."sold_price", i."sold_notes", i."group_items", i."item_children", i."sync_child_items_locations", i."item_parent", $1 FROM "items" i WHERE i."group_items" = $2 `, itemTypeID, groupID)