We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fac0506 commit 4b5f383Copy full SHA for 4b5f383
1 file changed
wp-includes/sqlite/install-functions.php
@@ -18,6 +18,8 @@
18
* @throws PDOException If the database connection fails.
19
*/
20
function sqlite_make_db_sqlite() {
21
+ global $wpdb;
22
+
23
include_once ABSPATH . 'wp-admin/includes/schema.php';
24
25
$table_schemas = wp_get_db_schema();
@@ -31,8 +33,17 @@ function sqlite_make_db_sqlite() {
31
33
wp_die( $message, 'Database Error!' );
32
34
}
35
- $translator = new WP_SQLite_Translator( $pdo );
- $query = null;
36
+ if ( defined( 'WP_SQLITE_AST_DRIVER' ) && WP_SQLITE_AST_DRIVER ) {
37
+ $translator = new WP_SQLite_Driver(
38
+ array(
39
+ 'database' => $wpdb->dbname,
40
+ 'connection' => $pdo,
41
+ )
42
+ );
43
+ } else {
44
+ $translator = new WP_SQLite_Translator( $pdo );
45
+ }
46
+ $query = null;
47
48
try {
49
$translator->begin_transaction();
0 commit comments