From afbfd905b8f5326d149ba7fdfd784af50d85e5ee Mon Sep 17 00:00:00 2001
From: Trygve Laugstøl <trygvis@inamo.no>
Date: Sun, 23 Dec 2012 12:00:04 +0100
Subject: o Storing the file file reference on the jenkins build and job.

---
 src/main/resources/ddl-jenkins.sql | 4 ++++
 1 file changed, 4 insertions(+)

(limited to 'src/main/resources/ddl-jenkins.sql')

diff --git a/src/main/resources/ddl-jenkins.sql b/src/main/resources/ddl-jenkins.sql
index 2a57ad6..c75f836 100644
--- a/src/main/resources/ddl-jenkins.sql
+++ b/src/main/resources/ddl-jenkins.sql
@@ -21,12 +21,14 @@ CREATE TABLE jenkins_job (
 
   server       CHAR(36)      NOT NULL,
 
+  file         CHAR(36)      NOT NULL,
   url          VARCHAR(1000) NOT NULL,
   job_type     VARCHAR(100)  NOT NULL,
   display_name VARCHAR(100),
 
   CONSTRAINT pk_jenkins_job PRIMARY KEY (UUID),
   CONSTRAINT fk_jenkins_job__server FOREIGN KEY (server) REFERENCES jenkins_server (uuid),
+  CONSTRAINT fk_jenkins_job__file FOREIGN KEY (file) REFERENCES file (uuid),
   CONSTRAINT uq_jenkins_job__url UNIQUE (url)
 );
 
@@ -39,6 +41,7 @@ CREATE TABLE jenkins_build (
 
   job          CHAR(36)      NOT NULL,
 
+  file         CHAR(36)      NOT NULL,
   entry_id     VARCHAR(1000) NOT NULL,
   url          VARCHAR(1000) NOT NULL,
   result       VARCHAR(100)  NOT NULL,
@@ -49,6 +52,7 @@ CREATE TABLE jenkins_build (
 
   CONSTRAINT pk_jenkins_build PRIMARY KEY (UUID),
   CONSTRAINT fk_jenkins_build__job FOREIGN KEY (job) REFERENCES jenkins_job (uuid),
+  CONSTRAINT fk_jenkins_build__file FOREIGN KEY (file) REFERENCES file (uuid),
   CONSTRAINT uq_jenkins_build__id UNIQUE (entry_id),
   CONSTRAINT uq_jenkins_build__seq UNIQUE (seq)
 );
-- 
cgit v1.2.3

