From bd511f431b75f21e8290aa2527d6222467e56b20 Mon Sep 17 00:00:00 2001 From: Louie S Date: Thu, 14 Sep 2023 16:21:14 -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