diff -r 7d5687126d6d django/db/backends/creation.py
a
|
b
|
|
247 | 247 | verbosity=max(verbosity - 1, 0), |
248 | 248 | interactive=False, |
249 | 249 | database=self.connection.alias) |
250 | | |
| 250 | |
251 | 251 | # One effect of calling syncdb followed by flush is that the id of the |
252 | 252 | # default site may or may not be 1, depending on how the sequence was |
253 | 253 | # reset. If the sites app is loaded, then we coerce it. |
… |
… |
|
351 | 351 | self.connection.connection.autocommit(True) |
352 | 352 | else: |
353 | 353 | self.connection.connection.autocommit = True |
354 | | elif hasattr(self.connection.connection, "set_isolation_level"): |
355 | | self.connection.connection.set_isolation_level(0) |
356 | 354 | |
357 | 355 | def sql_table_creation_suffix(self): |
358 | 356 | "SQL to append to the end of the test table creation statements" |
diff -r 7d5687126d6d django/db/backends/postgresql_psycopg2/creation.py
a
|
b
|
|
76 | 76 | else: |
77 | 77 | output = [] |
78 | 78 | return output |
| 79 | |
| 80 | def set_autocommit(self): |
| 81 | self.connection.connection.set_isolation_level(0) |