pub async fn check_db_migration_consistency(
conn: &mut Connection<'_>,
) -> Result<(), IndexerError>
Expand description
Checks that the local migration scripts is a prefix of the records in the database. This allows us run migration scripts against a DB at anytime, without worrying about existing readers fail over. We do however need to make sure that whenever we are deploying a new version of either reader or writer, we must first run migration scripts to ensure that there is not more local scripts than in the DB record.