'Print database\'s current migration level'

def version(self):

    current_heads = alembic_migrations.get_current_alembic_heads()
    if current_heads:
        for head in current_heads:
            print(head)
    else:
        print(_('Database    is    either    not    under    migration    control    or    under    legacy    migration    control,    please    run    "glance-manage    db    sync"    to    place    the    database    under    alembic    migration    control.'))
