1 | | > Before any code is added here |
2 | | It might have come unnoticed but there is the code already ;) |
3 | | https://github.com/django/django/blob/6f33f7dcf3ef20d0585bece747887c7054cf2189/django/db/backends/sqlite3/operations.py#L232-L257 |
4 | | |
5 | | > I think that we should add backend agnostics tests for the command that execute the provided SQL and assert it has the desired effects. |
6 | | One of the tests that I've added (django/tests/backends/tests.py:SequenceResetTest.test_reset_sequence) looks pretty backend agnostic to me: |
7 | | https://github.com/axil/django/blob/7de27842c038d087257ebdd8e964f8921cd68295/tests/backends/tests.py#L186-L203 |
8 | | I've improved it a bit now. |
9 | | |
10 | | >In a following commit the logic that identifies the sequences that need to be reset should be moved to the command itself |
11 | | Actually of the logic identifying the sequences has already been moved to the django.core.commands.sqlsequencerest: |
12 | | https://github.com/django/django/blob/6f33f7dcf3ef20d0585bece747887c7054cf2189/django/core/management/commands/sqlsequencereset.py#L17-L25 |
13 | | or to be precise to `app_config.get_models(include_auto_created=True)`. By that reason |
14 | | |