Open ewheeler opened 7 years ago
Here's some relevant notes/research. These were accurate in late October when the task was assigned to me but of course things may have changed since then. Specifically, new migrations might have been added that need special handling.
I found this article a useful overview -- https://simpleisbetterthancomplex.com/tutorial/2016/07/26/how-to-reset-migrations.html
There are 5 migrations (audit 0002 & 0007, notification 0002 & 0003, firms 0001) that create EmailTemplate
objects. They can be replaced with a single fixture file that's attached to this ticket as emails.json.txt
. The attachment fixtures.diff.txt
shows where to reference this file. I think the changes to FastTenantTestCase
that are in that diff have already been merged.
Other than the trigram index, I don’t think you’ll need any other migrations other than the initial ones.
There are a few functions laying around that are only referenced by migrations. When I came across these, I tried to add a comment using the word "squash" so that I could find them later. At present I only see two (both in partners/models.py
) but there might be more.
There are scattered indications in eTools about desire to take advantage of the squashing to rename things. For instance, there's this ticket: https://github.com/unicef/etools/issues/351
There are also references in the code to things that should get renamed. This is a good way to find them (finds both "rename" and "renaming") --
grep -ri renam *
Here's one I found but forgot to comment on --
audit.models.DetailedFindingInfo.micro_assesment
should be micro_assessment
(note additional s
)
after staging (pmp-redesign) is merged into master will be a good time to squash
take opportunity to rename any apps/tables/etc
see also https://github.com/unicef/etools-issues/issues/243
https://github.com/unicef/etools-issues/issues/147