Re: [sqlite] nested foreign keys

2018-10-24 Thread Roman Fleysher
Subject: Re: [sqlite] nested foreign keys No, it means that you did not specify the whatisness of grandParent, parent, or child; and/or, you have not enabled foreign_keys. https://sqlite.org/lang_createtable.html https://sqlite.org/pragma.html#pragma_foreign_keys NB: I have compiled the CLI

Re: [sqlite] nested foreign keys

2018-10-24 Thread Keith Medcalf
No, it means that you did not specify the whatisness of grandParent, parent, or child; and/or, you have not enabled foreign_keys. https://sqlite.org/lang_createtable.html https://sqlite.org/pragma.html#pragma_foreign_keys NB: I have compiled the CLI with foreign key enforcement ON be default.

Re: [sqlite] nested foreign keys

2018-10-24 Thread David Yip
nt: Thursday, October 25, 2018 12:37 AM > To: SQLite mailing list > Subject: Re: [sqlite] nested foreign keys > > These statements worked for me: > > > CREATE TABLE grandparent (id INTEGER PRIMARY KEY); > > CREATE TABLE parent (id INTEGER PRIMARY KEY REFERENCES grandpa

Re: [sqlite] nested foreign keys

2018-10-24 Thread Roman Fleysher
The statements work. Insertion fails. Roman From: sqlite-users [sqlite-users-boun...@mailinglists.sqlite.org] on behalf of David Yip [dw...@peach-bun.com] Sent: Thursday, October 25, 2018 12:37 AM To: SQLite mailing list Subject: Re: [sqlite] nested

Re: [sqlite] nested foreign keys

2018-10-24 Thread David Yip
These statements worked for me: CREATE TABLE grandparent (id INTEGER PRIMARY KEY); CREATE TABLE parent (id INTEGER PRIMARY KEY REFERENCES grandparent(id)); CREATE TABLE child (id INTEGER PRIMARY KEY REFERENCES parent(id)); The foreign key constraints work as you'd expect also. What are you