 TRUNCATE department;
 INSERT INTO department (name, slug, pos)
 SELECT DISTINCT chapter,
-                REPLACE(REPLACE(LOWER(chapter), '&', 'and'), ' ', '-'),
+                slug(chapter),
                 0
   FROM mac_catalog
  WHERE category != '';

-- Load the catalog
TRUNCATE TABLE mac_catalog;
LOAD DATA LOCAL INFILE 'Gen_Catalog.txt'

                  WHERE parent IS NULL
                    AND name = chapter) dept,
                category,
                slug(category),
                0
  FROM mac_catalog
 WHERE category != '';
