Open boc-tdunn opened 1 month ago
Somewhat related issue is that Django allows you to provide the name of the test database: https://docs.djangoproject.com/en/5.1/ref/settings/#std-setting-DATABASE-TEST
But python-ibmdb-django always uses this format instead: https://github.com/ibmdb/python-ibmdb-django/blob/master/ibm_db_django/creation.py#L169
For reference this is what BaseDatabaseCreation does in django: https://github.com/django/django/blob/main/django/db/backends/base/creation.py#L185-L186
If you'd rather this be a separate issue let me know and I'll do that instead.
@boc-tdunn usually customers wont keep test database hence we ignored this option. We will handle this in coming releases.
I can't promise anything but would this be an issue you would accept a contribution for?
I didnt understand.
Would I be allowed to submit a Pull Request for this issue?
yes sure, we appreciate everybody's contribution. But we merge it when we plan for next release.
The django docs state that the --keepdb flag should keep the test database from being destroyed after a test run, and that subsequent test runs should not recreate the test database if it exists already.
https://docs.djangoproject.com/en/5.1/topics/testing/overview/#the-test-database
For reference the POSTGRES django adapter does this.
https://github.com/django/django/blob/main/django/db/backends/postgresql/creation.py#L42-L45