mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-30 23:25: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 {
|
try {
|
||||||
|
mainDb.$client.exec("PRAGMA foreign_keys = OFF");
|
||||||
try {
|
try {
|
||||||
const importedHosts = importDb
|
const importedHosts = importDb
|
||||||
.prepare("SELECT * FROM ssh_data")
|
.prepare("SELECT * FROM ssh_data")
|
||||||
@@ -1561,6 +1562,7 @@ app.post(
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mainDb.$client.exec("PRAGMA foreign_keys = ON");
|
||||||
result.success = true;
|
result.success = true;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in new issue
Block a user