Files
SupplierSystem/migrations/20260606_065930_insert_classification_rules.sql
Ubuntu deb3e72750
CI / server typecheck + tests (push) Canceled after 0s
CI / web typecheck + tests + miniprogram syntax (push) Canceled after 0s
CI / eslint (观察项,C7 骨架) (push) Canceled after 0s
CI / npm audit (critical 硬拦) (push) Canceled after 0s
chore: 以 AI 生鲜配送系统 当前版本作为 SupplierSystem 起点
来源仓库:jxc/ai-fresh-delivery
来源提交:f0b1a180e2deb7e4673b9d1c8542619f7bc0f73d
快照树:  09f679334ff38f0ff25e907961c94a8223bcaedd(与来源 HEAD 工作树逐字节一致,3801 个文件)

按约定本仓库不带任何历史提交:来源仓库的历史中含真实凭据
(生产 SSH 私钥 deploy/id_rsa_tencent、server/.env、.env.tencent/.env.production/.env.gitea、
deploy/小程序AppSecret.txt,其中 MP_APPSECRET / S3 AccessKey 经哈希比对与线上同值),
整包推送会把这些凭据永久带入本仓库,故只取「当前版本」的单提交快照。
供应商系统后续开发自本提交开始。
2026-10-08 17:35:43 +08:00

76 lines
3.1 KiB
SQL
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
-- ============================================
-- 此文件由 Meoo Cloud 自动生成,请勿修改
-- This file is auto-generated by Meoo Cloud, DO NOT MODIFY
-- ============================================
-- 2026-09-24 H10 空库重放修复:这些种子行引用 categories / skus / customers 的**业务行**,
-- 空库(灾备 / 新环境)里父行不存在 → 外键失败、整条迁移链中断。
-- 改为只插入「父行确实存在」的行:存量库父行都在 → 行为不变;新库自动跳过无父行的种子。
INSERT INTO smart_classification_rules (keyword, category_code, match_type, priority)
SELECT v.*
FROM (VALUES
('白菜', 'VEG001', 'contains', 100),
('萝卜', 'VEG001', 'contains', 100),
('土豆', 'VEG001', 'contains', 100),
('西红柿', 'VEG001', 'contains', 100),
('番茄', 'VEG001', 'contains', 100),
('黄瓜', 'VEG001', 'contains', 100),
('茄子', 'VEG001', 'contains', 100),
('辣椒', 'VEG001', 'contains', 100),
('菠菜', 'VEG001', 'contains', 100),
('芹菜', 'VEG001', 'contains', 100),
('韭菜', 'VEG001', 'contains', 100),
('葱', 'VEG001', 'contains', 90),
('姜', 'VEG001', 'contains', 90),
('蒜', 'VEG001', 'contains', 90),
('洋葱', 'VEG001', 'contains', 100),
('南瓜', 'VEG001', 'contains', 100),
('冬瓜', 'VEG001', 'contains', 100),
('丝瓜', 'VEG001', 'contains', 100),
('苦瓜', 'VEG001', 'contains', 100),
('豆角', 'VEG001', 'contains', 100),
('豆芽', 'VEG001', 'contains', 100),
('蘑菇', 'VEG001', 'contains', 100),
('木耳', 'VEG001', 'contains', 100),
('笋', 'VEG001', 'contains', 90),
('藕', 'VEG001', 'contains', 90),
('玉米', 'VEG001', 'contains', 100),
('红薯', 'VEG001', 'contains', 100),
('山药', 'VEG001', 'contains', 100),
('芋头', 'VEG001', 'contains', 100),
('胡萝卜', 'VEG001', 'contains', 100),
('西蓝花', 'VEG001', 'contains', 100),
('菜花', 'VEG001', 'contains', 100),
('甘蓝', 'VEG001', 'contains', 100),
('生菜', 'VEG001', 'contains', 100),
('油麦菜', 'VEG001', 'contains', 100),
('茼蒿', 'VEG001', 'contains', 100),
('芥菜', 'VEG001', 'contains', 100),
('空心菜', 'VEG001', 'contains', 100),
('苋菜', 'VEG001', 'contains', 100),
('荠菜', 'VEG001', 'contains', 100),
('蕨菜', 'VEG001', 'contains', 100),
('香椿', 'VEG001', 'contains', 100),
('茭白', 'VEG001', 'contains', 100),
('莴笋', 'VEG001', 'contains', 100),
('芦笋', 'VEG001', 'contains', 100),
('竹笋', 'VEG001', 'contains', 100),
('黄花菜', 'VEG001', 'contains', 100),
('金针菇', 'VEG001', 'contains', 100),
('香菇', 'VEG001', 'contains', 100),
('平菇', 'VEG001', 'contains', 100),
('杏鲍菇', 'VEG001', 'contains', 100),
('鸡腿菇', 'VEG001', 'contains', 100),
('口蘑', 'VEG001', 'contains', 100),
('茶树菇', 'VEG001', 'contains', 100),
('银耳', 'VEG001', 'contains', 100),
('黑木耳', 'VEG001', 'contains', 100),
('海带', 'VEG001', 'contains', 100),
('紫菜', 'VEG001', 'contains', 100),
('海苔', 'VEG001', 'contains', 100),
('裙带菜', 'VEG001', 'contains', 100)) AS v(keyword, category_code, match_type, priority)
WHERE EXISTS (SELECT 1 FROM categories c WHERE c.category_code = v.category_code)
ON CONFLICT DO NOTHING;