-- +goose Up
-- +goose StatementBegin

INSERT INTO system_configs (`key`, `value`, description) VALUES
  ('chat.listing_group_welcome', '欢迎加入账号群！请号主扫描下方二维码加入企业微信群，方便客服与您及时联系。', '发布群创建后自动发送的欢迎语')
ON DUPLICATE KEY UPDATE
  `value` = CASE
    WHEN `value` LIKE '%å%' OR `value` LIKE '%æ%' OR `value` LIKE '%ç%' OR `value` LIKE '%ä%' OR `value` LIKE '%ï¼%' THEN VALUES(`value`)
    ELSE `value`
  END,
  description = VALUES(description);

-- +goose StatementEnd

-- +goose Down
-- +goose StatementBegin

DELETE FROM system_configs WHERE `key` = 'chat.listing_group_welcome';

-- +goose StatementEnd
