PluginProbe
StoreEngine — Complete eCommerce Solution with Memberships, Licensing, Affiliates & More / 2.1.0
StoreEngine — Complete eCommerce Solution with Memberships, Licensing, Affiliates & More v2.1.0
2.3.0 2.2.0 2.1.1 2.1.0 2.0.0 1.10.0 1.9.1 1.9.0 1.2.1 1.2.2 1.3.0 1.3.1 1.3.2 1.3.3 1.4.0 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.5.5 1.5.6 1.5.7 1.5.8 1.6.0 All 59 releases
storeengine / includes / database / create-customer-lookup.php

create-customer-lookup.php in StoreEngine — Complete eCommerce Solution with Memberships, Licensing, Affiliates & More 2.1.0, at includes/database/create-customer-lookup.php

33 lines 897 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace StoreEngine\Database;
3
4 if ( ! defined( 'ABSPATH' ) ) {
5 exit;
6 }
7
8 class CreateCustomerLookup {
9
10 public static function up( $prefix, $charset_collate ) {
11 $table_name = $prefix . 'storeengine_customer_lookup';
12 $sql = "CREATE TABLE IF NOT EXISTS {$table_name} (
13 `customer_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
14 `user_id` bigint(20) unsigned DEFAULT NULL,
15 `first_name` varchar(100),
16 `last_name` varchar(100),
17 `email` varchar(100),
18 `phone` varchar(32) DEFAULT NULL,
19 `date_last_active` timestamp NULL DEFAULT NULL,`date_registered` timestamp NULL DEFAULT NULL,
20 `country` varchar(20),
21 `postcode` varchar(20),
22 `city` varchar(100),
23 `state` varchar(100),
24 PRIMARY KEY (`customer_id`),
25 UNIQUE KEY `user_id` (`user_id`),
26 UNIQUE KEY `email` (`email`),
27 KEY `phone` (`phone`)
28 ) $charset_collate;";
29
30 dbDelta( $sql );
31 }
32 }
33