PluginProbe
Independent Analytics – WordPress Analytics Plugin / 1.30.1
Independent Analytics – WordPress Analytics Plugin v1.30.1
2.15.5 2.15.4 2.15.3 2.15.2 2.15.1 2.15.0 2.14.10 trunk 1.1 1.10 1.10.1 1.11 1.12 1.13 1.14 1.15 1.16 1.17 1.17.1 1.17.2 1.17.3 1.17.4 1.18 1.18.1 1.19.0 All 120 releases
independent-analytics / IAWP / Migrations / Migration_8.php
Migration_8.php
24 lines 776 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace IAWP_SCOPED\IAWP\Migrations;
4
5 use IAWP_SCOPED\IAWP\Query;
6 class Migration_8 extends Migration
7 {
8 /**
9 * @var string
10 */
11 protected $database_version = '8';
12 /**
13 * @return void
14 */
15 protected function handle() : void
16 {
17 global $wpdb;
18 $charset_collate = $wpdb->get_charset_collate();
19 $wc_orders_table = Query::get_table_name(Query::WC_ORDERS);
20 $wpdb->query("DROP TABLE IF EXISTS {$wc_orders_table};");
21 $wpdb->query("CREATE TABLE {$wc_orders_table} (\n order_id bigint(20) UNSIGNED NOT NULL,\n view_id bigint(20) UNSIGNED NOT NULL,\n created_at datetime NOT NULL,\n PRIMARY KEY (order_id)\n ) {$charset_collate};");
22 }
23 }
24