kaxil commented on a change in pull request #20838:
URL: https://github.com/apache/airflow/pull/20838#discussion_r807326376



##########
File path: airflow/cli/commands/db_command.py
##########
@@ -94,3 +95,26 @@ def shell(args):
 def check(_):
     """Runs a check command that checks if db is available."""
     db.check()
+
+
+@cli_utils.action_cli(check_db=False)
+def clean(args):
+    """Upgrades the metadata database"""
+    print(f"DB: {settings.engine.url!r}")
+    db.upgradedb()
+
+
+# lazily imported by CLI parser for `help` command
+all_tables = sorted(config_dict)
+
+
+@cli_utils.action_cli(check_db=False)
+def cleanup_tables(args):
+    """Purges old records in metastore database"""

Review comment:
       nit: There are different versions of same name "metadata database" 
(L102), "metastore database" (L113) and "metastore tables" (L1324 of 
`airflow/cli/cli_parser.py`)




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to