-- Add track_inventory column to all branch items tables
-- This script should be run for each branch

-- Get list of branches
SELECT branch_code FROM branches;

-- For each branch, run:
ALTER TABLE `{branch_code}_items` 
ADD COLUMN `track_inventory` tinyint(1) DEFAULT '1' 
COMMENT 'Whether to track inventory for this item' 
AFTER `is_favorite`;

-- Note: Replace {branch_code} with actual branch code (e.g., m001, m002, etc.)
-- Example for main branch:
ALTER TABLE `m001_items` 
ADD COLUMN `track_inventory` tinyint(1) DEFAULT '1' 
COMMENT 'Whether to track inventory for this item' 
AFTER `is_favorite`; 