mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-07-15 21:03:47 +00:00
Merge pull request #779 from ZacharyZcR/fix/database-import-order
fix: disable foreign key constraints during database import
This commit is contained in:
@@ -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