BEGIN;

DROP INDEX IF EXISTS idx_stock_allocations_purpose_stockable_active;
DROP INDEX IF EXISTS idx_stock_allocations_purpose_usable_active;
DROP INDEX IF EXISTS idx_stock_allocations_purpose_status;

ALTER TABLE stock_allocations
    DROP CONSTRAINT IF EXISTS stock_allocations_allocation_purpose_check;

ALTER TABLE stock_allocations
    DROP COLUMN IF EXISTS allocation_purpose;

COMMIT;
