-- Assign Solution Types taxonomy terms to resources
-- Generated from resource-taxonomy-assignments.csv

-- Clear any existing solution-types assignments for these posts first
DELETE tr FROM wp_term_relationships tr
INNER JOIN wp_term_taxonomy tt ON tr.term_taxonomy_id = tt.term_taxonomy_id
WHERE tt.taxonomy = 'solution-types'
AND tr.object_id IN (
    1587, 1786, 1794, 2598, 2863, 2865, 3040, 3045, 3051, 3056, 3060,
    3934, 3975, 3978, 4011, 4053, 4064, 4075, 4092, 4103, 4105, 4113,
    4124, 4128, 4132, 4138, 4144, 4154, 4157, 4160, 4163, 4167, 4186,
    4225, 4284, 4311, 4328, 4339, 4343, 4356, 4375, 4405, 4412, 4420,
    4425, 4464, 4474, 4499, 4504
);

-- Insert new term relationships
INSERT INTO wp_term_relationships (object_id, term_taxonomy_id, term_order) VALUES
-- 1587: Business Debt Resolution (21), Customized Financing Solutions (23)
(1587, 21, 0), (1587, 23, 0),
-- 1786: Business Debt Resolution (21), Customized Financing Solutions (23), Conventional Loan Workouts (26)
(1786, 21, 0), (1786, 23, 0), (1786, 26, 0),
-- 1794: Business Debt Resolution (21), Customized Financing Solutions (23), Conventional Loan Workouts (26)
(1794, 21, 0), (1794, 23, 0), (1794, 26, 0),
-- 2598: Business Debt Resolution (21), Proactive MCA Resolution (31)
(2598, 21, 0), (2598, 31, 0),
-- 2863: Business Debt Resolution (21), Proactive MCA Resolution (31)
(2863, 21, 0), (2863, 31, 0),
-- 2865: Business Debt Resolution (21), Proactive MCA Resolution (31)
(2865, 21, 0), (2865, 31, 0),
-- 3040: Strategic Business Consulting (22)
(3040, 22, 0),
-- 3045: Business Debt Resolution (21)
(3045, 21, 0),
-- 3051: Business Debt Resolution (21)
(3051, 21, 0),
-- 3056: Business Debt Resolution (21)
(3056, 21, 0),
-- 3060: Strategic Business Consulting (22)
(3060, 22, 0),
-- 3934: Business Debt Resolution (21)
(3934, 21, 0),
-- 3975: Business Debt Resolution (21), Strategic Business Consulting (22), Customized Financing Solutions (23)
(3975, 21, 0), (3975, 22, 0), (3975, 23, 0),
-- 3978: Business Debt Resolution (21), Strategic Business Consulting (22), Customized Financing Solutions (23)
(3978, 21, 0), (3978, 22, 0), (3978, 23, 0),
-- 4011: Business Debt Resolution (21), Proactive MCA Resolution (31)
(4011, 21, 0), (4011, 31, 0),
-- 4053: Business Debt Resolution (21), Proactive MCA Resolution (31)
(4053, 21, 0), (4053, 31, 0),
-- 4064: Business Debt Resolution (21), Proactive MCA Resolution (31)
(4064, 21, 0), (4064, 31, 0),
-- 4075: Business Debt Resolution (21), Proactive MCA Resolution (31)
(4075, 21, 0), (4075, 31, 0),
-- 4092: Strategic Business Consulting (22)
(4092, 22, 0),
-- 4103: Business Debt Resolution (21), SBA Loan Workouts (33), SBA Offer in Compromise (34)
(4103, 21, 0), (4103, 33, 0), (4103, 34, 0),
-- 4105: Strategic Business Consulting (22)
(4105, 22, 0),
-- 4113: Business Debt Resolution (21)
(4113, 21, 0),
-- 4124: Business Debt Resolution (21)
(4124, 21, 0),
-- 4128: Business Debt Resolution (21), Proactive MCA Resolution (31)
(4128, 21, 0), (4128, 31, 0),
-- 4132: Business Debt Resolution (21), Proactive MCA Resolution (31)
(4132, 21, 0), (4132, 31, 0),
-- 4138: Business Debt Resolution (21)
(4138, 21, 0),
-- 4144: Business Debt Resolution (21)
(4144, 21, 0),
-- 4154: Business Debt Resolution (21), Customized Financing Solutions (23)
(4154, 21, 0), (4154, 23, 0),
-- 4157: Business Debt Resolution (21), Customized Financing Solutions (23)
(4157, 21, 0), (4157, 23, 0),
-- 4160: Business Debt Resolution (21), Customized Financing Solutions (23), Conventional Loan Workouts (26)
(4160, 21, 0), (4160, 23, 0), (4160, 26, 0),
-- 4163: Business Debt Resolution (21), Customized Financing Solutions (23)
(4163, 21, 0), (4163, 23, 0),
-- 4167: Business Debt Resolution (21), Strategic Business Consulting (22), Customized Financing Solutions (23)
(4167, 21, 0), (4167, 22, 0), (4167, 23, 0),
-- 4186: Business Debt Resolution (21), Proactive MCA Resolution (31)
(4186, 21, 0), (4186, 31, 0),
-- 4225: Strategic Business Consulting (22)
(4225, 22, 0),
-- 4284: Business Debt Resolution (21), Proactive MCA Resolution (31)
(4284, 21, 0), (4284, 31, 0),
-- 4311: Business Debt Resolution (21), Proactive MCA Resolution (31)
(4311, 21, 0), (4311, 31, 0),
-- 4328: Business Debt Resolution (21), Proactive MCA Resolution (31)
(4328, 21, 0), (4328, 31, 0),
-- 4339: Business Debt Resolution (21), Proactive MCA Resolution (31)
(4339, 21, 0), (4339, 31, 0),
-- 4343: Business Debt Resolution (21), Proactive MCA Resolution (31)
(4343, 21, 0), (4343, 31, 0),
-- 4356: Strategic Business Consulting (22)
(4356, 22, 0),
-- 4375: Strategic Business Consulting (22)
(4375, 22, 0),
-- 4405: Business Debt Resolution (21), Strategic Business Consulting (22), Customized Financing Solutions (23)
(4405, 21, 0), (4405, 22, 0), (4405, 23, 0),
-- 4412: Strategic Business Consulting (22)
(4412, 22, 0),
-- 4420: Strategic Business Consulting (22)
(4420, 22, 0),
-- 4425: Strategic Business Consulting (22)
(4425, 22, 0),
-- 4464: Business Debt Resolution (21), Customized Financing Solutions (23)
(4464, 21, 0), (4464, 23, 0),
-- 4474: Customized Financing Solutions (23)
(4474, 23, 0),
-- 4499: Business Debt Resolution (21), Strategic Business Consulting (22)
(4499, 21, 0), (4499, 22, 0),
-- 4504: Business Debt Resolution (21), Customized Financing Solutions (23), Proactive MCA Resolution (31)
(4504, 21, 0), (4504, 23, 0), (4504, 31, 0);

-- Update term counts
UPDATE wp_term_taxonomy tt
SET count = (
    SELECT COUNT(*) FROM wp_term_relationships tr
    WHERE tr.term_taxonomy_id = tt.term_taxonomy_id
)
WHERE tt.taxonomy = 'solution-types';
