Closed Lomster closed 2 years ago
I've updated the schema provider to correctly output foreign keys where the column name in the master and the detail table aren't the same.
e.g. CREATE TABLE [a] ([aID] INTEGER NOT NULL PRIMARY KEY...); CREATE TABLE [b] (..., [aID] INTEGER REFERENCES [a]([aID])...); OK
CREATE TABLE [a] ([aID] INTEGER NOT NULL PRIMARY KEY...); CREATE TABLE [b] (..., [aID] INTEGER REFERENCES [a]([aID])...);
CREATE TABLE [a] ([Id] INTEGER NOT NULL PRIMARY KEY...); CREATE TABLE [b] (..., [a] INTEGER REFERENCES [a]([Id])...); NOT OK
CREATE TABLE [a] ([Id] INTEGER NOT NULL PRIMARY KEY...); CREATE TABLE [b] (..., [a] INTEGER REFERENCES [a]([Id])...);
Also updated TestForeignKeys to test this using a new table ForeignKeyTest in Northwind.db
I've updated the schema provider to correctly output foreign keys where the column name in the master and the detail table aren't the same.
e.g.
CREATE TABLE [a] ([aID] INTEGER NOT NULL PRIMARY KEY...); CREATE TABLE [b] (..., [aID] INTEGER REFERENCES [a]([aID])...);
OKCREATE TABLE [a] ([Id] INTEGER NOT NULL PRIMARY KEY...); CREATE TABLE [b] (..., [a] INTEGER REFERENCES [a]([Id])...);
NOT OKAlso updated TestForeignKeys to test this using a new table ForeignKeyTest in Northwind.db