title: How to run migrations on specific database using call_command() in Django?
body: <p>I'm just wondering what the correct syntax is for calling <code>$ python manage.py migrate app_name --database db_name</code> with the <code>management.call_command()</code> function at runtime.</p>
  <p>So far, I have the following:</p>
  <pre><code>from django.core import management
  from django.core.management.commands import migrate
  
  # Migrate the core.contrib.dynamics if needed to the pre-specified database:
  management.call_command(migrate.Command(), 'dynamics', '--database {}'.format(DB_NAME))
  </code></pre>
  <p>However, I get the following error at runtime when calling the above:</p>
  <pre><code>Cannot find a migration matching '--database default_node' from app 'dynamics'.
  </code></pre>
  <p>I'm 99% sure I'm probably calling the <code>--</code> args incorrectly? Can anyone point me in the right direction with this?</p>
  <p>The migrations for the dynamics app are as follows:</p>
  <pre><code># Generated by Django 3.0.8 on 2020-07-02 14:28
  
  from django.db import migrations, models
  import django.db.models.deletion
  
  
  class Migration(migrations.Migration):
  
      initial = True
  
      dependencies = [
      ]
  
      operations = [
          migrations.CreateModel(
              name='ModelSchema',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('name', models.CharField(max_length=32, unique=True)),
                  ('_modified', models.DateTimeField(auto_now=True)),
              ],
          ),
          migrations.CreateModel(
              name='FieldSchema',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('name', models.CharField(max_length=63)),
                  ('data_type', models.CharField(choices=[('character', 'character'), ('text', 'text'), ('integer', 'integer'), ('float', 'float'), ('boolean', 'boolean'), ('date', 'date')], editable=False, max_length=16)),
                  ('null', models.BooleanField(default=False)),
                  ('unique', models.BooleanField(default=False)),
                  ('max_length', models.PositiveIntegerField(null=True)),
                  ('model_schema', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='fields', to='dynamics.ModelSchema')),
              ],
              options={
                  'unique_together': {('name', 'model_schema')},
              },
          ),
      ]
  </code></pre>