commands.reset_db¶
Management command to reset the database and migrations.
Attributes¶
Classes¶
Management command to reset the database and migrations. |
Module Contents¶
- class commands.reset_db.Command(stdout=None, stderr=None, no_color=False, force_color=False)[source]¶
Bases:
django.core.management.BaseCommandManagement command to reset the database and migrations.
- help = 'Resets the database by deleting current version migrations, dropping the database, then running...[source]¶
- add_arguments(parser)[source]¶
Adds command arguments/options.
- Parameters:
parser (django.core.management.base.CommandParser)
- Return type:
None
- handle(*_args, **options)[source]¶
Executes the command.
- Parameters:
_args (tuple[str])
options (dict[str, str])
- Return type:
None
- _remove_migration_files(base_path, *_args, keep_established)[source]¶
Removes all Django migration files.
- Parameters:
base_path (pathlib.Path)
_args (tuple)
keep_established (bool)
- Return type:
None