-- 从 cattleprovince 表中移除全国总量字段（如果已添加）
-- 请在数据库中执行此SQL语句

USE cattleTends;

-- 检查并删除索引（如果存在）
DROP INDEX IF EXISTS idx_national_inv_23 ON cattleprovince;
DROP INDEX IF EXISTS idx_national_sla_23 ON cattleprovince;
DROP INDEX IF EXISTS idx_national_inv_24 ON cattleprovince;
DROP INDEX IF EXISTS idx_national_sla_24 ON cattleprovince;
DROP INDEX IF EXISTS idx_national_inv_25 ON cattleprovince;
DROP INDEX IF EXISTS idx_national_sla_25 ON cattleprovince;

-- 删除字段（如果存在）
ALTER TABLE cattleprovince
    DROP COLUMN IF EXISTS national_inventory_23th,
    DROP COLUMN IF EXISTS national_slaughter_23th,
    DROP COLUMN IF EXISTS national_inventory_24th,
    DROP COLUMN IF EXISTS national_slaughter_24th,
    DROP COLUMN IF EXISTS national_inventory_25th,
    DROP COLUMN IF EXISTS national_slaughter_25th;

