Renamed syncdb to migrate in spatialite backend
This commit is contained in:
parent
4d0c72eb68
commit
482ca0cecc
|
@ -13,7 +13,7 @@ class SpatiaLiteCreation(DatabaseCreation):
|
||||||
database already exists. Returns the name of the test database created.
|
database already exists. Returns the name of the test database created.
|
||||||
|
|
||||||
This method is overloaded to load up the SpatiaLite initialization
|
This method is overloaded to load up the SpatiaLite initialization
|
||||||
SQL prior to calling the `syncdb` command.
|
SQL prior to calling the `migrate` command.
|
||||||
"""
|
"""
|
||||||
# Don't import django.core.management if it isn't needed.
|
# Don't import django.core.management if it isn't needed.
|
||||||
from django.core.management import call_command
|
from django.core.management import call_command
|
||||||
|
@ -31,13 +31,13 @@ class SpatiaLiteCreation(DatabaseCreation):
|
||||||
self.connection.close()
|
self.connection.close()
|
||||||
self.connection.settings_dict["NAME"] = test_database_name
|
self.connection.settings_dict["NAME"] = test_database_name
|
||||||
|
|
||||||
# Need to load the SpatiaLite initialization SQL before running `syncdb`.
|
# Need to load the SpatiaLite initialization SQL before running `migrate`.
|
||||||
self.load_spatialite_sql()
|
self.load_spatialite_sql()
|
||||||
|
|
||||||
# Report syncdb messages at one level lower than that requested.
|
# Report migrate messages at one level lower than that requested.
|
||||||
# This ensures we don't get flooded with messages during testing
|
# This ensures we don't get flooded with messages during testing
|
||||||
# (unless you really ask to be flooded)
|
# (unless you really ask to be flooded)
|
||||||
call_command('syncdb',
|
call_command('migrate',
|
||||||
verbosity=max(verbosity - 1, 0),
|
verbosity=max(verbosity - 1, 0),
|
||||||
interactive=False,
|
interactive=False,
|
||||||
database=self.connection.alias,
|
database=self.connection.alias,
|
||||||
|
@ -47,7 +47,7 @@ class SpatiaLiteCreation(DatabaseCreation):
|
||||||
# custom SQL has been removed. The only test data should come from
|
# custom SQL has been removed. The only test data should come from
|
||||||
# test fixtures, or autogenerated from post_migrate triggers.
|
# test fixtures, or autogenerated from post_migrate triggers.
|
||||||
# This has the side effect of loading initial data (which was
|
# This has the side effect of loading initial data (which was
|
||||||
# intentionally skipped in the syncdb).
|
# intentionally skipped in the migrate).
|
||||||
call_command('flush',
|
call_command('flush',
|
||||||
verbosity=max(verbosity - 1, 0),
|
verbosity=max(verbosity - 1, 0),
|
||||||
interactive=False,
|
interactive=False,
|
||||||
|
|
Loading…
Reference in New Issue