SEED-platform / seed

Standard Energy Efficiency Data (SEED) Platform™ is a web-based application that helps organizations easily manage data on the energy performance of large groups of buildings.
Other
107 stars 55 forks source link

Squash Accountability Hierarchy Migrations #4560

Closed kflemin closed 6 months ago

kflemin commented 7 months ago

Squash AH migrations into single migrations (1 in migrations, 1 in superperms migrations, and 1 in data_importer migrations) This is ordered correctly with the develop branch as of now!

Note that this reorders the migrations from what's on AH/develop right now, so you'll need to drop your database and start over.

axelstudios commented 6 months ago

I fixed the migrations:

Running migrations:
  Applying orgs.0030_accountability_hierarchy... OK
  Applying data_importer.0019_accountability_hierarchy... OK
  Applying seed.0215_accountability_hierarchy... OK

Now I'm working on performance

axelstudios commented 6 months ago

I downloaded the prod database, restored it locally, ran all develop migrations, and then ran these AH migrations.

The 0215_accountability_hierarchy migration takes approximately 34 minutes to run (before I added the update_fields=['access_level_instance'] optimization)