'Build table-level CREATE options like ENGINE and COLLATE.'

def post_create_table(self, table):

    table_opts = []
    opts = dict(((k[(len(self.dialect.name) + 1):].upper(), v) for (k, v) in table.kwargs.items() if k.startswith(('%s_' % self.dialect.name))))
    for opt in topological.sort([('DEFAULT_CHARSET', 'COLLATE'), ('DEFAULT_CHARACTER_SET', 'COLLATE'), ('PARTITION_BY', 'PARTITIONS')], opts):
        arg = opts[opt]
        if (opt in _options_of_type_string):
            arg = ("'%s'" % arg.replace('\\', '\\\\').replace("'", "''"))
        if (opt in ('DATA_DIRECTORY', 'INDEX_DIRECTORY', 'DEFAULT_CHARACTER_SET', 'CHARACTER_SET', 'DEFAULT_CHARSET', 'DEFAULT_COLLATE', 'PARTITION_BY')):
            opt = opt.replace('_', '    ')
        joiner = '='
        if (opt in ('TABLESPACE', 'DEFAULT    CHARACTER    SET', 'CHARACTER    SET', 'COLLATE', 'PARTITION    BY', 'PARTITIONS')):
            joiner = '    '
        table_opts.append(joiner.join((opt, arg)))
    return '    '.join(table_opts)
