Correct me if I'm wrong, but it seems like the database driver has no conception of foreign keys in the databases, right?
For example, the Locality table should hold a foreign key to the Region table via the attribute regionId. But the driver only seems to pick up the primary key only:
It also fails to produce any edges between the two tables in the diagram viewer:
For clarity, here is the SQL code that created these tables:
CREATE TABLE `Region` (
`regionId` text PRIMARY KEY NOT NULL,
`regionName` text NOT NULL
);
CREATE TABLE `Locality` (
`localityId` text PRIMARY KEY NOT NULL,
`localityName` text NOT NULL,
`regionId` text NOT NULL,
FOREIGN KEY (`regionId`) REFERENCES `Region`(`regionId`) ON UPDATE cascade ON DELETE cascade
);
I understand that there is an issue with showing foreign keys and I'm willing to code up a solution to this. Before I get started, could you please point me in the right direction?
Hi @isaac-mcfadyen,
Love your work!
Correct me if I'm wrong, but it seems like the database driver has no conception of foreign keys in the databases, right?
For example, the
Locality
table should hold a foreign key to theRegion
table via the attributeregionId
. But the driver only seems to pick up the primary key only:It also fails to produce any edges between the two tables in the diagram viewer:
For clarity, here is the
SQL
code that created these tables:I understand that there is an issue with showing foreign keys and I'm willing to code up a solution to this. Before I get started, could you please point me in the right direction?
Thanks, Raf.