4545@register_cli ("models" )
4646@click .group ()
4747def cli () -> None :
48- pass
48+ """Database model management"""
4949
5050
5151cli .add_command (backups_cli )
@@ -54,7 +54,7 @@ def cli() -> None:
5454@cli .command ()
5555@click .argument ("parameters" , nargs = - 1 )
5656def db_shell (parameters : tuple [str , ...]) -> None :
57- """Runs the command-line client for specified database, or the default database if none is provided. """
57+ """Open an interactive database shell """
5858 try :
5959 db_connection .client .runshell (list (parameters ))
6060 except FileNotFoundError :
@@ -114,7 +114,7 @@ def db_wait() -> None:
114114 help = "Only show models from packages that start with 'app'." ,
115115)
116116def list_models (package_labels : tuple [str , ...], app_only : bool ) -> None :
117- """List installed models. """
117+ """List all installed models"""
118118
119119 packages = set (package_labels )
120120
@@ -176,7 +176,7 @@ def makemigrations(
176176 check : bool ,
177177 verbosity : int ,
178178) -> None :
179- """Creates new migration(s) for packages. """
179+ """Create new database migrations """
180180
181181 written_files : list [str ] = []
182182 interactive = not no_input
@@ -397,7 +397,7 @@ def migrate(
397397 atomic_batch : bool | None ,
398398 quiet : bool ,
399399) -> None :
400- """Updates database schema. Manages both packages with migrations and those without. """
400+ """Apply database migrations"""
401401
402402 def migration_progress_callback (
403403 action : str ,
@@ -713,7 +713,7 @@ def describe_operation(operation: Any) -> tuple[str, bool]:
713713def show_migrations (
714714 package_labels : tuple [str , ...], format : str , verbosity : int
715715) -> None :
716- """Shows all available migrations for the current project """
716+ """Show all available migrations"""
717717
718718 def _validate_package_names (package_names : tuple [str , ...]) -> None :
719719 has_bad_names = False
@@ -834,7 +834,7 @@ def print_deps(node: Any) -> str:
834834 help = "Skip confirmation prompt (for non-interactive use)." ,
835835)
836836def prune_migrations (yes : bool ) -> None :
837- """Show and optionally remove stale migration records from the database. """
837+ """Prune stale migration records"""
838838 # Load migrations from disk and database
839839 loader = MigrationLoader (db_connection , ignore_no_migrations = True )
840840 recorder = MigrationRecorder (db_connection )
@@ -962,9 +962,7 @@ def squash_migrations(
962962 squashed_name : str | None ,
963963 verbosity : int ,
964964) -> None :
965- """
966- Squashes an existing set of migrations (from first until specified) into a single new one.
967- """
965+ """Squash multiple migrations into one"""
968966 interactive = not no_input
969967
970968 def find_migration (
0 commit comments