Index: django/db/models/fields/__init__.py
===================================================================
--- django/db/models/fields/__init__.py	(revision 13353)
+++ django/db/models/fields/__init__.py	(working copy)
@@ -195,6 +195,13 @@
         self.run_validators(value)
         return value
 
+    def _internal_to_db_type(self, internal_type, connection):
+        data = DictWrapper(self.__dict__, connection.ops.quote_name, "qn_")
+        try:
+            return connection.creation.data_types[internal_type] % data
+        except KeyError:
+            return None
+
     def db_type(self, connection):
         """
         Returns the database column data type for this field, for the provided
@@ -215,12 +222,14 @@
         # mapped to one of the built-in Django field types. In this case, you
         # can implement db_type() instead of get_internal_type() to specify
         # exactly which wacky database column type you want to use.
-        data = DictWrapper(self.__dict__, connection.ops.quote_name, "qn_")
-        try:
-            return connection.creation.data_types[self.get_internal_type()] % data
-        except KeyError:
-            return None
+        return self._internal_to_db_type(self.get_internal_type(), connection)
 
+    def rel_db_type(self, connection):
+        """
+        Returns the database column data type for related field referencing to this.
+        """
+        return self.db_type(connection)
+
     def unique(self):
         return self._unique or self.primary_key
     unique = property(unique)
@@ -459,6 +468,9 @@
         kwargs['blank'] = True
         Field.__init__(self, *args, **kwargs)
 
+    def rel_db_type(self, connection):
+        return self._internal_to_db_type('IntegerField', connection)
+
     def to_python(self, value):
         if value is None:
             return value
@@ -963,6 +975,11 @@
     def get_internal_type(self):
         return "PositiveIntegerField"
 
+    def rel_db_type(self, connection):
+        if connection.features.related_fields_match_type:
+            return self.db_type(connection)
+        return self._internal_to_db_type('IntegerField', connection)
+
     def formfield(self, **kwargs):
         defaults = {'min_value': 0}
         defaults.update(kwargs)
@@ -973,6 +990,11 @@
     def get_internal_type(self):
         return "PositiveSmallIntegerField"
 
+    def rel_db_type(self, connection):
+        if connection.features.related_fields_match_type:
+            return self.db_type(connection)
+        return self._internal_to_db_type('IntegerField', connection)
+
     def formfield(self, **kwargs):
         defaults = {'min_value': 0}
         defaults.update(kwargs)
Index: django/db/models/fields/related.py
===================================================================
--- django/db/models/fields/related.py	(revision 13353)
+++ django/db/models/fields/related.py	(working copy)
@@ -894,19 +894,8 @@
         return super(ForeignKey, self).formfield(**defaults)
 
     def db_type(self, connection):
-        # The database column type of a ForeignKey is the column type
-        # of the field to which it points. An exception is if the ForeignKey
-        # points to an AutoField/PositiveIntegerField/PositiveSmallIntegerField,
-        # in which case the column type is simply that of an IntegerField.
-        # If the database needs similar types for key fields however, the only
-        # thing we can do is making AutoField an IntegerField.
         rel_field = self.rel.get_related_field()
-        if (isinstance(rel_field, AutoField) or
-                (not connection.features.related_fields_match_type and
-                isinstance(rel_field, (PositiveIntegerField,
-                                       PositiveSmallIntegerField)))):
-            return IntegerField().db_type(connection=connection)
-        return rel_field.db_type(connection=connection)
+        return rel_field.rel_db_type(connection=connection)
 
 class OneToOneField(ForeignKey):
     """
