mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-28 06:05:24 +00:00
fix: disable foreign key constraints during database import
This commit is contained in:
1 parent
ec87f8a4d1
commit
1ca299e141
1 file changed
+2
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user