PluginProbe
GiveWP – Donation Plugin and Fundraising Platform / 4.16.9
GiveWP – Donation Plugin and Fundraising Platform v4.16.9
4.16.9 4.16.8.1 4.16.8 4.16.7.2 4.16.7.1 4.16.7 4.16.6.1 4.16.6 4.16.5.1 4.16.5 4.16.4 4.16.3 4.16.2 4.16.1 4.16.0 4.15.5 4.15.4 4.15.3 4.15.2 4.15.1 4.15.0 2.3.0 2.3.1 2.3.2 2.30.0 All 255 releases
give / src / Log / Migrations / DeleteOldLogTables.php

DeleteOldLogTables.php in GiveWP – Donation Plugin and Fundraising Platform 4.16.9, at src/Log/Migrations/DeleteOldLogTables.php

48 lines 903 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Give\Log\Migrations;
4
5 use Give\Framework\Database\DB;
6 use Give\Framework\Migrations\Contracts\Migration;
7
8 /**
9 * Class DeleteOldLogTables
10 * @package Give\Log\Migrations
11 */
12 class DeleteOldLogTables extends Migration
13 {
14 /**
15 * @return string
16 */
17 public static function id()
18 {
19 return 'delete_old_log_tables';
20 }
21
22 /**
23 * @return string
24 */
25 public static function title()
26 {
27 return esc_html__('Delete give_logs and give_logmeta tables', 'give');
28 }
29
30 /**
31 * @return int
32 */
33 public static function timestamp()
34 {
35 return strtotime('2021-01-28 14:00');
36 }
37
38 public function run()
39 {
40 global $wpdb;
41
42 $logs_table = "{$wpdb->prefix}give_logs";
43 $logmeta_table = "{$wpdb->prefix}give_logmeta";
44
45 DB::query("DROP TABLE IF EXISTS {$logs_table}, {$logmeta_table};");
46 }
47 }
48