M_Alterfor5

The Membership 2 M Alterfor5 function.

Description

M_Alterfor5(); 

Usage

  1. if ( !function_exists( 'M_Alterfor5' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'membership-2/app_old/membershipincludes/classes/upgrade.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = M_Alterfor5(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/app_old/membershipincludes/classes/upgrade.php  
  1. function M_Alterfor6() { 
  2. global $wpdb; 
  3.  
  4. $sql = "ALTER TABLE " . membership_db_prefix($wpdb, 'membership_relationships') . " ADD `usinggateway` varchar(50) NULL DEFAULT 'admin' AFTER `order_instance`;"; 
  5. $wpdb->query( $sql ); 
  6.  
  7. $sql = "ALTER TABLE " . membership_db_prefix($wpdb, 'membership_relationships') . " ADD INDEX (`user_id`);"; 
  8. $wpdb->query( $sql ); 
  9.  
  10. $sql = "ALTER TABLE " . membership_db_prefix($wpdb, 'membership_relationships') . " ADD INDEX (`sub_id`);"; 
  11. $wpdb->query( $sql ); 
  12.  
  13. $sql = "ALTER TABLE " . membership_db_prefix($wpdb, 'membership_relationships') . " ADD INDEX (`usinggateway`)";; 
  14. $wpdb->query( $sql ); 
  15.  
  16. $sql = "CREATE TABLE IF NOT EXISTS `" . membership_db_prefix($wpdb, 'member_payments') . "` ( 
  17. `id` bigint(11) NOT NULL auto_increment,  
  18. `member_id` bigint(20) default NULL,  
  19. `sub_id` bigint(20) default NULL,  
  20. `level_id` bigint(20) default NULL,  
  21. `level_order` int(11) default NULL,  
  22. `paymentmade` datetime default NULL,  
  23. `paymentexpires` datetime default NULL,  
  24. PRIMARY KEY (`id`) 
  25. );"; 
  26.  
  27. $wpdb->query($sql); 
  28.  
  29.  
  30. function M_Alterfor5() { 
  31. global $wpdb; 
  32.  
  33. $sql = "CREATE TABLE IF NOT EXISTS `" . membership_db_prefix($wpdb, 'pings') . "` ( 
  34. `id` bigint(20) NOT NULL auto_increment,  
  35. `pingname` varchar(250) default NULL,  
  36. `pinginfo` text,  
  37. `pingtype` varchar(10) default NULL,  
  38. PRIMARY KEY (`id`) 
  39. );"; 
  40.  
  41. $wpdb->query($sql); 
  42.  
  43. $sql = "CREATE TABLE IF NOT EXISTS `" . membership_db_prefix($wpdb, 'ping_history') . "` ( 
  44. `id` bigint(20) NOT NULL auto_increment,  
  45. `ping_id` bigint(20) default NULL,  
  46. `ping_sent` timestamp NULL default NULL,  
  47. `ping_info` text,  
  48. `ping_return` text,