本文整理汇总了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');
}
}