code: def pre_upgrade(self):
          
          sql = text('select 1 from upgrade where upgrade = :upgrade')
          if not db.engine.execute(
              sql, upgrade='invenio_upgrader_2015_11_12_innodb_removal'
             ).fetchall():
              warnings.warn("Upgrade '{}' was not applied.".format(
                  'invenio_upgrader_2015_11_12_innodb_removal'))
docs: Run pre-upgrade checks (optional).