Commit fff1001 1 parent 59aad9c commit fff1001 Copy full SHA for fff1001
File tree 1 file changed +5
-4
lines changed
classes/migration/upgrade/v3_5_0
1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 14
14
15
15
namespace APP \migration \upgrade \v3_5_0 ;
16
16
17
- use Illuminate \Database \Query \Builder ;
18
17
use Illuminate \Support \Facades \DB ;
19
18
use PKP \install \DowngradeNotSupportedException ;
20
19
use PKP \migration \Migration ;
@@ -26,11 +25,13 @@ class I10511_RemoveSeriesMenuItems extends Migration
26
25
*/
27
26
public function up (): void
28
27
{
28
+ $ seriesIds = DB ::table ('series ' )
29
+ ->select (DB ::raw ('CAST(series_id AS CHAR(20)) ' ));
30
+
29
31
$ invalidNavigationMenuItemIds = DB ::table ('navigation_menu_items ' )
30
32
->where ('type ' , 'NMI_TYPE_SERIES ' )
31
- ->whereNotIn ('path ' , function (Builder $ query ) {
32
- $ query ->select ('series_id ' )->from ('series ' );
33
- })->pluck ('navigation_menu_item_id ' );
33
+ ->whereNotIn ('path ' , $ seriesIds )
34
+ ->pluck ('navigation_menu_item_id ' );
34
35
35
36
if (!$ invalidNavigationMenuItemIds ->count ()) {
36
37
return ;
You can’t perform that action at this time.
0 commit comments