当我将 DUMP 导入 SQlite3 数据库时,我必须在之后再次手动激活 foreign_keys。
PRAGMA foreign_keys = ON;
创建转储时,转储如下所示:
PRAGMA foreign_keys = OFF;
BEGIN TRANSACTION;
[...]
COMMIT;
当我手动添加激活命令时,它会被忽略:
PRAGMA foreign_keys = OFF;
BEGIN TRANSACTION;
[...]
COMMIT;
PRAGMA foreign_keys = ON;
有没有办法在导入转储时自动重新激活 foreign_keys?