summaryrefslogtreecommitdiff
path: root/import
diff options
context:
space:
mode:
authorLester Caine <lester@lsces.co.uk>2026-06-01 14:38:06 +0100
committerLester Caine <lester@lsces.co.uk>2026-06-01 14:38:06 +0100
commitf7b9724701dbed7197fd49b57c42f436062574de (patch)
tree9efd4f0f54fbcbf8d0a22f6d23bd3cf411c5ff79 /import
parentdb935105f8dbc8582cbe4dbfb4961a836af0eb64 (diff)
downloadstock-f7b9724701dbed7197fd49b57c42f436062574de.tar.gz
stock-f7b9724701dbed7197fd49b57c42f436062574de.tar.bz2
stock-f7b9724701dbed7197fd49b57c42f436062574de.zip
Rename stock_assembly_component_map table to stock_assembly_map
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'import')
-rw-r--r--import/ImportAssembly.php2
-rw-r--r--import/load_kitlocker_assemblies.php2
-rw-r--r--import/load_kitlocker_groups.php4
3 files changed, 4 insertions, 4 deletions
diff --git a/import/ImportAssembly.php b/import/ImportAssembly.php
index 001dd8c..a42e320 100644
--- a/import/ImportAssembly.php
+++ b/import/ImportAssembly.php
@@ -69,7 +69,7 @@ function StockAssemblyBatchLoad( string $assemblyTitle, array $pRows ): array {
// Update quantity_value and quantity_item on the map row just inserted
global $gBitDb;
$gBitDb->query(
- "UPDATE `".BIT_DB_PREFIX."stock_assembly_component_map`
+ "UPDATE `".BIT_DB_PREFIX."stock_assembly_map`
SET `quantity_value` = ?, `quantity_item` = ?
WHERE `assembly_content_id` = ? AND `item_content_id` = ?",
[ $qtyValue, $qtySrc, $assembly->mContentId, $componentContentId ]
diff --git a/import/load_kitlocker_assemblies.php b/import/load_kitlocker_assemblies.php
index 65af5c8..edea9d6 100644
--- a/import/load_kitlocker_assemblies.php
+++ b/import/load_kitlocker_assemblies.php
@@ -85,7 +85,7 @@ if( empty( $klidMap ) ) {
// Add as child of the group assembly
$gBitDb->getOne(
- "INSERT INTO `".BIT_DB_PREFIX."stock_assembly_component_map`
+ "INSERT INTO `".BIT_DB_PREFIX."stock_assembly_map`
(`assembly_content_id`, `item_content_id`, `item_position`) VALUES (?,?,NULL)",
[ $groupContentId, $contentId ]
);
diff --git a/import/load_kitlocker_groups.php b/import/load_kitlocker_groups.php
index 132c09d..202b917 100644
--- a/import/load_kitlocker_groups.php
+++ b/import/load_kitlocker_groups.php
@@ -79,13 +79,13 @@ if( !$parent->isValid() || empty( $parent->mContentId ) ) {
// Always ensure parent link exists (safe to re-run)
$alreadyLinked = (int)$gBitDb->getOne(
- "SELECT COUNT(*) FROM `".BIT_DB_PREFIX."stock_assembly_component_map`
+ "SELECT COUNT(*) FROM `".BIT_DB_PREFIX."stock_assembly_map`
WHERE `assembly_content_id`=? AND `item_content_id`=?",
[ $parentContentId, $contentId ]
);
if( !$alreadyLinked ) {
$gBitDb->getOne(
- "INSERT INTO `".BIT_DB_PREFIX."stock_assembly_component_map`
+ "INSERT INTO `".BIT_DB_PREFIX."stock_assembly_map`
(`assembly_content_id`, `item_content_id`, `item_position`) VALUES (?,?,NULL)",
[ $parentContentId, $contentId ]
);