datanucleus-rdbms
datanucleus-rdbms copied to clipboard
Support definition of foreign keys in CREATE TABLE statement
Some RDBMS allow specification of FOREIGN KEYs at the end of a CREATE TABLE statement. We should allow it.
CREATE TABLE TBL1 ( ID INT NOT NULL, COL1 INT, FOREIGN KEY (COL1) REFERENCES TBL2 (COLX) )
The complication is that the related table needs to exist, so need to introduce ordering into table creation whereas without this we don't (and just send the CREATE FK statement when both tables exist)