You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by ep...@apache.org on 2024/02/20 10:48:18 UTC

(airflow) 32/32: Fix upgrade docs to reflect true cli flags available (#37231)

This is an automated email from the ASF dual-hosted git repository.

ephraimanierobi pushed a commit to branch v2-8-test
in repository https://gitbox.apache.org/repos/asf/airflow.git

commit c6a5d4e78b9cb01a6e619b0352f82956e68853f3
Author: Joseph Distler <jo...@gmail.com>
AuthorDate: Wed Feb 7 13:55:17 2024 -0600

    Fix upgrade docs to reflect true cli flags available (#37231)
    
    * Fix upgrade docs to reflect true cli arguments available
    
    * Add in to version for parity
    
    * Use shortened flag in first example
    
    (cherry picked from commit 4778c49ce73fc66dc2ee8c6b6f873291a20138cb)
---
 docs/apache-airflow/installation/upgrading.rst | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

diff --git a/docs/apache-airflow/installation/upgrading.rst b/docs/apache-airflow/installation/upgrading.rst
index 8fc99d7475..2ba2d7abdf 100644
--- a/docs/apache-airflow/installation/upgrading.rst
+++ b/docs/apache-airflow/installation/upgrading.rst
@@ -63,17 +63,13 @@ you access to Airflow ``CLI`` :doc:`/howto/usage-cli` and the database.
 
 Offline SQL migration scripts
 =============================
-If you want to run the upgrade script offline, you can use the ``-r`` or ``--revision-range`` flag
-to get the SQL statements that would be executed. This feature is supported in Postgres and MySQL
+If you want to run the upgrade script offline, you can use the ``-s`` or ``--show-sql-only`` flag
+to get the SQL statements that would be executed. You may also specify the starting airflow version with the ``--from-version`` flag and the ending airflow version with the ``-n`` or ``--to-version`` flag. This feature is supported in Postgres and MySQL
 from Airflow 2.0.0 onward and in MSSQL from Airflow 2.2.0 onward.
 
-Sample usage:
-   ``airflow db migrate -r "2.0.0:2.2.0"``
-   ``airflow db migrate --revision-range "e959f08ac86c:142555e44c17"``
-
-But for Airflow version 2.7.0 or greater, please use
-    ``airflow db migrate -r "2.0.0:2.2.0"``
-    ``airflow db migrate --revision-range "e959f08ac86c:142555e44c17"``
+Sample usage for Airflow version 2.7.0 or greater:
+   ``airflow db migrate -s --from-version "2.4.3" -n "2.7.3"``
+   ``airflow db migrate --show-sql-only --from-version "2.4.3" --to-version "2.7.3"``
 
 .. note::
     ``airflow db upgrade`` has been replaced by ``airflow db migrate`` since Airflow version 2.7.0