Good day altogether,

I suppose there might be a problem with reporting missing indexes on foreign key columns in conjunction with the without rowid clause:

C:\Users\Bernd>sqlite3
SQLite version 3.24.0 2018-06-04 19:24:41
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
sqlite> CREATE TABLE t_parent (id text PRIMARY KEY NOT NULL);
sqlite> CREATE TABLE t_child_standard (id text PRIMARY KEY NOT NULL REFERENCES t_parent (id) ON DELETE CASCADE, somethingelse text); sqlite> CREATE TABLE t_child_wr (id text PRIMARY KEY NOT NULL REFERENCES t_parent (id) ON DELETE CASCADE, somethingelse text) WITHOUT ROWID;
sqlite> .lint fkey-indexes
CREATE INDEX 't_child_wr_id' ON 't_child_wr'('id'); --> t_parent(id)
sqlite> .q

C:\Users\Bernd>

It looks like the primary key isn't realized as such when the without rowid clause is used.

Thanks, Bernd
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to