From d6f464ece7c50e8e04fff618a029e5b9bd1b2116 Mon Sep 17 00:00:00 2001 From: Louie S Date: Tue, 28 May 2024 20:43:58 -0400 Subject: First commit --- src/lib/create_table | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 src/lib/create_table (limited to 'src/lib/create_table') diff --git a/src/lib/create_table b/src/lib/create_table new file mode 100644 index 0000000..a783c50 --- /dev/null +++ b/src/lib/create_table @@ -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);" +} + -- cgit