Fixed bug in makemigrations if db_table name is omitted in Meta.
It was not possible to omit any db_table attribute if running a test
with an alternate database: SALESFORCE_DB_ALIAS='default'.
The command makemigrations must be run again after the fix if any
previous migration was created incorrectly without a db_table attribute.
@@ -54,6 +54,7 @@ class SalesforceModelBase(ModelBase):
result = super(SalesforceModelBase, cls).__new__(cls, name, bases, attrs, **kwargs)
if models.Model not in bases and supplied_db_table is None:
result._meta.db_table = result._meta.concrete_model._meta.object_name
+ result._meta.original_attrs['db_table'] = result._meta.db_table
return result
def add_to_class(cls, name, value):
