/*
  Warnings:

  - The `bags` column on the `purchases` table would be dropped and recreated. This will lead to data loss if there is data in the column.

*/
-- AlterTable
ALTER TABLE `purchases` ADD COLUMN `remaining_bags` DECIMAL(12, 3) NOT NULL DEFAULT 0,
    ADD COLUMN `weight_per_bag` DECIMAL(10, 3) NULL,
    DROP COLUMN `bags`,
    ADD COLUMN `bags` DECIMAL(12, 3) NOT NULL DEFAULT 0;

-- AlterTable
ALTER TABLE `sale_items` ADD COLUMN `bags` DECIMAL(12, 3) NULL,
    ADD COLUMN `sale_unit` ENUM('KG', 'BAG', 'BOX') NOT NULL DEFAULT 'KG';
