mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-07-15 12:53:40 +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 {
|
||||
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