本文整理匯總了PHP中GFForms::drop_index方法的典型用法代碼示例。如果您正苦於以下問題:PHP GFForms::drop_index方法的具體用法?PHP GFForms::drop_index怎麽用?PHP GFForms::drop_index使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類GFForms
的用法示例。
在下文中一共展示了GFForms::drop_index方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: upgrade_payment
private function upgrade_payment($previous_versions)
{
global $wpdb;
$charset_collate = GFFormsModel::get_db_charset();
$sql = "CREATE TABLE {$wpdb->prefix}gf_addon_payment_transaction (\n id int(10) unsigned not null auto_increment,\n lead_id int(10) unsigned not null,\n transaction_type varchar(30) not null,\n transaction_id varchar(50),\n is_recurring tinyint(1) not null default 0,\n amount decimal(19,2),\n date_created datetime,\n PRIMARY KEY (id),\n KEY lead_id (lead_id),\n KEY transaction_type (transaction_type),\n KEY type_lead (lead_id,transaction_type)\n ) {$charset_collate};";
GFFormsModel::dbDelta($sql);
if ($this->_supports_callbacks) {
$sql = "CREATE TABLE {$wpdb->prefix}gf_addon_payment_callback (\n id int(10) unsigned not null auto_increment,\n lead_id int(10) unsigned not null,\n addon_slug varchar(250) not null,\n callback_id varchar(250),\n date_created datetime,\n PRIMARY KEY (id),\n KEY addon_slug_callback_id (addon_slug(50),callback_id(100))\n ) {$charset_collate};";
GFFormsModel::dbDelta($sql);
//droping legacy index
GFForms::drop_index("{$wpdb->prefix}gf_addon_payment_callback", 'slug_callback_id');
}
}