diff options
Diffstat (limited to 'django/db/backends/postgresql/creation.py')
-rw-r--r-- | django/db/backends/postgresql/creation.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/django/db/backends/postgresql/creation.py b/django/db/backends/postgresql/creation.py new file mode 100644 index 0000000000..13eea0d3b7 --- /dev/null +++ b/django/db/backends/postgresql/creation.py @@ -0,0 +1,13 @@ +from django.db.backends.base.creation import BaseDatabaseCreation + + +class DatabaseCreation(BaseDatabaseCreation): + + def sql_table_creation_suffix(self): + test_settings = self.connection.settings_dict['TEST'] + assert test_settings['COLLATION'] is None, ( + "PostgreSQL does not support collation setting at database creation time." + ) + if test_settings['CHARSET']: + return "WITH ENCODING '%s'" % test_settings['CHARSET'] + return '' |