diff options
author | Teddy Wing | 2019-06-11 20:41:03 +0200 |
---|---|---|
committer | Teddy Wing | 2019-06-11 20:41:03 +0200 |
commit | 87b53c3468625eab072dbd80e983eb3b364d4a10 (patch) | |
tree | 15bea23838e57b70487c67e637234264e86cc7f9 | |
parent | 926cb7085175c270527562f0e2f0a4feb9930b33 (diff) | |
download | code-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.
-rw-r--r-- | code-review-database | 3 |
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 |