When you migrate data from the MySQL compatible mode of OceanBase Database to the MySQL compatible mode of OceanBase Database, DDL synchronization is supported.
Notice
If the source has created an index and the target already contains it, OMS automatically ignores the index and does not interrupt the operation.
Supported DDL operations for synchronization
Add a column using the
ALTER TABLE ADD COLUMNstatementModify a column using the
ALTER TABLE MODIFY COLUMNstatement.Notice
Only increasing the column length is supported, and changing the column type is not supported.
Modify the default value of a column by using the
ALTER TABLE ALTER COLUMN SET DEFAULTorALTER TABLE ALTER COLUMN DROP DEFAULTstatement.Drop a column using the
ALTER TABLE DROP COLUMNstatement.Create a table
CREATE TABLENotice
CREATE TABLE AS SELECTis not supported.Drop a table DROP TABLE
Truncate a table
TRUNCATE TABLECreate an index by using the
CREATE INDEXorALTER TABLE ADD INDEXstatement.Drop an index by using the
DROP INDEXorALTER TABLE DROP INDEXstatement.Rename a table by using the
RENAME TABLEorALTER TABLE RENAMEstatement.
Limitations on DDL synchronization
If the tables to be synchronized involve DDL changes that are not supported, the migration task may fail and unrecoverable data exceptions may be caused.
Do not frequently perform DDL operations on a table. After the store finishes a DDL operation (which can be determined based on the timestamp), it proceeds to the next DDL operation. Otherwise, the store may exit unexpectedly or cause data issues that cannot be recovered.
Before you create a store and when a store is being started, make sure that no DDL operations are performed. If log pulling is involved, make sure that no DDL operations are performed from the start time when logs are pulled to the current time. Otherwise, the store may exit unexpectedly or cause data problems that cannot be recovered.
The table names before and after the
RENAME TABLEstatement must be both in or both not in the list of tables to be synchronized.