aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/sqlite/v01.sql
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/sqlite/v01.sql6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/sqlite/v01.sql b/src/sqlite/v01.sql
index 454c19e..b37e486 100644
--- a/src/sqlite/v01.sql
+++ b/src/sqlite/v01.sql
@@ -29,3 +29,9 @@ 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
+ INNER JOIN cimple_run_status as status ON run.status = status.id
+ INNER JOIN cimple_repos as repo ON run.repo_id = repo.id;