join('profiles', 'profiles.id', '=', 'statuses.profile_id') ->leftJoin('users', 'users.id', '=', 'profiles.user_id') ->where('statuses.local', true) ->where('statuses.type', 'share') ->whereNull('users.id') ->update(['statuses.local' => false]); } public function down(): void { // No down migration needed since this is a data fix } };