Index: django/db/models/fields/__init__.py
===================================================================
--- django/db/models/fields/__init__.py	(revision 4309)
+++ django/db/models/fields/__init__.py	(working copy)
@@ -417,6 +417,9 @@
                 raise validators.ValidationError, gettext_lazy("This field cannot be null.")
         return str(value)
 
+    def get_db_prep_save(self, value):
+        return Field.get_db_prep_save(self, str(value))
+
     def formfield(self, initial=None):
         return forms.CharField(max_length=self.maxlength, required=not self.blank, label=capfirst(self.verbose_name), initial=initial)
 
@@ -481,12 +484,12 @@
     def get_db_prep_save(self, value):
         # Casts dates into string format for entry into database.
         if isinstance(value, datetime.datetime):
-            if settings.DATABASE_ENGINE != 'oracle':
-                # Oracle does not need a string conversion
+            if settings.DATABASE_ENGINE not in ('oracle', 'firebird'):
+                # Oracle and Firebird does not need a string conversion
                 value = value.date().strftime('%Y-%m-%d')
         elif isinstance(value, datetime.date):
-            if settings.DATABASE_ENGINE != 'oracle':
-                # Oracle does not need a string conversion
+            if settings.DATABASE_ENGINE not in ('oracle', 'firebird'):
+                # Oracle and Firebird does not need a string conversion
                 value = value.strftime('%Y-%m-%d')
         return Field.get_db_prep_save(self, value)
 
@@ -524,8 +527,8 @@
             # neither database supports microseconds.
             if settings.DATABASE_ENGINE in ('mysql', 'oracle') and hasattr(value, 'microsecond'):
                 value = value.replace(microsecond=0)
-            # cx_Oracle wants the raw datetime instead of a string.
-            if settings.DATABASE_ENGINE != 'oracle':
+            # cx_Oracle and Firebird wants the raw datetime instead of a string.
+            if settings.DATABASE_ENGINE not in ('oracle', 'firebird'):
                 value = str(value)
         return Field.get_db_prep_save(self, value)
 
Index: django/db/models/query.py
===================================================================
--- django/db/models/query.py	(revision 4309)
+++ django/db/models/query.py	(working copy)
@@ -657,7 +657,10 @@
     else:
         cast_sql = '%s'
     try:
-        return '%s%s %s' % (table_prefix, field_name,
+        lookup_sql = '%s%s %s'
+        if (settings.DATABASE_ENGINE == 'firebird' and lookup_type[0] == 'i'):
+            lookup_sql = 'UPPER(%s%s) %s'
+        return lookup_sql % (table_prefix, field_name,
                             backend.OPERATOR_MAPPING[lookup_type] % cast_sql)
     except KeyError:
         pass
Index: django/core/management.py
===================================================================
--- django/core/management.py	(revision 4309)
+++ django/core/management.py	(working copy)
@@ -163,7 +163,7 @@
             # Make the definition (e.g. 'foo VARCHAR(30)') for this field.
             field_output = [style.SQL_FIELD(backend.quote_name(f.column)),
                 style.SQL_COLTYPE(col_type % rel_field.__dict__)]
-            field_output.append(style.SQL_KEYWORD('%sNULL' % (not f.null and 'NOT ' or '')))
+            field_output.append(style.SQL_KEYWORD('%sNULL' % (not f.null and 'NOT ' or 'DEFAULT ')))
             if f.unique and (not f.primary_key or backend.allows_unique_and_pk):
                 field_output.append(style.SQL_KEYWORD('UNIQUE'))
             if f.primary_key:
@@ -1177,7 +1177,7 @@
     index_output = []
     for f in fields:
         field_output = [backend.quote_name(f.name), data_types[f.get_internal_type()] % f.__dict__]
-        field_output.append("%sNULL" % (not f.null and "NOT " or ""))
+        field_output.append("%sNULL" % (not f.null and "NOT " or "DEFAULT "))
         if f.unique:
             field_output.append("UNIQUE")
         if f.primary_key:
