Archives June 10, 2021

Django Field Rename Migrations and Test Cases

Is there some trick to running Django test cases when you've got a RenameField later in the migration-stack? I feel like this has to be some obvious thing I'm missing...

With a migration (say 0058_big_restructure.py) which does this:


migrations.RenameField(
model_name='rfsource',
old_name='source_name',
new_name='follow_source_name',
),

and a previous migration, (say 0006_long_ago_change_that_populates_some_other_field.py) which doesn't explicitly reference the source_name ...

Continue reading

Previous day

June 5, 2021

Next day

Aug. 27, 2021

Archives