ON DELETE CASCADE not working in SQLite

后端 未结 2 1481
渐次进展
渐次进展 2021-01-23 17:06

In SQLite for iOS (3.7.7) I am running these queries:

PRAGMA foreign_keys = ON;

create table venue(id integer primary key not null, name text not null);

create         


        
2条回答
  •  失恋的感觉
    2021-01-23 17:42

    I followed what Catcall said and it worked for me: setting foreign_keys by running

    stmt.execute("PRAGMA foreign_keys = ON");
    

    each time I establish a connection to the database.

提交回复
热议问题