-- Migration to convert stock fields from INTEGER to DECIMAL(10, 2)
-- This allows decimal quantities like 9.50 instead of just whole numbers

-- Modify current_stock column
ALTER TABLE Products 
MODIFY COLUMN current_stock DECIMAL(10, 2) DEFAULT 0 NOT NULL;

-- Modify min_stock column  
ALTER TABLE Products 
MODIFY COLUMN min_stock DECIMAL(10, 2) DEFAULT 1 NULL;

-- Modify max_stock column
ALTER TABLE Products 
MODIFY COLUMN max_stock DECIMAL(10, 2) DEFAULT 1000 NULL;

-- Modify reorder_point column
ALTER TABLE Products 
MODIFY COLUMN reorder_point DECIMAL(10, 2) DEFAULT 10 NULL;

-- Note: This migration should be run after updating the schema file
-- The schema changes ensure new tables use DECIMAL(10, 2)
-- This migration updates existing tables to use DECIMAL(10, 2)
