PluginProbe
seQura / 4.0.0
seQura v4.0.0
4.3.4 4.3.3 4.3.2 4.3.1 trunk 2.0.0 2.0.10 2.0.11 2.0.12 2.0.5 2.0.6 2.0.7 2.0.8 2.0.9 3.0.0 3.0.2 3.0.5 3.0.6 3.0.7 3.1.0 3.1.1 3.2.0 3.2.1 3.2.2 4.0.0 All 30 releases
sequra / src / Repositories / Migrations / class-migration.php

class-migration.php in seQura 4.0.0, at src/Repositories/Migrations/class-migration.php

44 lines 673 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Database migration interface
4 *
5 * @package SeQura/WC
6 * @subpackage SeQura/WC/Repositories/Migrations
7 */
8
9 namespace SeQura\WC\Repositories\Migrations;
10
11 /**
12 * Database migration interface
13 */
14 abstract class Migration {
15
16 /**
17 * Database session object.
18 *
19 * @var \wpdb
20 */
21 protected $db;
22
23 /**
24 * Constructor
25 *
26 * @param \wpdb $wpdb Database instance.
27 */
28 public function __construct( \wpdb $wpdb ) {
29 $this->db = $wpdb;
30 }
31
32 /**
33 * Get the plugin version when the changes were made.
34 */
35 abstract public function get_version(): string;
36
37 /**
38 * Run the migration.
39 *
40 * @throws \Throwable
41 */
42 abstract public function run(): void;
43 }
44