
ALTER TABLE was_item_category
ADD COLUMN `is_community` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'boolean to determine if a category is a community page' AFTER `item_type`,
ADD COLUMN `community_order` int(11) NOT NULL DEFAULT 0 COMMENT 'order of display' AFTER `is_community`;


UPDATE was_item_category
SET
  is_community = 1
WHERE
  item_category_slug IN ('affiliate-marketing', 'artificial-intelligence', 'email-marketing', 'ppc', 'seo', 'social-media-marketing', 'wordpress', 'youtube');



UPDATE was_item_category
SET
  community_order = CASE
    WHEN item_category_slug = 'social-media-marketing' THEN 1
    WHEN item_category_slug = 'wordpress' THEN 2
    WHEN item_category_slug = 'youtube' THEN 3
    WHEN item_category_slug = 'ppc' THEN 4
    WHEN item_category_slug = 'seo' THEN 5
    WHEN item_category_slug = 'affiliate-marketing' THEN 6
    WHEN item_category_slug = 'email-marketing' THEN 7
    WHEN item_category_slug = 'artificial-intelligence' THEN 8
  END
WHERE
  item_category_slug IN ('affiliate-marketing', 'artificial-intelligence', 'email-marketing', 'ppc', 'seo', 'social-media-marketing', 'wordpress', 'youtube');

