You can synchronize DDL operations when you migrate data between MySQL tenants of OceanBase Database.
Notice
If you have created an index in the source data source, it also exists in the destination data source. OceanBase Migration Service (OMS) automatically ignores the index without interrupting the migration process.
Supported DDL operations
ALTER TABLE ADD COLUMNALTER TABLE MODIFY COLUMNNotice
You can increase the column length, but you cannot modify the column type.
ALTER TABLE ALTER COLUMN SET DEFAULTandALTER TABLE ALTER COLUMN DROP DEFAULTALTER TABLE DROP COLUMNCREATE TABLEDROP TABLETRUNCATE TABLECREATE INDEXandALTER TABLE ADD INDEXDROP INDEXandALTER TABLE DROP INDEXRENAME TABLEandALTER TABLE RENAME
Limitations
If a table to be synchronized involves DDL operations that are not supported, the migration project may fail and unrecoverable data exceptions may be caused.
Frequent DDL operations on a table are not supported. 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 unrecoverable data exceptions.
Make sure that no DDL operations are performed before you create a store and when a store is being started. If log pulling is involved, make sure that no DDL operations are performed during the period from the start time when logs are pulled to the current time. Otherwise, the store may exit unexpectedly or cause unrecoverable data exceptions.
The table names before and after the
RENAME TABLEstatement must be both included or both not included in the list of tables to be synchronized.If you enable DDL synchronization, the index dropped in the source database by executing the
drop indexstatement is also dropped in the destination database. This may cause index loss in the destination database.