diff options
author | Louie S <louie@example.com> | 2023-08-26 12:08:28 -0400 |
---|---|---|
committer | Louie S <louie@example.com> | 2023-08-26 12:08:28 -0400 |
commit | c125d1179850a4742756b2580343f7fbd73fca88 (patch) | |
tree | 1621659b7c470fa477b5aae1d9077fd5ce0e87d4 /src/lib/create_table |
Diffstat (limited to 'src/lib/create_table')
-rw-r--r-- | src/lib/create_table | 7 |
1 files changed, 7 insertions, 0 deletions
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);" +} + |