Added deterministic handling of sqlite database location

When running the migration command from outside of the application directory the sqlite database is created in the current working directory at the time of the command being executed. This commit updates the file path to be relative to the location of the settings file.
This commit is contained in:
Tobias Macey 2018-01-18 16:00:57 -05:00
parent 3efd70e50c
commit 0beb56e82a
No known key found for this signature in database
GPG Key ID: D6260C616BD0FA33

View File

@ -84,7 +84,7 @@ TEST_RUNNER = 'hc.api.tests.CustomRunner'
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': './hc.sqlite',
'NAME': '{0}/hc.sqlite'.format(BASE_DIR),
}
}