Hello,

I use "SQLite for UWP" Release 3.15.0 for "Windows Store" developments.

I detected a strange thing on the SQLite database.

1. create two table :
CREATE TABLE artist (id INTEGER PRIMARY KEY, name TEXT);
CREATE TABLE track (id INTEGER PRIMARY KEY, name TEXT, artist_id INTEGER
REFERENCES artist (id) ON UPDATE CASCADE ON DELETE CASCADE MATCH FULL);

2. verify the SQL stored :
SELECT name,sql FROM [sqlite_master] WHERE [type]='table' AND
[name]='track';
=> result:
CREATE TABLE [track] ([id] INTEGER PRIMARY KEY, [name] TEXT, [artist_id]
INTEGER REFERENCES [artist] ([id]) ON UPDATE CASCADE ON DELETE CASCADE MATCH
FULL)

It is OK.

3. verify Foreign Key
PRAGMA foreign_key_list ([track]);
=> result:
id|seq|table |from     |to|on_update|on_delete|match
----------------------------------------------------
 0|  0|artist|artist_id|id|CASCADE  |CASCADE  |NONE
 
I think the value of 'match' should be FULL instead of NONE!

Best regards

_______________________________________________
sqlite-users mailing list
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to