Page MenuHome

Storage migration clean up: dropping storage_location fields
ClosedPublic

Authored by Anna Sirota (railla) on Oct 6 2020, 2:06 PM.

Details

Summary

This change removes unused storage_location fields and drops their columns from the database:

$ ./manage.py migrate --plan
Planned operations:
blog.0006_remove_storage_location_fields
    Remove field storage_location from revision
films.0035_remove_storage_location_fields
    Remove field storage_location from collection
    Remove field storage_location from film
    Remove field storage_location from productionlog
static_assets.0020_remove_storage_location_fields
    Remove field storage_location from staticasset
training.0025_remove_storage_location_fields
    Remove field storage_location from asset
    Remove field storage_location from training
    Remove field storage_location from video

See https://developer.blender.org/T81483 for more details.

Diff Detail

Event Timeline

Anna Sirota (railla) requested review of this revision.Oct 6 2020, 2:06 PM
Anna Sirota (railla) created this revision.
blog/migrations/0001_initial.py
96

Without storage_location being nullable it's not possible to downgrade this migration at all, this at least allows downgrade to run without raising integrity errors.
(this obviously doesn't make this change revertable, because storage_location values are lost nonetheless)

I'm fine with this, especially with the previous agreement that before going to production we will reset all migrations.

This revision is now accepted and ready to land.Oct 12 2020, 3:35 PM