All Products
Search
Document Center

Data Management:Manage table schema versions

Last Updated:Mar 30, 2026

DMS tracks schema changes at the database level. Each time a table's schema is modified through DMS, a new schema version is saved for the entire database. From the Database version list page, you can download and compare schema versions, or roll back to an earlier version to recover from an unwanted change.

How it works

A schema version captures the schema of all tables in a database at a point in time. DMS saves a new version whenever any of the following operations changes a table's schema:

Note If a schema change happens outside DMS, synchronize the database metadata in DMS to capture the latest schema. See Synchronize the data dictionary of a database instance. For databases in Security Collaboration mode, you can also click the 同步元数据按钮 icon on the SQLConsole tab to trigger metadata synchronization.

Prerequisites

Before you begin, ensure that you have:

  • Query permissions on the target table or database

  • A database of one of the following types:

    • MySQL: ApsaraDB RDS for MySQL, PolarDB for MySQL, PolarDB-X, AnalyticDB for MySQL, and OceanBase databases in MySQL mode

    • PostgreSQL: ApsaraDB RDS for PostgreSQL, PolarDB for PostgreSQL, and AnalyticDB for PostgreSQL

    • PolarDB for PostgreSQL (Compatible with Oracle)

    • SQL Server

    • MariaDB

    • Oracle

Limitations

Constraint Detail
Version retention by control mode Flexible Management: 3 versions; Stable Change: 20 versions; Security Collaboration: unlimited
Databases with more than 1,024 tables Schema version management is not supported
System databases Not supported — for example, information_schema and sys in MySQL

Open the Database version list page

Log on to the DMS console V5.0, then use one of the following methods to open the Database version list page.

From the Database Instances section

In the left-side navigation pane, click Database Instances. Find and right-click the target database, then select Version Management.

image

From the SQLConsole tab

Open the SQLConsole tab for the target database. Click the image.png icon in the upper-right corner.

image

From the Instances page (DMS administrators and DBAs only)

  1. Hover over the 2023-01-28_15-57-17.png icon in the upper-left corner and choose All Features > Data Assets > Instances.

    Note If the console is in normal mode, choose Data Assets > Instances from the top navigation bar instead.
  2. On the Database List tab, find the target database.

  3. In the Actions column, choose More > Version Management.

    image

View, compare, and roll back schema versions

On the Database version list page, locate the schema version you want to work with. The following operations are available:

View the SQL behind a version

Click Change Details to see the exact SQL statements that generated the schema version. Use this to understand what changed between versions.

Compare two versions

Select two schema versions and click Version Comparison.

Roll back to the previous version

Click Rollback to roll back data to the previous schema version.