9 lines
333 B
SQL
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';
|