airflow-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ace Haidrey <>
Subject Is it safe to run Airflow upgradedb command on same Airflow version?
Date Sat, 01 Jul 2017 02:43:33 GMT
Airflow has an upgradedb command that needs to be run when upgrading Airflow versions. I wonder
if it's safe to run even if the version is the same. Wondering if that'd be okay to put part
of my ansible deployment.
I've tried asking on Gitter and Stack Overflow but to no avail.

Code wise I see:
def upgradedb():"Creating tables")
    current_dir = os.path.dirname(os.path.abspath(__file__))
    package_dir = os.path.normpath(os.path.join(current_dir, '..'))
    directory = os.path.join(package_dir, 'migrations')
    config = Config(os.path.join(package_dir, 'alembic.ini'))
    config.set_main_option('script_location', directory)
    config.set_main_option('sqlalchemy.url', settings.SQL_ALCHEMY_CONN)
    command.upgrade(config, 'heads')

Where only the last line I guess is what I have a hard time following: command.upgrade(config,
'heads'). Where is the heads defined? For instance, if I'm on version 1.8.0 and then I run
this command, will it put the heads for the most recent version of Airflow from git?
I don't think so but just want to make sure it's safe.

How foolish of me to not introduce myself.
My name is Ace Haidrey and I'm a Software Engineer at Pandora trying to incorporate Airflow
as part of our work management systems.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message