mirror of
https://github.com/TriliumNext/Notes.git
synced 2026-01-06 04:50:03 -06:00
now using .tar export to initialize DB instead of direct DB dumps
This commit is contained in:
@@ -1,3 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
sqlite3 ~/trilium-data/document.db < bin/dump.sql
|
||||
19
bin/dump.sql
19
bin/dump.sql
@@ -1,19 +0,0 @@
|
||||
.mode insert branches
|
||||
.out db/main_branches.sql
|
||||
select * from branches where isDeleted = 0;
|
||||
|
||||
.mode insert notes
|
||||
.out db/main_notes.sql
|
||||
select * from notes where isDeleted = 0;
|
||||
|
||||
.mode insert images
|
||||
.out db/main_images.sql
|
||||
select * from images where isDeleted = 0;
|
||||
|
||||
.mode insert note_images
|
||||
.out db/main_note_images.sql
|
||||
select * from note_images where isDeleted = 0;
|
||||
|
||||
.mode insert attributes
|
||||
.out db/main_attributes.sql
|
||||
select * from attributes where isDeleted = 0;
|
||||
@@ -2,6 +2,6 @@
|
||||
|
||||
SCHEMA_FILE_PATH=db/schema.sql
|
||||
|
||||
sqlite3 ~/trilium-data/document.db .schema > "$SCHEMA_FILE_PATH"
|
||||
sqlite3 ~/trilium-data/document.db .schema | grep -v "sqlite_sequence" > "$SCHEMA_FILE_PATH"
|
||||
|
||||
echo "DB schema exported to $SCHEMA_FILE_PATH"
|
||||
Reference in New Issue
Block a user