def sql_table_creation_suffix(self):
suffix = []
if django.VERSION < (1, 7):
if self.connection.settings_dict['TEST_CHARSET']:
suffix.append('CHARACTER SET {0}'.format(
self.connection.settings_dict['TEST_CHARSET']))
if self.connection.settings_dict['TEST_COLLATION']:
suffix.append('COLLATE {0}'.format(
self.connection.settings_dict['TEST_COLLATION']))
else:
test_settings = self.connection.settings_dict['TEST']
if test_settings['CHARSET']:
suffix.append('CHARACTER SET %s' % test_settings['CHARSET'])
if test_settings['COLLATION']:
suffix.append('COLLATE %s' % test_settings['COLLATION'])
return ' '.join(suffix)
评论列表
文章目录