# Dataset Versioning Migration

Starting with Opik version `1.9.92`, the platform includes an **automated migration process** to support enhanced dataset versioning capabilities. This migration runs automatically when you first start Opik `1.9.92` or higher.

<Callout intent="info">
  **Migration Duration**: Unlike typical Liquibase migrations, the data migration can take **2-10 minutes** depending on the size of your datasets. This is normal and expected.
</Callout>

## Overview

The dataset versioning migration is a **three-part automated process**:

### 1. Liquibase Schema Migration (Automated)

Automatically runs during application startup and migrates existing datasets to the new versioning schema in ClickHouse.

### 2. MySQL Counter Migration (Automated, Recommended to Disable After Completion)

Migrates dataset version counters in MySQL. This is controlled by `DATASET_VERSION_ITEMS_TOTAL_MIGRATION_ENABLED` (enabled by default).

**Recommendation**: After the upgrade completes successfully, you can **optionally disable this flag** to prevent the migration job from running on subsequent restarts. However, this is **not required** - after the first successful run, the migration automatically detects that all data has been migrated and becomes a no-op (does nothing):

```yaml