You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
gh-ost is reporting: ERROR Found 2 parent-side foreign keys on employees.countries. Parent-side foreign keys are not supported. Bailing out
mysql> SELECT SUM(REFERENCED_TABLE_NAME IS NOT NULL AND TABLE_SCHEMA='employees' AND TABLE_NAME='countries') as num_child_side_fk,
-> SUM(REFERENCED_TABLE_NAME IS NOT NULL AND REFERENCED_TABLE_SCHEMA='employees' AND REFERENCED_TABLE_NAME='countries') as num_parent_side_fk
-> FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE
-> WHERE REFERENCED_TABLE_NAME IS NOT NULL
-> AND ((TABLE_SCHEMA='employees' AND TABLE_NAME='countries') OR (REFERENCED_TABLE_SCHEMA='employees' AND REFERENCED_TABLE_NAME='countries'));
+-------------------+--------------------+
| num_child_side_fk | num_parent_side_fk |
+-------------------+--------------------+
| 0 | 2 |
+-------------------+--------------------+
1 row in set (0.00 sec)
But it is a 2-columns FK
mysql> SELECT refcons.constraint_schema,
-> refcons.table_name,
-> refcons.referenced_table_name,
-> refcons.constraint_name,
-> keycol.column_name
-> FROM information_schema.referential_constraints refcons
-> JOIN information_schema.key_column_usage keycol
-> ON refcons.constraint_schema = keycol.table_schema
-> AND refcons.table_name = keycol.table_name
-> AND refcons.constraint_name = keycol.constraint_name
-> WHERE refcons.constraint_schema = 'employees'
-> AND refcons.referenced_table_name = 'countries';
+-------------------+------------+-----------------------+-----------------+-------------+
| CONSTRAINT_SCHEMA | TABLE_NAME | REFERENCED_TABLE_NAME | CONSTRAINT_NAME | COLUMN_NAME |
+-------------------+------------+-----------------------+-----------------+-------------+
| employees | cities | countries | cit_count_fk | country_id |
| employees | cities | countries | cit_count_fk | cod_empresa |
+-------------------+------------+-----------------------+-----------------+-------------+
2 rows in set (0.00 sec)
The text was updated successfully, but these errors were encountered:
abonacin
added a commit
to abonacin/gh-ost
that referenced
this issue
Oct 19, 2023
gh-ost is reporting:
ERROR Found 2 parent-side foreign keys on employees.countries. Parent-side foreign keys are not supported. Bailing out
But it is a 2-columns FK
The text was updated successfully, but these errors were encountered: