diff options
author | Stephen Finucane <stephen@that.guru> | 2020-04-10 12:08:32 +0100 |
---|---|---|
committer | Stephen Finucane <stephen@that.guru> | 2020-04-26 13:56:38 +0100 |
commit | 9bb5caec4180f70f0d941580553994d7e36ca6f9 (patch) | |
tree | ebfbc1b97d50d1a4d26ae2a10bf9e72fafc6287d /requirements-dev.txt | |
parent | 0910f9771113b7b6228b745ba9a74bd77f9b68ea (diff) | |
download | patchwork-9bb5caec4180f70f0d941580553994d7e36ca6f9.tar patchwork-9bb5caec4180f70f0d941580553994d7e36ca6f9.tar.gz |
migrations: Squash 0001 to 0040
Now that we're moving a new major version, we can squash the migrations
we have to date. This coexists alongside the old migrations, which we
can remove and replace entirely when we release 4.0, per the advice of
the 'squashmigrations' tool.
You should commit this migration but leave the old ones in place; the
new migration will be used for new installs. Once you are sure all
instances of the codebase have applied the migrations you squashed,
you can delete them.
The 'squashmigrations' tool can't parse the output of 'RunPython' blocks
so the output of the tool was less optimized than it could be. As a
result, we've manually modified this change to remove the 'RunPython'
block and unnecessary 'AlterField' entries. This was done by removing
all migrations and generating a new "initial" migration, which was then
modified to mark all strings as byte strings (as they were when we were
using Python 2 to generate these migrations) so that 0041 would apply
cleanly.
The main benefit of this change is that it significantly reduces the
startup time for unit tests. Executed on my host, the run time for a
single test goes from ~ 22 seconds to ~ 14 seconds. This is obviously
reduced for additional tests.
Signed-off-by: Stephen Finucane <stephen@that.guru>
Diffstat (limited to 'requirements-dev.txt')
0 files changed, 0 insertions, 0 deletions