zulip/zerver
Steve Howell 02252c255a db tools: Use common scheme for digests.
We have two different digest schemes to make
sure we keep the database up to date.  There
is the migration digest, which is NOT in the
scope of this commit, and which already
used the mechanism we use for other tools.

Here we are talking about the digest for
important files like `populate_db.py`.

Now our scheme is more consistent with how we
check file changes for other tools (as
well as the aformentioned migration files).

And we only write one hash file, instead of
seven.

And we only write the file when things have
actually changed.

And we are explicit about side effects.

Finally, we include a couple new bot settings
in the digest:

    INTERNAL_BOTS
    DISABLED_REALM_INTERNAL_BOTS

NOTE: This will require a one-time transition,
where we rebuild both databases (dev/test).
It takes a little over two minutes for me,
so it's not super painful.

I bump the provision version here, even
though you don't technically need it (since
the relevant tools are actually using the
digest files to determine if they need to
rebuild the database).  I figure it's just
good to explicitly make this commit trigger
a provision, and the user will then see
the one-time migration of the hash files
with a little bit less of a surprise.

And I do a major bump, not a minor bump,
because when we go in the reverse direction,
the old code will have to rebuild the
database due to the legacy hash files not
being around, so, again, I just prefer it
to be explicit.
2020-04-22 14:41:42 -07:00
..
data_import python: Convert assignment type annotations to Python 3.6 style. 2020-04-22 11:02:32 -07:00
lib db tools: Use common scheme for digests. 2020-04-22 14:41:42 -07:00
management python: Convert assignment type annotations to Python 3.6 style. 2020-04-22 11:02:32 -07:00
migrations python: Convert assignment type annotations to Python 3.6 style. 2020-04-22 11:02:32 -07:00
openapi python: Convert assignment type annotations to Python 3.6 style. 2020-04-22 11:02:32 -07:00
templatetags python: Convert assignment type annotations to Python 3.6 style. 2020-04-22 11:02:32 -07:00
tests python: Convert assignment type annotations to Python 3.6 style. 2020-04-22 11:02:32 -07:00
tornado python: Convert assignment type annotations to Python 3.6 style. 2020-04-22 11:02:32 -07:00
views python: Convert assignment type annotations to Python 3.6 style. 2020-04-22 11:02:32 -07:00
webhooks python: Convert assignment type annotations to Python 3.6 style. 2020-04-22 11:02:32 -07:00
worker python: Convert assignment type annotations to Python 3.6 style. 2020-04-22 11:02:32 -07:00
__init__.py
apps.py python: Convert assignment type annotations to Python 3.6 style. 2020-04-22 11:02:32 -07:00
context_processors.py python: Convert assignment type annotations to Python 3.6 style. 2020-04-22 11:02:32 -07:00
decorator.py python: Convert assignment type annotations to Python 3.6 style. 2020-04-22 11:02:32 -07:00
filters.py cleanup: Delete leading newlines. 2019-08-06 23:29:11 -07:00
forms.py python: Convert assignment type annotations to Python 3.6 style. 2020-04-22 11:02:32 -07:00
logging_handlers.py python: Convert assignment type annotations to Python 3.6 style. 2020-04-22 11:02:32 -07:00
middleware.py python: Convert assignment type annotations to Python 3.6 style. 2020-04-22 11:02:32 -07:00
models.py python: Convert assignment type annotations to Python 3.6 style. 2020-04-22 11:02:32 -07:00
signals.py emails: Translate from_name of account security emails. 2020-02-18 17:45:33 -08:00