invenio_migrator/legacy/records.py
def get_record_revisions(recid, from_date):
    """Get record revisions."""
    try:
        from invenio.dbquery import run_sql
    except ImportError:
        from invenio.legacy.dbquery import run_sql

    return run_sql(
        'SELECT job_date, marcxml '
        'FROM hstRECORD WHERE id_bibrec = %s AND job_date >= %s '
        'ORDER BY job_date ASC', (recid, from_date),
        run_on_slave=True)
def get_record_revisions(recid, from_date):
    """Get record revisions."""
    try:
        from invenio.dbquery import run_sql
    except ImportError:
        from invenio.legacy.dbquery import run_sql

    return run_sql(
        'SELECT job_date, marcxml '
        'FROM hstRECORD WHERE id_bibrec = %s AND job_date >= %s '
        'ORDER BY job_date ASC', (recid, from_date),
        run_on_slave=True)
Get record revisions.