diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2012-12-21 22:24:41 +0100 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2012-12-21 22:24:41 +0100 |
commit | a63ec924e5440b17434ecc91e84d1419ae39ef2a (patch) | |
tree | 933459602e0fcfd76a5f0d98d5465dc9f4aabed9 /src/main/resources | |
parent | e7b1958ce5e93ead2d7d3c74eabe00a4186a048a (diff) | |
download | esper-testing-a63ec924e5440b17434ecc91e84d1419ae39ef2a.tar.gz esper-testing-a63ec924e5440b17434ecc91e84d1419ae39ef2a.tar.bz2 esper-testing-a63ec924e5440b17434ecc91e84d1419ae39ef2a.tar.xz esper-testing-a63ec924e5440b17434ecc91e84d1419ae39ef2a.zip |
o Adding a sequence number to jenkins_build.
o Making the table poller poll based on a sequence number instead.
Diffstat (limited to 'src/main/resources')
-rw-r--r-- | src/main/resources/ddl-core.sql | 10 | ||||
-rw-r--r-- | src/main/resources/ddl-jenkins.sql | 7 |
2 files changed, 11 insertions, 6 deletions
diff --git a/src/main/resources/ddl-core.sql b/src/main/resources/ddl-core.sql index 25f373b..9dcdd09 100644 --- a/src/main/resources/ddl-core.sql +++ b/src/main/resources/ddl-core.sql @@ -9,11 +9,11 @@ DROP TABLE IF EXISTS person; DROP TABLE IF EXISTS table_poller_status; CREATE TABLE table_poller_status ( - poller_name VARCHAR(100) NOT NULL, - last_created_date TIMESTAMP, - last_run TIMESTAMP, - duration INT, - status VARCHAR(1000), + poller_name VARCHAR(100) NOT NULL, + last_seq INT NOT NULL, + last_run TIMESTAMP, + duration INT, + status VARCHAR(1000), CONSTRAINT pk_job_status PRIMARY KEY (poller_name) ); diff --git a/src/main/resources/ddl-jenkins.sql b/src/main/resources/ddl-jenkins.sql index bdda74b..94bfc4e 100644 --- a/src/main/resources/ddl-jenkins.sql +++ b/src/main/resources/ddl-jenkins.sql @@ -7,8 +7,10 @@ DROP TABLE IF EXISTS jenkins_server; CREATE TABLE jenkins_server ( uuid CHAR(36) NOT NULL, created_date TIMESTAMP NOT NULL, + url VARCHAR(1000) NOT NULL, enabled BOOLEAN NOT NULL, + CONSTRAINT pk_jenkins_server PRIMARY KEY (uuid), CONSTRAINT uq_jenkins_server__url UNIQUE (url) ); @@ -31,6 +33,7 @@ CREATE TABLE jenkins_job ( CREATE TABLE jenkins_build ( uuid CHAR(36) NOT NULL, created_date TIMESTAMP NOT NULL, + seq INT NOT NULL DEFAULT nextval('jenkins_build_seq'), job CHAR(36) NOT NULL, @@ -44,7 +47,8 @@ CREATE TABLE jenkins_build ( CONSTRAINT pk_jenkins_build PRIMARY KEY (UUID), CONSTRAINT fk_jenkins_build__job FOREIGN KEY (job) REFERENCES jenkins_job (uuid), - CONSTRAINT uq_jenkins_build__id UNIQUE (entry_id) + CONSTRAINT uq_jenkins_build__id UNIQUE (entry_id), + CONSTRAINT uq_jenkins_build__seq UNIQUE (seq) ); CREATE INDEX ix_jenkins_build__created_date ON jenkins_build (created_date); @@ -52,6 +56,7 @@ CREATE INDEX ix_jenkins_build__created_date ON jenkins_build (created_date); CREATE TABLE jenkins_user ( uuid CHAR(36) NOT NULL, created_date TIMESTAMP NOT NULL, + server CHAR(36) NOT NULL, absolute_url VARCHAR(1000) NOT NULL, CONSTRAINT pk_jenkins_user PRIMARY KEY (uuid), |