Changes between Initial Version and Version 1 of Ticket #34510


Ignore:
Timestamp:
Apr 22, 2023, 7:45:46 PM (19 months ago)
Author:
NeodymiumFerBore
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #34510

    • Property Cc NeodymiumFerBore added
  • Ticket #34510 – Description

    initial v1  
    1 The sqlmigrate command does not follow `replaces` in squashed migration, with original (squashed) migration files deleted. This ticket is roughly the same than #32205, #33583 and #31318. In #31318, the issue is marked as solved with commit [https://github.com/django/django/commit/d88365708c554efe3c786c3be6da1d9de916360f d883657]. Since then, `MigrationLoader` accepts the argument `replace_migrations`. However, [https://github.com/django/django/blob/d88365708c554efe3c786c3be6da1d9de916360f/django/core/management/commands/sqlmigrate.py#L37 the loader instance here] has this option to `False`. I don't see a command option to set it to `True`.
     1Hello!
     2
     3The `sqlmigrate` command does not follow `replaces` in squashed migration, with original (squashed) migration files deleted. This ticket is roughly the same than #32205, #33583 and #31318. In #31318, the issue is marked as solved with commit [https://github.com/django/django/commit/d88365708c554efe3c786c3be6da1d9de916360f d883657]. Since then, `MigrationLoader` accepts the argument `replace_migrations`. However, [https://github.com/django/django/blob/d88365708c554efe3c786c3be6da1d9de916360f/django/core/management/commands/sqlmigrate.py#L37 the loader instance here] has this option to `False`. I don't see a command option to set it to `True`.
    24
    35I tried to set it to `True` manually in 4.1.7, and it successfully showed SQL queries involved in the migration I wanted to inspect. `sqlmigrate.py` has not changed between 4.1.7 and 4.2, so I guess it also affects it.
Back to Top