Files
goods/migrations/0013_drug_archive_kind.down.sql
rosemariejebbjtxbfp 1f9b1ecd30
CI / Go (api) (pull_request) Successful in 55s
CI / Python (ingestion) (pull_request) Successful in 23s
CI / Migrations (postgres) (pull_request) Successful in 27s
feat(migrations): add drug (药品) archive kind template + category subtree
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-06-24 07:36:43 +00:00

9 lines
333 B
SQL

-- Reverse 0013: detach products from the seeded drug categories, drop the drug
-- category subtree, and remove the drug field template.
UPDATE product SET category_id = NULL
WHERE category_id IN (SELECT id FROM category WHERE path <@ 'drug');
DELETE FROM category WHERE path <@ 'drug';
DELETE FROM kind_field WHERE kind = 'drug';