# MV\_VERSION\_HISTORY

This view shows an aggregate view of every upgrade the cluster has gone through.

Includes the start and end time, the starting and ending versions of the upgrade, and the status of the particular upgrade.

There is also an extended version of this view, as described below. It the shows the upgrade history for nodes. There is an lmv version of the extended view.

| Column name        | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `START_TIME`       | The time the upgrade started.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| `END_TIME`         | The time the upgrade finished.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| `PREVIOUS_VERSION` | The version prior to the upgrade.**Prior to version 8.7**, the value present in`PREVIOUS_VERSION`is a best effort approximation based on limited information.                                                                                                                                                                                                                                                                                                                                                                                            |
| `UPGRADE_VERSION`  | The version after the upgrade.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| `STATUS`           | Possible values:<ul> <li>Initial - This was the initial version on installation, does not have a previous version.</li> <li>Previous - These are previous upgrades prior to the last (current) upgrade.</li> <li>In-progress - The is in process of an upgrade which will finish with the MA upgrade.</li> <li>Current - This was the last successful upgrade. It has finished, and now the cluster is in the current version.</li> <li>Error - Indicates that one node in the cluster has a lower version than the MA, which is not allowed.</li> </ul> |

In this sample output, 8.0.10 was the first version. There was an upgrade from 8.1.10 to 8.5 and an "upgrade"/downgrade from 8.5 to 8.1.24 which is the current version. And finally, the cluster is in the process of upgrading to 8.7.1 but it has not finished:

```sql
SELECT * FROM INFORMATION_SCHEMA.MV_VERSION_HISTORY;

```

```output

+---------------------+---------------------+------------------+-----------------+-------------+
| START_TIME          | END_TIME            | PREVIOUS_VERSION | UPGRADE_VERSION | STATUS      |
+---------------------+---------------------+------------------+-----------------+-------------+
| 2024-06-05 09:37:10 | 2024-06-05 09:37:12 | NULL             | 8.0.10          | Initial     |
| 2024-06-05 09:37:13 | 2024-06-05 09:37:15 | 8.0.10           | 8.5.0           | Previous    |
| 2024-06-05 09:37:16 | 2024-06-05 09:37:18 | 8.5.0            | 8.1.24          | Current     |
| 2024-06-05 09:37:19 | 2024-06-05 09:37:20 | 8.1.24           | 8.7.1           | In-progress |
+---------------------+---------------------+------------------+-----------------+-------------+
```

## MV\_VERSION\_HISTORY\_EXTENDED and LMV\_VERSION\_HISTORY\_EXTENDED

`MV_VERSION_HISTORY_EXTENDED` shows the same information as `LMV_VERSION_HISTORY_EXTENDED` (time of the upgrade, previous version, and upgrade version) except that it is for all nodes so it also shows the node ID and whether the node is the current MA.

| Column name        | Description                       |
| ------------------ | --------------------------------- |
| `NODE_ID`          | The ID of the current node.       |
| `IS_MA`            | Whether the node is the MA.       |
| `TIME`             | The time the upgrade started.     |
| `PREVIOUS_VERSION` | The version prior to the upgrade. |
| `UPGRADE_VERSION`  | The version after the upgrade.    |

```sql
SELECT * FROM INFORMATION_SCHEMA.LMV_VERSION_HISTORY_EXTENDED;

```

```output

+---------------------+------------------+-----------------+
| TIME                | PREVIOUS_VERSION | UPGRADE_VERSION |
+---------------------+------------------+-----------------+
| 2024-06-05 16:37:12 | NULL             | 8.0.10          |
| 2024-06-05 16:37:15 | 8.0.10           | 8.5.0           |
| 2024-06-05 16:37:17 | 8.5.0            | 8.1.24          |
| 2024-06-05 16:37:20 | 8.1.24           | 8.7.1           |
+---------------------+------------------+-----------------+
```

```sql
SELECT * FROM INFORMATION_SCHEMA.MV_VERSION_HISTORY_EXTENDED;

```

```output

+---------+-------+---------------------+------------------+-----------------+
| NODE_ID | IS_MA | TIME                | PREVIOUS_VERSION | UPGRADE_VERSION |
+---------+-------+---------------------+------------------+-----------------+
| 1       | 1     | 2024-06-05 09:37:10 | NULL             | 8.0.10          |
| 1       | 1     | 2024-06-05 09:37:13 | 8.0.10           | 8.5.0           |
| 1       | 1     | 2024-06-05 09:37:18 | 8.5.0            | 8.1.24          |
| 2       | 0     | 2024-06-05 09:37:11 | NULL             | 8.0.10          |
| 2       | 0     | 2024-06-05 09:37:14 | 8.0.10           | 8.5.0           |
| 2       | 0     | 2024-06-05 09:37:16 | 8.5.0            | 8.1.24          |
| 2       | 0     | 2024-06-05 09:37:19 | 8.1.24           | 8.7.1           |
| 3       | 0     | 2024-06-05 09:37:12 | NULL             | 8.0.10          |
| 3       | 0     | 2024-06-05 09:37:15 | 8.0.10           | 8.5.0           |
| 3       | 0     | 2024-06-05 09:37:17 | 8.5.0            | 8.1.24          |
| 3       | 0     | 2024-06-05 09:37:20 | 8.1.24           | 8.7.1           |
+---------+-------+---------------------+------------------+-----------------+
```

***

Modified at: June 11, 2024

Source: [/db/v9.1/reference/information-schema-reference/management/mv-version-history/](https://docs.singlestore.com/db/v9.1/reference/information-schema-reference/management/mv-version-history/)

(An index of the documentation is available at /llms.txt)
