django_sorcery.management.alembic module

Alembic Django command things.

class django_sorcery.management.alembic.AlembicAppConfig(name, config, script, db, app, version_path, tables)

Bases: tuple

app

Alias for field number 4

config

Alias for field number 1

db

Alias for field number 3

name

Alias for field number 0

script

Alias for field number 2

tables

Alias for field number 6

version_path

Alias for field number 5

class django_sorcery.management.alembic.AlembicCommand(stdout=None, stderr=None, no_color=False, force_color=False)[source]

Bases: django.core.management.base.BaseCommand

Base alembic django command.

get_app_config(app, db)[source]

Return alembic config for an app.

get_app_version_path(app)[source]

Returns the default migration directory location of al app.

get_common_config(context)[source]

Common alembic configuration.

get_config_script(config)[source]

Returns the alembic script directory for the config.

lookup_app(app_label)[source]

Looks up an app’s alembic config.

run_env(context, appconfig)[source]

Executes an alembic context, just like the env.py file of alembic.

run_migrations_offline(context, appconfig)[source]

Executes an offline alembic context.

run_migrations_online(context, appconfig)[source]

Executes an online alembic context.

sorcery_apps

All sorcery apps and their alembic configs.