aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2023-07-04 21:00:02 +0200
committerEgor Tensin <Egor.Tensin@gmail.com>2023-07-04 21:00:02 +0200
commite6baf9c084aaabbbd9a1beaa832d9a0a9298078a (patch)
treeb4313265b610a9a82cc57ab714424ba36a975aa2 /src
parentstorage: mark completed runs as such (diff)
downloadcimple-e6baf9c084aaabbbd9a1beaa832d9a0a9298078a.tar.gz
cimple-e6baf9c084aaabbbd9a1beaa832d9a0a9298078a.zip
sqlite: rename a column
Diffstat (limited to '')
-rw-r--r--src/sqlite/v01.sql2
-rw-r--r--src/storage_sqlite.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/sqlite/v01.sql b/src/sqlite/v01.sql
index 44c5116..454c19e 100644
--- a/src/sqlite/v01.sql
+++ b/src/sqlite/v01.sql
@@ -18,7 +18,7 @@ INSERT INTO cimple_run_status(id, label) VALUES (2, 'finished');
CREATE TABLE cimple_runs (
id INTEGER PRIMARY KEY,
status INTEGER NOT NULL,
- result INTEGER NOT NULL,
+ ec INTEGER NOT NULL,
output BLOB NOT NULL,
repo_id INTEGER NOT NULL,
rev TEXT NOT NULL,
diff --git a/src/storage_sqlite.c b/src/storage_sqlite.c
index 087174e..eee26fe 100644
--- a/src/storage_sqlite.c
+++ b/src/storage_sqlite.c
@@ -150,8 +150,8 @@ static int storage_sqlite_prepare_statements(struct storage_sqlite *storage)
/* clang-format off */
static const char *const fmt_repo_find = "SELECT id FROM cimple_repos WHERE url = ?;";
static const char *const fmt_repo_insert = "INSERT INTO cimple_repos(url) VALUES (?) RETURNING id;";
- static const char *const fmt_run_insert = "INSERT INTO cimple_runs(status, result, output, repo_id, rev) VALUES (1, -1, x'', ?, ?) RETURNING id;";
- static const char *const fmt_run_finished = "UPDATE cimple_runs SET status = 2, result = ? WHERE id = ?;";
+ static const char *const fmt_run_insert = "INSERT INTO cimple_runs(status, ec, output, repo_id, rev) VALUES (1, -1, x'', ?, ?) RETURNING id;";
+ static const char *const fmt_run_finished = "UPDATE cimple_runs SET status = 2, ec = ? WHERE id = ?;";
/* clang-format on */
int ret = 0;