This is an automated email from the ASF dual-hosted git repository. potiuk pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push: new 4778c49ce7 Fix upgrade docs to reflect true cli flags available (#37231) 4778c49ce7 is described below commit 4778c49ce73fc66dc2ee8c6b6f873291a20138cb Author: Joseph Distler <josephcd...@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 --- 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 4350ff85be..fa972680fc 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. -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