From 702b956ff160b8eb8a3a31a2caf79756a34532ea Mon Sep 17 00:00:00 2001 From: Matt Date: Sun, 16 Feb 2025 11:54:28 -0500 Subject: [PATCH] Fix main import script issue --- inventory-server/scripts/import-from-prod.js | 22 ++++++++++---------- mountremote.command | 4 ++-- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/inventory-server/scripts/import-from-prod.js b/inventory-server/scripts/import-from-prod.js index a044fe7..1f08c05 100644 --- a/inventory-server/scripts/import-from-prod.js +++ b/inventory-server/scripts/import-from-prod.js @@ -10,10 +10,10 @@ const importPurchaseOrders = require('./import/purchase-orders'); dotenv.config({ path: path.join(__dirname, "../.env") }); // Constants to control which imports run -const IMPORT_CATEGORIES = true; -const IMPORT_PRODUCTS = true; +const IMPORT_CATEGORIES = false; +const IMPORT_PRODUCTS = false; const IMPORT_ORDERS = true; -const IMPORT_PURCHASE_ORDERS = true; +const IMPORT_PURCHASE_ORDERS = false; // Add flag for incremental updates const INCREMENTAL_UPDATE = process.env.INCREMENTAL_UPDATE !== 'false'; // Default to true unless explicitly set to false @@ -202,14 +202,14 @@ async function main() { records_updated = $3, status = 'completed', additional_info = jsonb_build_object( - 'categories_enabled', $4, - 'products_enabled', $5, - 'orders_enabled', $6, - 'purchase_orders_enabled', $7, - 'categories_result', $8::jsonb, - 'products_result', $9::jsonb, - 'orders_result', $10::jsonb, - 'purchase_orders_result', $11::jsonb + 'categories_enabled', $4::boolean, + 'products_enabled', $5::boolean, + 'orders_enabled', $6::boolean, + 'purchase_orders_enabled', $7::boolean, + 'categories_result', COALESCE($8::jsonb, 'null'::jsonb), + 'products_result', COALESCE($9::jsonb, 'null'::jsonb), + 'orders_result', COALESCE($10::jsonb, 'null'::jsonb), + 'purchase_orders_result', COALESCE($11::jsonb, 'null'::jsonb) ) WHERE id = $12 `, [ diff --git a/mountremote.command b/mountremote.command index a27b4f2..2c1ddee 100755 --- a/mountremote.command +++ b/mountremote.command @@ -1,5 +1,5 @@ #!/bin/zsh #Clear previous mount in case it's still there -umount "/Users/matt/Library/Mobile Documents/com~apple~CloudDocs/Dev/inventory/inventory-server" +umount '/Users/matt/Library/Mobile Documents/com~apple~CloudDocs/Dev/inventory/inventory-server' #Mount -sshfs matt@dashboard.kent.pw:/var/www/html/inventory -p 22122 "/Users/matt/Library/Mobile Documents/com~apple~CloudDocs/Dev/inventory/inventory-server/" \ No newline at end of file +sshfs matt@dashboard.kent.pw:/var/www/html/inventory -p 22122 '/Users/matt/Library/Mobile Documents/com~apple~CloudDocs/Dev/inventory/inventory-server/' \ No newline at end of file