mirror of
https://github.com/wagtail/wagtail.git
synced 2024-12-01 11:41:20 +01:00
67235accfc
This change makes several improvements: * Use in-memory SQLite database for test migrations The default database is SQLite but its NAME (which SQLite uses as the filename) was `wagtail`, which isn't valid since the wagtail codebase already has a `wagtail/` directory. Trying to run migration creation commands (https://docs.wagtail.io/en/latest/contributing/developing.html#running-migrations-for-the-test-app-models) produced an error: django.db.utils.OperationalError: unable to open database file because of this conflict. This change uses an in-memory database as the default database for tests. If DATABASE_NAME were set to a real file name, then running the migration command with SQLite creates an empty db with this filename on running `django-admin`. Other non-SQLite engines continue to use the original `wagtail` name, meaning that the `test_wagtail` database gets created just as before. * Modifies the default values for database USER, PASSWORD, HOST etc to being an empty string rather than None, to match Django's [defaults](https://docs.djangoproject.com/en/stable/ref/settings/#host). This helps avoid any potential issues when Django and database engines are expecting this being a string. * Adds documentation to `developing.rst` regarding installation of required database modules and available environment variables for database connection customisation * Normalises the DATABASE_PASSWORD tests environment variable to match the name in Django's database settings object |
||
---|---|---|
.. | ||
committing.rst | ||
css_guidelines.rst | ||
developing.rst | ||
general_guidelines.rst | ||
html_guidelines.rst | ||
index.rst | ||
issue_tracking.rst | ||
javascript_guidelines.rst | ||
python_guidelines.rst | ||
release_process.rst | ||
security.rst | ||
styleguide.rst |