misc: never skip migrations if explicit migration actions are given (#31236)

This commit is contained in:
Frédéric Péters 2019-03-09 13:23:30 +01:00
parent f5495c72d0
commit ea05d2abb8
1 changed files with 3 additions and 2 deletions

View File

@ -62,8 +62,9 @@ class MigrateSchemasCommand(SyncCommon):
for tenant in TenantMiddleware.get_tenants():
connection.set_schema(tenant.schema_name, include_public=False)
applied_migrations = self.get_applied_migrations(app_labels)
if options.get('fake'):
# disregard applied migrations if --fake is given.
if options.get('fake') or options.get('migration_name') or options.get('app_label'):
# never skip migrations if explicit migration actions
# are given.
applied_migrations = []
if all([x in applied_migrations for x in applied_public_migrations]):
if int(self.options.get('verbosity', 1)) >= 1: