我试图在以下MySQL to PostgreSQL converter的帮助下自动将旧MySQL表转换为PostgreSQL
现在我不明白或者这个工具工作正常。
例如,我有一个以下MySQL表:
accepted_invitations
有2个外键:
fk_accepted_invitations_invitation_id (accepted_invitations.invitation_id -> invitations.id)
fk_accepted_invitations_location_id (accepted_invitations.location_id -> locations.id)
和2个索引:
PRIMARY(invitation_id)
fk_accepted_trial_invitations_location_id(location_id)
在PostgreSQL中转换后,我有一个下表:
accepted_invitations
有2个约束:
accepted_trial_invitations_pkey (PRIMARY KEY(invitation_id))
fk_accepted_trial_invitations_invitation_id (FOREIGN KEY(accepted_invitations.invitation_id -> invitations.id))
和1指数:
accepted_trial_invitations_location_id_idx ON accepted_invitations USING btree (location_id);
我担心转换后我在PostgreSQL中看不到fk_accepted_invitations_location_id
是转换器错误还是此FK是冗余的,不应该定义?