summaryrefslogtreecommitdiff
path: root/yarns.webapp
diff options
context:
space:
mode:
authorBen Hutchings <ben.hutchings@codethink.co.uk>2020-05-07 19:27:17 +0100
committerBen Hutchings <ben.hutchings@codethink.co.uk>2020-06-01 15:27:22 +0100
commit6f237b32894e1fc1973834d6adc1c597ea0fa5f3 (patch)
treeedd46036f09b8ee0a8788c5745f360b91592440a /yarns.webapp
parenta8c6a08f46ba49adcde70d1b424b54484d9ee5c5 (diff)
downloadlorry-controller-6f237b32894e1fc1973834d6adc1c597ea0fa5f3.tar.gz
STATEDB: Generalise 'troves' table to allow more Upstream Host types
We need to store different parameters for different upstream host types. Currently the troves table has a 'gitlab_token' column for GitLab upstreams, but in general we might need to have arbitrary parameters. That column's value is also how we determine the host type(!). * Add an explicit 'type' column * Replace the 'gitlab_token' column with a 'type_params' column that is a JSON dictionary of type-specific parameters While we're at it, and since it makes the migration simpler: * Replace 'troves' table with 'hosts' table Closes #10.
Diffstat (limited to 'yarns.webapp')
-rw-r--r--yarns.webapp/900-implementations.yarn2
1 files changed, 1 insertions, 1 deletions
diff --git a/yarns.webapp/900-implementations.yarn b/yarns.webapp/900-implementations.yarn
index 9a759ba..fc88fd4 100644
--- a/yarns.webapp/900-implementations.yarn
+++ b/yarns.webapp/900-implementations.yarn
@@ -447,5 +447,5 @@ any rows in them.
IMPLEMENTS THEN STATEDB is empty
test -s "$DATADIR/webapp.db"
- sqlite3 "$DATADIR/webapp.db" 'SELECT * FROM troves;' | stdin_is_empty
+ sqlite3 "$DATADIR/webapp.db" 'SELECT * FROM hosts;' | stdin_is_empty
sqlite3 "$DATADIR/webapp.db" 'SELECT * FROM lorries;' | stdin_is_empty