Management Command
migration_fixer.management.commands.makemigrations.Command
(*args, repo=None, **kwargs)Create a new django migration with support for fixing conflicts.
add_arguments
(self, parser)add_base_argument
(self, parser, *args, **kwargs)Call the parser's add_argument() method, suppressing the help text according to BaseCommand.suppressed_base_arguments.
base_stealth_options
Built-in immutable sequence.
If no argument is given, the constructor returns an empty tuple. If iterable is specified the tuple is initialized from iterable's items.
If the argument is a tuple, the return value is the same object.
check
(self, app_configs=None, tags=None, display_num_errors=False, include_deployment_checks=False, fail_level=40, databases=None)Use the system check framework to validate entire Django project. Raise CommandError for any serious message (error or critical errors). If there are only light messages (like warnings), print them to stderr and don't raise an exception.
check_migrations
(self)Print a warning if the set of migrations on disk don't match the migrations in the database.
create_parser
(self, prog_name, subcommand, **kwargs)Create and return the ArgumentParser
which will be used to
parse the arguments to this command.
execute
(self, *args, **options)Try to execute this command, performing system checks if needed (as
controlled by the requires_system_checks
attribute, except if
force-skipped).
get_relative_path
(path)get_version
(self)Return the Django version, which should be correct for all built-in Django commands. User-supplied commands can override this method to return their own version.
handle
(*args, **kwargs)handle_merge
(self, loader, conflicts)Handles merging together conflicted migrations interactively, if it's safe; otherwise, advises on how to fix it.
help
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.
log
(self, msg)log_output
output_transaction
bool(x) -> bool
Returns True when the argument x is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.
print_help
(self, prog_name, subcommand)Print the help message for this command, derived from
self.usage()
.
requires_migrations_checks
bool(x) -> bool
Returns True when the argument x is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.
requires_system_checks
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.
run_from_argv
(self, argv)Set up any environment changes requested (e.g., Python path
and Django settings), then run this command. If the
command raises a CommandError
, intercept it and print it sensibly
to stderr. If the --traceback
option is present or the raised
Exception
is not CommandError
, raise it.
stealth_options
Built-in immutable sequence.
If no argument is given, the constructor returns an empty tuple. If iterable is specified the tuple is initialized from iterable's items.
If the argument is a tuple, the return value is the same object.
success_msg
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.
suppressed_base_arguments
set() -> new empty set object set(iterable) -> new set object
Build an unordered collection of unique elements.
write_migration_files
(self, changes, update_previous_migration_paths=None)Take a changes dict and write them out as migration files.
write_to_last_migration_files
(self, changes)