/**
  * Deletes group-option-categories and/or group-options which where installed by the package.
  */
 public function uninstall()
 {
     // Delete value-entries using categories or options
     // which will be deleted.
     $sql = "DELETE FROM\twcf" . WCF_N . "_user_group_option_value\n\t\t\tWHERE\t\toptionID IN (\n\t\t\t\t\t\tSELECT\toptionID\n\t\t\t\t\t\tFROM\twcf" . WCF_N . "_user_group_option\n\t\t\t\t\t\tWHERE\tpackageID = ?\n\t\t\t\t\t)";
     $statement = WCF::getDB()->prepareStatement($sql);
     $statement->execute(array($this->installation->getPackageID()));
     parent::uninstall();
 }
 /**
  * Drops the columns from user option value table from options
  * installed by this package.
  */
 public function uninstall()
 {
     // get optionsIDs from package
     $sql = "SELECT\toptionID\n\t\t\tFROM \twcf" . WCF_N . "_user_option\n\t\t\tWHERE\tpackageID = ?";
     $statement = WCF::getDB()->prepareStatement($sql);
     $statement->execute(array($this->installation->getPackageID()));
     while ($row = $statement->fetchArray()) {
         WCF::getDB()->getEditor()->dropColumn('wcf' . WCF_N . '_user_option_value', 'userOption' . $row['optionID']);
     }
     // uninstall options and categories
     parent::uninstall();
 }