fix: disable foreign key constraints during database import

This commit is contained in:
ZacharyZcR
2026-05-13 18:02:48 +08:00
parent ec87f8a4d1
commit 1ca299e141
+2
View File
@@ -1251,6 +1251,7 @@ app.post(
};
try {
mainDb.$client.exec("PRAGMA foreign_keys = OFF");
try {
const importedHosts = importDb
.prepare("SELECT * FROM ssh_data")
@@ -1561,6 +1562,7 @@ app.post(
);
}
mainDb.$client.exec("PRAGMA foreign_keys = ON");
result.success = true;
try {