Management commands

runschema

usage: manage.py runschema [-h] [--noinput] [-s SCHEMAS [SCHEMAS ...]] [-as]
                           [-ss] [-ds] [-ts]
                           [-x EXCLUDED_SCHEMAS [EXCLUDED_SCHEMAS ...]]
                           [--parallel] [--no-create-schemas] [--version]
                           [-v {0,1,2,3}] [--settings SETTINGS]
                           [--pythonpath PYTHONPATH] [--traceback]
                           [--no-color] [--force-color] [--skip-checks]
                           command_name

Wrapper around Django commands for use with an individual schema

positional arguments:
  command_name          The command name you want to run

optional arguments:
  -h, --help            show this help message and exit
  --noinput, --no-input
                        Tells Django to NOT prompt the user for input of any
                        kind.
  -s SCHEMAS [SCHEMAS ...], --schema SCHEMAS [SCHEMAS ...]
                        Schema(s) to execute the current command
  -as, --include-all-schemas
                        Include all schemas when executing the current command
  -ss, --include-static-schemas
                        Include all static schemas when executing the current
                        command
  -ds, --include-dynamic-schemas
                        Include all dynamic schemas when executing the current
                        command
  -ts, --include-tenant-schemas
                        Include all tenant-like schemas when executing the
                        current command
  -x EXCLUDED_SCHEMAS [EXCLUDED_SCHEMAS ...], --exclude-schema EXCLUDED_SCHEMAS [EXCLUDED_SCHEMAS ...]
                        Schema(s) to exclude when executing the current
                        command
  --parallel            Run command in parallel mode
  --no-create-schemas   Skip automatic creation of non-existing schemas
  --version             Show program's version number and exit.
  -v {0,1,2,3}, --verbosity {0,1,2,3}
                        Verbosity level; 0=minimal output, 1=normal output,
                        2=verbose output, 3=very verbose output
  --settings SETTINGS   The Python path to a settings module, e.g.
                        "myproject.settings.main". If this isn't provided, the
                        DJANGO_SETTINGS_MODULE environment variable will be
                        used.
  --pythonpath PYTHONPATH
                        A directory to add to the Python path, e.g.
                        "/home/djangoprojects/myproject".
  --traceback           Raise on CommandError exceptions.
  --no-color            Don't colorize the command output.
  --force-color         Force colorization of the command output.
  --skip-checks         Skip system checks.

migrateschema

usage: manage.py migrateschema [-h] [-s SCHEMAS [SCHEMAS ...]] [-as] [-ss]
                               [-ds] [-ts]
                               [-x EXCLUDED_SCHEMAS [EXCLUDED_SCHEMAS ...]]
                               [--parallel] [--no-create-schemas] [--noinput]
                               [--database DATABASE] [--fake] [--fake-initial]
                               [--plan] [--run-syncdb] [--check] [--prune]
                               [--version] [-v {0,1,2,3}]
                               [--settings SETTINGS] [--pythonpath PYTHONPATH]
                               [--traceback] [--no-color] [--force-color]
                               [--skip-checks]
                               [app_label] [migration_name]

positional arguments:
  app_label             App label of an application to synchronize the state.
  migration_name        Database state will be brought to the state after that
                        migration. Use the name "zero" to unapply all
                        migrations.

optional arguments:
  -h, --help            show this help message and exit
  -s SCHEMAS [SCHEMAS ...], --schema SCHEMAS [SCHEMAS ...]
                        Schema(s) to execute the current command
  -as, --include-all-schemas
                        Include all schemas when executing the current command
  -ss, --include-static-schemas
                        Include all static schemas when executing the current
                        command
  -ds, --include-dynamic-schemas
                        Include all dynamic schemas when executing the current
                        command
  -ts, --include-tenant-schemas
                        Include all tenant-like schemas when executing the
                        current command
  -x EXCLUDED_SCHEMAS [EXCLUDED_SCHEMAS ...], --exclude-schema EXCLUDED_SCHEMAS [EXCLUDED_SCHEMAS ...]
                        Schema(s) to exclude when executing the current
                        command
  --parallel            Run command in parallel mode
  --no-create-schemas   Skip automatic creation of non-existing schemas
  --noinput, --no-input
                        Tells Django to NOT prompt the user for input of any
                        kind.
  --database DATABASE   Nominates a database to synchronize. Defaults to the
                        "default" database.
  --fake                Mark migrations as run without actually running them.
  --fake-initial        Detect if tables already exist and fake-apply initial
                        migrations if so. Make sure that the current database
                        schema matches your initial migration before using
                        this flag. Django will only check for an existing
                        table name.
  --plan                Shows a list of the migration actions that will be
                        performed.
  --run-syncdb          Creates tables for apps without migrations.
  --check               Exits with a non-zero status if unapplied migrations
                        exist.
  --prune               Delete nonexistent migrations from the
                        django_migrations table.
  --version             Show program's version number and exit.
  -v {0,1,2,3}, --verbosity {0,1,2,3}
                        Verbosity level; 0=minimal output, 1=normal output,
                        2=verbose output, 3=very verbose output
  --settings SETTINGS   The Python path to a settings module, e.g.
                        "myproject.settings.main". If this isn't provided, the
                        DJANGO_SETTINGS_MODULE environment variable will be
                        used.
  --pythonpath PYTHONPATH
                        A directory to add to the Python path, e.g.
                        "/home/djangoprojects/myproject".
  --traceback           Raise on CommandError exceptions.
  --no-color            Don't colorize the command output.
  --force-color         Force colorization of the command output.
  --skip-checks         Skip system checks.

migrate

Wrapper around migrateschema to override Django’s default migrate.

createrefschema

usage: manage.py createrefschema [-h] [--recreate] [--version] [-v {0,1,2,3}]
                                 [--settings SETTINGS]
                                 [--pythonpath PYTHONPATH] [--traceback]
                                 [--no-color] [--force-color] [--skip-checks]

Creates the reference schema for faster dynamic tenant creation

optional arguments:
  -h, --help            show this help message and exit
  --recreate            Recreate reference schema.
  --version             Show program's version number and exit.
  -v {0,1,2,3}, --verbosity {0,1,2,3}
                        Verbosity level; 0=minimal output, 1=normal output,
                        2=verbose output, 3=very verbose output
  --settings SETTINGS   The Python path to a settings module, e.g.
                        "myproject.settings.main". If this isn't provided, the
                        DJANGO_SETTINGS_MODULE environment variable will be
                        used.
  --pythonpath PYTHONPATH
                        A directory to add to the Python path, e.g.
                        "/home/djangoprojects/myproject".
  --traceback           Raise on CommandError exceptions.
  --no-color            Don't colorize the command output.
  --force-color         Force colorization of the command output.
  --skip-checks         Skip system checks.

cloneschema

usage: manage.py cloneschema [-h] [--noinput] [--dry-run] [--version]
                             [-v {0,1,2,3}] [--settings SETTINGS]
                             [--pythonpath PYTHONPATH] [--traceback]
                             [--no-color] [--force-color] [--skip-checks]
                             source destination

Clones a schema

positional arguments:
  source                The name of the schema you want to clone
  destination           The name of the schema you want to create as clone

optional arguments:
  -h, --help            show this help message and exit
  --noinput, --no-input
                        Tells Django to NOT prompt the user for input of any
                        kind.
  --dry-run             Just show what clone would do; without actually
                        cloning.
  --version             Show program's version number and exit.
  -v {0,1,2,3}, --verbosity {0,1,2,3}
                        Verbosity level; 0=minimal output, 1=normal output,
                        2=verbose output, 3=very verbose output
  --settings SETTINGS   The Python path to a settings module, e.g.
                        "myproject.settings.main". If this isn't provided, the
                        DJANGO_SETTINGS_MODULE environment variable will be
                        used.
  --pythonpath PYTHONPATH
                        A directory to add to the Python path, e.g.
                        "/home/djangoprojects/myproject".
  --traceback           Raise on CommandError exceptions.
  --no-color            Don't colorize the command output.
  --force-color         Force colorization of the command output.
  --skip-checks         Skip system checks.

whowill

usage: manage.py whowill [-h] [--noinput] [-s SCHEMAS [SCHEMAS ...]] [-as]
                         [-ss] [-ds] [-ts]
                         [-x EXCLUDED_SCHEMAS [EXCLUDED_SCHEMAS ...]]
                         [--parallel] [--no-create-schemas] [--version]
                         [-v {0,1,2,3}] [--settings SETTINGS]
                         [--pythonpath PYTHONPATH] [--traceback] [--no-color]
                         [--force-color] [--skip-checks]

Displays which schemas would be used based on the passed schema selectors

optional arguments:
  -h, --help            show this help message and exit
  --noinput, --no-input
                        Tells Django to NOT prompt the user for input of any
                        kind.
  -s SCHEMAS [SCHEMAS ...], --schema SCHEMAS [SCHEMAS ...]
                        Schema(s) to execute the current command
  -as, --include-all-schemas
                        Include all schemas when executing the current command
  -ss, --include-static-schemas
                        Include all static schemas when executing the current
                        command
  -ds, --include-dynamic-schemas
                        Include all dynamic schemas when executing the current
                        command
  -ts, --include-tenant-schemas
                        Include all tenant-like schemas when executing the
                        current command
  -x EXCLUDED_SCHEMAS [EXCLUDED_SCHEMAS ...], --exclude-schema EXCLUDED_SCHEMAS [EXCLUDED_SCHEMAS ...]
                        Schema(s) to exclude when executing the current
                        command
  --parallel            Run command in parallel mode
  --no-create-schemas   Skip automatic creation of non-existing schemas
  --version             Show program's version number and exit.
  -v {0,1,2,3}, --verbosity {0,1,2,3}
                        Verbosity level; 0=minimal output, 1=normal output,
                        2=verbose output, 3=very verbose output
  --settings SETTINGS   The Python path to a settings module, e.g.
                        "myproject.settings.main". If this isn't provided, the
                        DJANGO_SETTINGS_MODULE environment variable will be
                        used.
  --pythonpath PYTHONPATH
                        A directory to add to the Python path, e.g.
                        "/home/djangoprojects/myproject".
  --traceback           Raise on CommandError exceptions.
  --no-color            Don't colorize the command output.
  --force-color         Force colorization of the command output.
  --skip-checks         Skip system checks.