2013/1/1 Andrew Godwin <notifications@github.com>

> In django/db/backends/schema.py:
>
> > +    def column_sql(self, model, field, include_default=False):
> > +        """
> > +        Takes a field and returns its column definition.
> > +        The field must already have had set_attributes_from_name called.
> > +        """
> > +        # Get the column's type and use that as the basis of the SQL
> > +        db_params = field.db_parameters(connection=self.connection)
> > +        sql = db_params['type']
> > +        params = []
> > +        # Check for fields that aren't actually columns (e.g. M2M)
> > +        if sql is None:
> > +            return None
> > +        # Optionally add the tablespace if it's an implicitly indexed column
> > +        tablespace = field.db_tablespace or model._meta.db_tablespace
> > +        if tablespace and self.connection.features.supports_tablespaces and field.unique:
> > +            sql += " %s" % self.connection.ops.tablespace_sql(tablespace, inline=True)
>
> Alright, you're probably right - it's best not to rely on everything being
> sane in future (who knows what other DBs will do). Perhaps just a simple
> dict-like structure would work?
>
> FirebirdSQL has the same problem. And yes, I was thinking that a dict
structure might work.
I my case, PositiveIntegerField, fail (with south) on set default value,
because DEFAULT must be before of CHECK clause.