jedcunningham commented on a change in pull request #22102:
URL: https://github.com/apache/airflow/pull/22102#discussion_r822999275



##########
File path: airflow/utils/db.py
##########
@@ -1043,103 +1061,106 @@ def _offline_migration(migration_func: Callable, 
config, revision):
         logging.disable(logging.NOTSET)
 
 
-def _validate_version_range(script_, version_range):
-    if ':' not in version_range:
-        raise AirflowException(
-            'Please provide Airflow version range with the format 
"old_version:new_version"'
-        )
-    lower, upper = version_range.split(':')
-
-    if not REVISION_HEADS_MAP.get(lower) or not REVISION_HEADS_MAP.get(upper):
-        raise AirflowException('Please provide valid Airflow versions above 
2.0.0.')
-    if REVISION_HEADS_MAP.get(lower) == REVISION_HEADS_MAP.get(upper):
-        if sys.stdout.isatty():
-            size = os.get_terminal_size().columns
-        else:
-            size = 0
-        print(f"Hey this is your migration script from {lower}, to {upper}, 
but guess what?".center(size))
-        print(
-            "There is no migration needed as the database has not changed 
between those versions. "
-            "You are done.".center(size)
-        )
-        print("""/\\_/\\""".center(size))
-        print("""(='_' )""".center(size))
-        print("""(,(") (")""".center(size))
-        print("""^^^""".center(size))
-        return
-    dbname = settings.engine.dialect.name
-    if dbname == 'sqlite':
-        raise AirflowException('SQLite is not supported for offline 
migration.')
-    elif dbname == 'mssql' and (lower != '2.2.0' or int(lower.split('.')[1]) < 
2):
-        raise AirflowException(
-            'MSSQL is not supported for offline migration in Airflow versions 
less than 2.2.0.'
-        )
-    _lower, _upper = REVISION_HEADS_MAP[lower], REVISION_HEADS_MAP[upper]
-    revision = f"{_lower}:{_upper}"
+def print_happy_cat(message):
+    if sys.stdout.isatty():
+        size = os.get_terminal_size().columns
+    else:
+        size = 0
+    print(message.center(size))
+    print("""/\\_/\\""".center(size))
+    print("""(='_' )""".center(size))
+    print("""(,(") (")""".center(size))
+    print("""^^^""".center(size))
+    return

Review comment:
       Surely we dont need this one :)
   
   ```suggestion
   ```




-- 
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: commits-unsubscr...@airflow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to