zulip/zproject
Aditya Bansal 872e8c1d7b test_fixtures: Fix bug with run_db_migrations for test platform.
In this commit we are fixing a kinda serious un-noticed bug with
the way run_db_migrations worked for test db.
Basically run_db_migrations runs new migrations on db (dev or test).
When we talk about the dev platform this process is straight forward.
We have a single DB zulip which was once created and now has some data.
Introduction of new migration causes a schema change or does something
else but bottom line being we just migrate the zulip DB and stuff works
fine.

Now coming to zulip test db (zulip_test) situation is a bit complex
in comparision to dev db. Basically this is because we make use of
what we call zulip_test_template to make test fixture restoration
after tests run fast. Now before we introduced the performance
optimisation of just doing migrations when possible, introduction of
a migration would ideally result in provisioning do a full rebuild of
the test database. When that used to happen sequence of events used to
be something like this:
* Create a zulip_test db from zulip_test_base template (An absolute
basic schema holding)
* Migrate and populate the zulip_test db.
* Create/Re-create zulip_test_template from the latest zulip_test.

Now after we introduced just do migrations instead of full db rebuild
when possible, what used to happen was that zulip_test db got
successfully migrated but when test suites would run they would try to
create zulip_test from zulip_test_template (so that individual tests
don't affect each other on db level).
This is where the problem resides; zulip_test_template wasn't migrated
and we just scrapped zulip_test and re-created it using
zulip_test_template as a template and hence zulip_test will not hold the
latest schema.

This is what we fix in this commit.
2018-07-09 14:17:53 +05:30
..
jinja2 zproject: Change use of typing.Text to str. 2018-05-10 14:19:49 -07:00
__init__.py
backends.py auth: Restore a minimal SocialAuthMixin. 2018-07-03 18:53:59 +02:00
dev_settings.py zilencer: Clean up logic around mobile push notifications signup. 2018-05-05 16:42:00 -07:00
dev_urls.py casper: Show casper debug files in the dev server. 2018-06-04 09:02:58 -07:00
email_backends.py requirements: Upgrade pyflakes to 2.0.0. 2018-05-24 11:31:36 -07:00
legacy_urls.py urls: Move the json/fetch_api_key endpoint to be an API-style route. 2018-01-08 13:15:52 -05:00
prod_settings_template.py docs: Extract documentation for file upload backends. 2018-05-16 15:00:54 -07:00
settings.py webpack: Remove app files from settings.py in django. 2018-07-07 08:00:34 +02:00
slack_importer_test_settings.py slack importer: Use standalone database for running tests. 2018-01-07 09:50:27 -05:00
terms.md.template Add TERMS_OF_SERVICE setting. 2016-07-29 20:47:31 -07:00
test_settings.py test_fixtures: Fix bug with run_db_migrations for test platform. 2018-07-09 14:17:53 +05:30
urls.py custom fields: Add endpoint to delete value of custom profile data. 2018-06-07 08:35:04 -07:00
wsgi.py python: Add lint rule banning 'from os.path import'. 2017-09-22 04:55:38 -07:00