Ticket #11455: rename-sql-table-creation-suffix.diff
File rename-sql-table-creation-suffix.diff, 2.2 KB (added by , 15 years ago) |
---|
-
django/db/backends/postgresql/creation.py
29 29 'TimeField': 'time', 30 30 } 31 31 32 def sql_t able_creation_suffix(self):32 def sql_test_db_creation_suffix(self): 33 33 assert settings.TEST_DATABASE_COLLATION is None, "PostgreSQL does not support collation setting at database creation time." 34 34 if settings.TEST_DATABASE_CHARSET: 35 35 return "WITH ENCODING '%s'" % settings.TEST_DATABASE_CHARSET -
django/db/backends/mysql/creation.py
29 29 'TimeField': 'time', 30 30 } 31 31 32 def sql_t able_creation_suffix(self):32 def sql_test_db_creation_suffix(self): 33 33 suffix = [] 34 34 if settings.TEST_DATABASE_CHARSET: 35 35 suffix.append('CHARACTER SET %s' % settings.TEST_DATABASE_CHARSET) … … 63 63 field.rel.to._meta.db_table, field.rel.to._meta.pk.column) 64 64 ] 65 65 return table_output, deferred 66 67 No newline at end of file 66 -
django/db/backends/creation.py
348 348 349 349 def _create_test_db(self, verbosity, autoclobber): 350 350 "Internal implementation - creates the test db tables." 351 suffix = self.sql_t able_creation_suffix()351 suffix = self.sql_test_db_creation_suffix() 352 352 353 353 if settings.TEST_DATABASE_NAME: 354 354 test_database_name = settings.TEST_DATABASE_NAME … … 433 433 elif hasattr(self.connection.connection, "set_isolation_level"): 434 434 self.connection.connection.set_isolation_level(0) 435 435 436 def sql_t able_creation_suffix(self):436 def sql_test_db_creation_suffix(self): 437 437 "SQL to append to the end of the test table creation statements" 438 438 return '' 439 439