(db_name)
| 1196 | |
| 1197 | @staticmethod |
| 1198 | def _reset_sequences(db_name): |
| 1199 | conn = connections[db_name] |
| 1200 | if conn.features.supports_sequence_reset: |
| 1201 | sql_list = conn.ops.sequence_reset_by_name_sql( |
| 1202 | no_style(), conn.introspection.sequence_list() |
| 1203 | ) |
| 1204 | if sql_list: |
| 1205 | with transaction.atomic(using=db_name): |
| 1206 | with conn.cursor() as cursor: |
| 1207 | for sql in sql_list: |
| 1208 | cursor.execute(sql) |
| 1209 | |
| 1210 | @classmethod |
| 1211 | def _fixture_setup(cls): |
no test coverage detected