mirror of
https://github.com/zadam/trilium.git
synced 2025-11-02 03:16:11 +01:00
feat(docs): preserve note IDs
This commit is contained in:
@@ -64,7 +64,7 @@ async function initDbConnection() {
|
||||
dbReady.resolve();
|
||||
}
|
||||
|
||||
async function createInitialDatabase() {
|
||||
async function createInitialDatabase(preserveIds?: boolean) {
|
||||
if (isDbInitialized()) {
|
||||
throw new Error("DB is already initialized");
|
||||
}
|
||||
@@ -112,7 +112,9 @@ async function createInitialDatabase() {
|
||||
|
||||
const dummyTaskContext = new TaskContext("no-progress-reporting", "import", false);
|
||||
|
||||
await zipImportService.importZip(dummyTaskContext, demoFile, rootNote);
|
||||
await zipImportService.importZip(dummyTaskContext, demoFile, rootNote, {
|
||||
preserveIds
|
||||
});
|
||||
|
||||
sql.transactional(() => {
|
||||
// this needs to happen after ZIP import,
|
||||
|
||||
Reference in New Issue
Block a user