Home » U++ Library support » U++ SQL » SQLite On delete cascade .sch ?
Re: SQLite On delete cascade .sch ? [message #51969 is a reply to message #51958] |
Fri, 28 June 2019 12:23 |
|
Xemuth
Messages: 387 Registered: August 2018 Location: France
|
Senior Member |
|
|
Quote:Maybe try with INLINE_ATTRIBUTE ?
I had try but SQLite do not accept this kind of thing :
CREATE TABLE "OW_EQUIPES_PLAYERS" (
"EP_EQUIPE_ID" integer FOREIGN KEY("EP_EQUIPE_ID") REFERENCES "OW_EQUIPES"("EQUIPE_ID") ON DELETE CASCADE,
"EP_PLAYER_ID" integer FOREIGN KEY("EP_PLAYER_ID") REFERENCES "OW_PLAYERS"("PLAYER_ID") ON DELETE CASCADE,
);
Quote:Anyway, if it cannot be altered after creation, then there will be situation where doing it will be impossible, like two tables referencing each other - because one of them will not exist during creation.
It make sense for real SGBD but SQLite seems to don't care. I have been able to create my first table with this code :
CREATE TABLE "OW_EQUIPES_PLAYERS" (
"EP_EQUIPE_ID" integer,
"EP_PLAYER_ID" integer,
FOREIGN KEY("EP_EQUIPE_ID") REFERENCES "OW_EQUIPES"("EQUIPE_ID") ON DELETE CASCADE,
FOREIGN KEY("EP_PLAYER_ID") REFERENCES "OW_PLAYERS"("PLAYER_ID") ON DELETE CASCADE
);
Isn't there a keyword in .sch like INLINE ATTRIBUTE/ Attribute that force the add of instruction "foreign key(..."
at the end of table definition ?
Or a way to force "free text" in sch file ?
Best Regard
Xemuth
[Updated on: Fri, 28 June 2019 18:11] Report message to a moderator
|
|
|
|
|
SQLite On delete cascade .sch ?
By: Xemuth on Wed, 26 June 2019 20:30
|
|
|
Re: SQLite On delete cascade .sch ?
By: mirek on Thu, 27 June 2019 08:28
|
|
|
Re: SQLite On delete cascade .sch ?
By: Xemuth on Thu, 27 June 2019 10:55
|
|
|
Re: SQLite On delete cascade .sch ?
By: Xemuth on Thu, 27 June 2019 20:55
|
|
|
Re: SQLite On delete cascade .sch ?
By: mirek on Fri, 28 June 2019 08:02
|
|
|
Re: SQLite On delete cascade .sch ?
By: Xemuth on Fri, 28 June 2019 12:23
|
|
|
Re: SQLite On delete cascade .sch ?
By: Xemuth on Fri, 28 June 2019 18:51
|
|
|
Re: SQLite On delete cascade .sch ?
By: Xemuth on Fri, 28 June 2019 20:38
|
|
|
Re: SQLite On delete cascade .sch ?
By: Xemuth on Fri, 28 June 2019 21:23
|
|
|
Re: SQLite On delete cascade .sch ?
By: mirek on Sun, 30 June 2019 19:18
|
|
|
Re: SQLite On delete cascade .sch ?
By: Xemuth on Sun, 30 June 2019 22:00
|
Goto Forum:
Current Time: Thu Apr 18 15:50:03 CEST 2024
Total time taken to generate the page: 0.02145 seconds
|