diff options
author | Louie S <louie@example.com> | 2023-05-05 19:25:50 -0700 |
---|---|---|
committer | Louie S <louie@example.com> | 2023-05-05 19:31:44 -0700 |
commit | 3c6bd67b02dfb5dd7ac11455741530c3ebd034fa (patch) | |
tree | 7e59eff4d8832369c179aa85985a2c49f40e8c1a /src/lib/create_table | |
parent | a26adab1566f7ad0574c93b841f640363a799092 (diff) |
Create lib subdirectory for common functions
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);" +} + |