diff --git a/packages/core/database/state/EnsureMediaCollectionsAreRenamed.php b/packages/core/database/state/EnsureMediaCollectionsAreRenamed.php index 9701b71553..3993a6bea0 100644 --- a/packages/core/database/state/EnsureMediaCollectionsAreRenamed.php +++ b/packages/core/database/state/EnsureMediaCollectionsAreRenamed.php @@ -35,7 +35,7 @@ protected function shouldRun() protected function getOutdatedMediaQuery() { return DB::table(app(config('media-library.media_model'))->getTable()) - ->whereIn('model_type', [Product::class, Collection::class, Brand::class]) + ->whereIn('model_type', [Product::morphName(), Collection::morphName(), Brand::morphName()]) ->where('collection_name', 'products'); } }