# Reverting to the Older Version

Let's Think of a Scenario:

1. Update handshake (py package)
2. Which might migrate your DB to a newer version, when you start a test run or export test results
3. now you find the newer version is not stable enough, or for some other reason, you want to move to an older version.
4. So, you would now be using old handshake py-build with the latest db version
5. But the DB Version will not be reverted
6. So, whenever you run scripts, it fails to mention that it failed to migrate to reach this version.

### Error Message and Resolution

```log
2024-07-05 00:08:20.622 | ERROR | handshake.services.DBService.migrator:migration:98 - Found a version v9. but we can migrate till v8. Please check the python build version and accordingly execute: "handshake step-back [COLLECTION_PATH]"
```

### Resolution

In this case, manual intervention is required, we need to note the current version of db and the expected version to know that you can execute `handshake migrate [TestResults]`

> Please take back up if you are doing this through `handshake zip-results [TestResults]`

if the Version you have is v9 but required is v7, you would need to execute `handshake step-back [TestResults]` twice.

{% hint style="info" %}
To Summarize:

1. Error about the current version of db being more than the required
2. Take a backup of the Test Results \[Optional but safe]
3. execute `handshake step-back TestResults`
4. \--version reverted--
5. run: `handshake migrate TestResults` to check if you are in the correct version w\.r.t to build
   {% endhint %}
