Ticket #11455: rename-sql-table-creation-suffix.diff

File rename-sql-table-creation-suffix.diff, 2.2 KB (added by seveas, 6 years ago)
  • django/db/backends/postgresql/creation.py

     
    2929        'TimeField':         'time',
    3030    }
    3131
    32     def sql_table_creation_suffix(self):
     32    def sql_test_db_creation_suffix(self):
    3333        assert settings.TEST_DATABASE_COLLATION is None, "PostgreSQL does not support collation setting at database creation time."
    3434        if settings.TEST_DATABASE_CHARSET:
    3535            return "WITH ENCODING '%s'" % settings.TEST_DATABASE_CHARSET
  • django/db/backends/mysql/creation.py

     
    2929        'TimeField':         'time',
    3030    }
    3131
    32     def sql_table_creation_suffix(self):
     32    def sql_test_db_creation_suffix(self):
    3333        suffix = []
    3434        if settings.TEST_DATABASE_CHARSET:
    3535            suffix.append('CHARACTER SET %s' % settings.TEST_DATABASE_CHARSET)
     
    6363                field.rel.to._meta.db_table, field.rel.to._meta.pk.column)
    6464            ]
    6565        return table_output, deferred
    66        
    67  No newline at end of file
     66       
  • django/db/backends/creation.py

     
    348348
    349349    def _create_test_db(self, verbosity, autoclobber):
    350350        "Internal implementation - creates the test db tables."
    351         suffix = self.sql_table_creation_suffix()
     351        suffix = self.sql_test_db_creation_suffix()
    352352
    353353        if settings.TEST_DATABASE_NAME:
    354354            test_database_name = settings.TEST_DATABASE_NAME
     
    433433        elif hasattr(self.connection.connection, "set_isolation_level"):
    434434            self.connection.connection.set_isolation_level(0)
    435435
    436     def sql_table_creation_suffix(self):
     436    def sql_test_db_creation_suffix(self):
    437437        "SQL to append to the end of the test table creation statements"
    438438        return ''
    439439
Back to Top