Commit 1b077812 authored by Andrew Godwin's avatar Andrew Godwin
Browse files

Add feature for implied null (needed for Firebird backend)

parent a4737bf6
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -646,6 +646,9 @@ class BaseDatabaseFeatures(object):
    # Suffix for backends that don't support "SELECT xxx;" queries.
    bare_select_suffix = ''

    # If NULL is implied on columns without needing to be explicitly specified
    implied_column_null = False

    uppercases_column_names = True

    def __init__(self, connection):
+2 −2
Original line number Diff line number Diff line
@@ -132,9 +132,9 @@ class BaseDatabaseSchemaEditor(object):
        if (field.empty_strings_allowed and not field.primary_key and
                self.connection.features.interprets_empty_strings_as_nulls):
            null = True
        if null:
        if null and not self.connection.features.implied_column_null:
            sql += " NULL"
        else:
        elif not null:
            sql += " NOT NULL"
        # Primary key/unique outputs
        if field.primary_key: