Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to previous messageGo to previous message
Xemuth is currently offline  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

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Sqlite join from select
Next Topic: Multiple DUAL_UNIQUE generate conflicting statements
Goto Forum:
  


Current Time: Thu Apr 18 15:50:03 CEST 2024

Total time taken to generate the page: 0.02145 seconds