@@ -30,13 +30,6 @@ class WP_SQLite_DB extends wpdb {
3030 */
3131 private $ allow_unsafe_unquoted_parameters = true ;
3232
33- /**
34- * The application ID for the SQLite database.
35- *
36- * @see https://www.sqlite.org/pragma.html#pragma_application_id
37- */
38- const SQLITE_DB_APPLICATION_ID = 3948349 ;
39-
4033 /**
4134 * Connects to the SQLite database.
4235 *
@@ -313,28 +306,6 @@ public function db_connect( $allow_bail = true ) {
313306 if ( isset ( $ GLOBALS ['@pdo ' ] ) ) {
314307 $ pdo = $ GLOBALS ['@pdo ' ];
315308 }
316-
317- // Migrate the database file from the legacy default name (".ht.sqlite") to
318- // the new default name (".ht.sqlite.php"). This only runs when using the
319- // default file name and the new file does not already exist.
320- if ( ! defined ( 'DB_FILE ' ) && ! file_exists ( FQDB ) ) {
321- $ old_db_path = FQDBDIR . '.ht.sqlite ' ;
322-
323- if ( file_exists ( $ old_db_path ) ) {
324- if ( ! rename ( $ old_db_path , FQDB ) ) {
325- wp_die ( 'Failed to rename database file. ' , 'Error! ' );
326- }
327-
328- foreach ( array ( '-wal ' , '-shm ' ) as $ suffix ) {
329- if ( file_exists ( $ old_db_path . $ suffix ) ) {
330- if ( ! rename ( $ old_db_path . $ suffix , FQDB . $ suffix ) ) {
331- wp_die ( 'Failed to rename database file. ' , 'Error! ' );
332- }
333- }
334- }
335- }
336- }
337-
338309 if ( defined ( 'WP_SQLITE_AST_DRIVER ' ) && WP_SQLITE_AST_DRIVER ) {
339310 if ( null === $ this ->dbname || '' === $ this ->dbname ) {
340311 $ this ->bail (
@@ -350,10 +321,9 @@ public function db_connect( $allow_bail = true ) {
350321 try {
351322 $ connection = new WP_SQLite_Connection (
352323 array (
353- 'pdo ' => $ pdo ,
354- 'path ' => FQDB ,
355- 'journal_mode ' => defined ( 'SQLITE_JOURNAL_MODE ' ) ? SQLITE_JOURNAL_MODE : null ,
356- 'application_id ' => self ::SQLITE_DB_APPLICATION_ID ,
324+ 'pdo ' => $ pdo ,
325+ 'path ' => FQDB ,
326+ 'journal_mode ' => defined ( 'SQLITE_JOURNAL_MODE ' ) ? SQLITE_JOURNAL_MODE : null ,
357327 )
358328 );
359329 $ this ->dbh = new WP_SQLite_Driver ( $ connection , $ this ->dbname );
0 commit comments