-- 商户空调 GS 配置：欠费额度（元）
SET @db := DATABASE();

SET @sql := IF(
  (SELECT COUNT(*) FROM information_schema.COLUMNS
   WHERE TABLE_SCHEMA = @db AND TABLE_NAME = 'yw_customer_gs' AND COLUMN_NAME = 'stop_money') = 0,
  'ALTER TABLE `yw_customer_gs` ADD COLUMN `stop_money` decimal(12,2) DEFAULT 0 COMMENT ''欠费额度（元）'' AFTER `gs_bz`',
  'SELECT 1'
);
PREPARE stmt FROM @sql;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
