PluginProbe
seQura / 3.2.0
seQura v3.2.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 3.2.0, at src/Repositories/Migrations/class-migration.php

54 lines 921 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 use SeQura\WC\Core\Extension\Infrastructure\Configuration\Configuration;
12
13 /**
14 * Database migration interface
15 */
16 abstract class Migration {
17
18 /**
19 * Database session object.
20 *
21 * @var \wpdb
22 */
23 protected $db;
24
25 /**
26 * Configuration service.
27 *
28 * @var Configuration
29 */
30 protected $configuration;
31
32 /**
33 * Constructor
34 *
35 * @param \wpdb $wpdb Database instance.
36 */
37 public function __construct( \wpdb $wpdb, Configuration $configuration ) {
38 $this->db = $wpdb;
39 $this->configuration = $configuration;
40 }
41
42 /**
43 * Get the plugin version when the changes were made.
44 */
45 abstract public function get_version(): string;
46
47 /**
48 * Run the migration.
49 *
50 * @throws \Throwable
51 */
52 abstract public function run(): void;
53 }
54