I was able to do this by hacking into some django code. The parts that need to be edited is,
FILE: django/db/backends/sqlite3/creation.py
change the code as follows:
- setting
confirm = 'yes'
in line 55 - commenting out all occurrences of
os.remove(test_database_name)
FILE: django/db/backends/creation.py
change the code as follows
- comment 359 to 376 (the syncdb & flush part in
create_test_db
function. - almost everything in
_create_test_db
. (almost everything == code part which does the undesired stuff which we are trying to eliminate) - almost everything in
_destroy_test_db
. - almost everything in
destroy_test_db
.
Hope that helps!