Foreign Key and Index Overlap

Discussion of open issues, suggestions and bugs regarding database management and administration tools for MySQL
Post Reply
nphaase
Posts: 3
Joined: Thu 18 Apr 2019 20:17

Foreign Key and Index Overlap

Post by nphaase » Thu 18 Apr 2019 20:43

When performing a Project to Database schema comparison, if there's a table that has an index that includes a column that is also defined as a foreign key, the schema comparison report will show that table in the "Different" section with an "Update" operation. When you highlight that specific row in the comparison report, the comparison window has identical CREATE TABLE code snippets on both sides. The schema update script that gets generated is also blank.

It appears that the script generation correctly identifies that those tables are identical, but the comparison report thinks that they are different. This doesn't necessarily have any impact on successfully executing a schema compare, it is purely cosmetic. It just makes it difficult to identify the actual differences from the "fake" ones.

alexa

Re: Foreign Key and Index Overlap

Post by alexa » Fri 19 Apr 2019 19:16

Unfortunately, we were not able to reproduce this issue.

Could you please provide us the CREATE definition of the table and specify what version of dbForge you are using?

You can send a reply straight to our support system at alexaATdevartDOTcom and supportATdevartDOTcom .

nphaase
Posts: 3
Joined: Thu 18 Apr 2019 20:17

Re: Foreign Key and Index Overlap

Post by nphaase » Mon 22 Apr 2019 15:36

dbForge 8.1.22

CREATE TABLE foo (
id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
PRIMARY KEY (id)
)
ENGINE = INNODB,
CHARACTER SET utf8,
COLLATE utf8_general_ci;

CREATE TABLE foobar (
id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
foo_id INT(10) UNSIGNED NOT NULL,
bar VARCHAR(50) DEFAULT NULL,
PRIMARY KEY (id),
CONSTRAINT fk__foobar_foo FOREIGN KEY (foo_id) REFERENCES foo(id),
INDEX idx_foobar_foo_id_bar (foo_id, bar)
)
ENGINE = INNODB,
CHARACTER SET utf8,
COLLATE utf8_general_ci;

alexa

Re: Foreign Key and Index Overlap

Post by alexa » Tue 30 Apr 2019 14:01

We will fix this issue in one of the next product versions and will notify you once it's available for downloading,

Post Reply