Recreate database to latest stable version. Refactor cipher into database. Adapt tests