summaryrefslogtreecommitdiff
path: root/src/scripts/create_table.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/scripts/create_table.sh')
-rw-r--r--src/scripts/create_table.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/scripts/create_table.sh b/src/scripts/create_table.sh
new file mode 100644
index 0000000..a783c50
--- /dev/null
+++ b/src/scripts/create_table.sh
@@ -0,0 +1,7 @@
+create_table() {
+ DB_PATH="$1"
+
+ sqlite3 "$DB_PATH" "CREATE TABLE IF NOT EXISTS searchIndex(id INTEGER PRIMARY KEY, name TEXT, type TEXT, path TEXT);"
+ sqlite3 "$DB_PATH" "CREATE UNIQUE INDEX IF NOT EXISTS anchor ON searchIndex (name, type, path);"
+}
+