'Extend a string-type declaration with standard SQL
COLLATE annotations.'

def _extend(self, spec, type_, length=None):

    if getattr(type_, 'collation', None):
        collation = ('COLLATE    %s' % type_.collation)
    else:
        collation = None
    if (not length):
        length = type_.length
    if length:
        spec = (spec + ('(%s)' % length))
    return '    '.join([c for c in (spec, collation) if (c is not None)])
