aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/sqlite
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/sqlite/v01.sql8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/sqlite/v01.sql b/src/sqlite/v01.sql
index acde438..c64a55f 100644
--- a/src/sqlite/v01.sql
+++ b/src/sqlite/v01.sql
@@ -18,10 +18,10 @@ INSERT INTO cimple_run_status(id, label) VALUES (2, 'finished');
CREATE TABLE cimple_runs (
id INTEGER PRIMARY KEY,
status INTEGER NOT NULL,
- ec INTEGER NOT NULL,
+ exit_code INTEGER NOT NULL,
output BLOB NOT NULL,
repo_id INTEGER NOT NULL,
- rev TEXT NOT NULL,
+ repo_rev TEXT NOT NULL,
FOREIGN KEY (status) REFERENCES cimple_run_status(id),
FOREIGN KEY (repo_id) REFERENCES cimple_repos(id)
ON DELETE CASCADE ON UPDATE CASCADE
@@ -30,7 +30,7 @@ CREATE TABLE cimple_runs (
CREATE INDEX cimple_runs_index_status ON cimple_runs(status);
CREATE INDEX cimple_runs_index_repo_id ON cimple_runs(repo_id);
-CREATE VIEW cimple_runs_readable AS
- SELECT run.id, status.label, run.ec, run.output, repo.url, run.rev FROM cimple_runs AS run
+CREATE VIEW cimple_runs_view(id, status, exit_code, output, repo_url, repo_rev) AS
+ SELECT run.id, status.label, run.exit_code, run.output, repo.url, run.repo_rev FROM cimple_runs AS run
INNER JOIN cimple_run_status as status ON run.status = status.id
INNER JOIN cimple_repos as repo ON run.repo_id = repo.id;