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.
Foreign Key and Index Overlap
Re: Foreign Key and Index Overlap
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 .
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 .
Re: Foreign Key and Index Overlap
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;
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;
Re: Foreign Key and Index Overlap
We will fix this issue in one of the next product versions and will notify you once it's available for downloading,