ALTER TABLE lot_partnumbers
    DROP COLUMN IF EXISTS is_primary_pn;

ALTER TABLE qt_partnumber_book_items
    DROP COLUMN IF EXISTS is_primary_pn;
