File tree Expand file tree Collapse file tree 2 files changed +17
-17
lines changed
Expand file tree Collapse file tree 2 files changed +17
-17
lines changed Original file line number Diff line number Diff line change 1111 * Initialize a database table for the requests.
1212 * @return void
1313 */
14- function bluem_db_create_requests_table (): void {
15- global $ wpdb , $ bluem_db_version ;
16-
17- $ installed_ver = (float ) get_option ( "bluem_db_version " );
18-
19- if ( empty ( $ installed_ver ) || $ installed_ver < $ bluem_db_version ) {
20- $ charset_collate = $ wpdb ->get_charset_collate ();
21-
22- include_once ABSPATH . 'wp-admin/includes/upgrade.php ' ;
14+ function bluem_db_create_requests_table (): void
15+ {
16+ global $ bluem_db_version ;
2317
24- $ migrationRepository = new DatabaseMigrationRepository ();
25- foreach ($ migrationRepository ->getMigrations ($ installed_ver ) as $ migration ) {
26- dbDelta ($ migration ->sql );
27- }
18+ include_once ABSPATH . 'wp-admin/includes/upgrade.php ' ;
2819
29- update_option (
30- "bluem_db_version " ,
31- $ bluem_db_version
32- );
20+ $ repo = new DatabaseMigrationRepository ();
21+ foreach ($ repo ->getMigrations () as $ migration ) {
22+ dbDelta ($ migration ->sql );
3323 }
24+
25+ update_option (
26+ "bluem_db_version " ,
27+ $ bluem_db_version
28+ );
3429}
3530
3631function bluem_db_check () {
Original file line number Diff line number Diff line change 2525 "yoast/phpunit-polyfills" : " ^1.0" ,
2626 "vimeo/psalm" : " ^4.16"
2727 },
28+ "autoload" : {
29+ "psr-4" : {
30+ "Bluem\\ WooCommerce\\ " : " src"
31+ }
32+ },
2833 "config" : {
2934 "allow-plugins" : {
3035 "composer/package-versions-deprecated" : false
You can’t perform that action at this time.
0 commit comments