quark/db/migration/alembic/versions/79b768afed65_rename_tenant_id_indexes.py
def get_data():
    """Returns combined list of tuples: [(table, column)].

    List is built, based on retrieved tables, where column with name
    ``tenant_id`` exists.
    """

    output = []
    tables = get_tables()
    for table in tables:
        try:
            columns = get_columns(table)
        except sa.exc.NoSuchTableError:
            continue

        for column in columns:
            if column['name'] == 'tenant_id':
                output.append((table, column))

    return output
def get_data():
    """Returns combined list of tuples: [(table, column)].

    List is built, based on retrieved tables, where column with name
    ``tenant_id`` exists.
    """

    output = []
    tables = get_tables()
    for table in tables:
        try:
            columns = get_columns(table)
        except sa.exc.NoSuchTableError:
            continue

        for column in columns:
            if column['name'] == 'tenant_id':
                output.append((table, column))

    return output
def get_data ( ) : output = [ ] tables = get_tables ( ) for table in tables : try : columns = get_columns ( table ) except sa . exc . NoSuchTableError : continue for column in columns : if column [ 'name' ] == 'tenant_id' : output . append ( ( table , column ) ) return output
Returns combined list of tuples: [(table, column)].

    List is built, based on retrieved tables, where column with name
    ``tenant_id`` exists.
Returns combined list of tuples : [ ( table column ) ] .