aboutsummaryrefslogtreecommitdiffstats
path: root/code-review-database
diff options
context:
space:
mode:
authorTeddy Wing2019-06-11 20:41:03 +0200
committerTeddy Wing2019-06-11 20:41:03 +0200
commit87b53c3468625eab072dbd80e983eb3b364d4a10 (patch)
tree15bea23838e57b70487c67e637234264e86cc7f9 /code-review-database
parent926cb7085175c270527562f0e2f0a4feb9930b33 (diff)
downloadcode-review-87b53c3468625eab072dbd80e983eb3b364d4a10.tar.bz2
code-review-database: Always try to create the database
If the database doesn't exist, we get this error: Error: near line 3: no such table: merge_bases This is because `sqlite3` will always create a new database if it doesn't exist when running a command against a database. The newly-created database doesn't have the required table, and we get the error. Fix the problem by ensuring the database always exists and is initialised properly.
Diffstat (limited to 'code-review-database')
-rw-r--r--code-review-database3
1 files changed, 3 insertions, 0 deletions
diff --git a/code-review-database b/code-review-database
index 50e6f68..5c931c6 100644
--- a/code-review-database
+++ b/code-review-database
@@ -91,3 +91,6 @@ function get_merge_base () {
function current_branch () {
git rev-parse --abbrev-ref HEAD
}
+
+
+create_database_if_not_exists