NO ACTION
or RESTRICT
.Foreign key-dependent data is not supported. If the source database has such data, the task verification will report an error.
When you set a foreign key in MySQL, there are four values that can be selected:
CASCADE
: When a record is deleted or updated in the parent table, its associated records will also be deleted or updated in the child table.SET NULL
: When a record is deleted or updated in the parent table, the column of the foreign key field of its associated records will be set to null
in the child table (child table foreign keys cannot be set to not null
).RESTRICT
: When a record is deleted or updated in the parent table, if it is associated with records in the child table, the deletion request in the parent table will be denied.NO ACTION
: Similar to RESTRICT
, the foreign key will be checked first.If an error occurs, fix it as follows:
Log in to the source database as instructed in Connecting to MySQL Instance.
Delete the original foreign key settings.
alter table `table name 1` drop foreign key `foreign key name 1`;
Add the foreign key settings again.
alter table `table name 1` add constraint `foreign key name 2` foreign key `table name 1`(`column name 1`) references `table name 2`(`column name 1`)
on delete cascade on update cascade;
Run the verification task again.
When modifying the migration task configuration, include objects with associations in Migration Object.
Was this page helpful?