summaryrefslogtreecommitdiff
path: root/insert_book.sh
diff options
context:
space:
mode:
Diffstat (limited to 'insert_book.sh')
-rwxr-xr-xinsert_book.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/insert_book.sh b/insert_book.sh
new file mode 100755
index 0000000..cd7c782
--- /dev/null
+++ b/insert_book.sh
@@ -0,0 +1,6 @@
+#!/bin/bash
+
+[[ -z $1 ]] && echo "Usage: ./insert_book <title>" && exit 1
+
+docker-compose exec db psql -U tracking -d tracking -c \
+ "INSERT INTO book (title, completed) VALUES ('$1', FALSE)"