diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2012-12-21 12:16:29 +0100 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2012-12-21 12:16:29 +0100 |
commit | e7b1958ce5e93ead2d7d3c74eabe00a4186a048a (patch) | |
tree | a73bfce74bc740f76f11e5376a233eed026b93f5 /src/main/resources/ddl-core.sql | |
parent | d25d523d2a7f7e4c3446d81740e09e487ad807d0 (diff) | |
download | esper-testing-e7b1958ce5e93ead2d7d3c74eabe00a4186a048a.tar.gz esper-testing-e7b1958ce5e93ead2d7d3c74eabe00a4186a048a.tar.bz2 esper-testing-e7b1958ce5e93ead2d7d3c74eabe00a4186a048a.tar.xz esper-testing-e7b1958ce5e93ead2d7d3c74eabe00a4186a048a.zip |
o Adding a 'core' domain module.
o Adding a table scanner and a job that converts jenkins builds to builds.
Diffstat (limited to 'src/main/resources/ddl-core.sql')
-rw-r--r-- | src/main/resources/ddl-core.sql | 41 |
1 files changed, 39 insertions, 2 deletions
diff --git a/src/main/resources/ddl-core.sql b/src/main/resources/ddl-core.sql index fb85585..25f373b 100644 --- a/src/main/resources/ddl-core.sql +++ b/src/main/resources/ddl-core.sql @@ -1,5 +1,13 @@ BEGIN; +DROP TABLE IF EXISTS build_participant; +DROP TABLE IF EXISTS build; +DROP TABLE IF EXISTS person_badge_progress; +DROP TABLE IF EXISTS person_badge; +DROP TABLE IF EXISTS person_jenkins_user; +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, @@ -12,11 +20,19 @@ CREATE TABLE table_poller_status ( CREATE TABLE person ( uuid CHAR(36) NOT NULL, created_date TIMESTAMP NOT NULL, ---The users from the different jenkins servers this user has claimed - jenkins_users CHAR(36) [], + name VARCHAR(100), CONSTRAINT pk_person PRIMARY KEY (uuid) ); +--The users from the different jenkins servers this user has claimed +CREATE TABLE person_jenkins_user ( + person CHAR(36), + jenkins_user CHAR(36), + CONSTRAINT pk_person_jenkins_user PRIMARY KEY (person, jenkins_user), + CONSTRAINT fk_person_jenkins_user__person FOREIGN KEY (person) REFERENCES person (uuid), + CONSTRAINT fk_person_jenkins_user__jenkins_user FOREIGN KEY (jenkins_user) REFERENCES jenkins_user (uuid) +); + -- Badges received CREATE TABLE person_badge ( uuid CHAR(36) NOT NULL, @@ -34,4 +50,25 @@ CREATE TABLE person_badge_progress ( CONSTRAINT pk_person_badge_progress PRIMARY KEY (uuid) ); +CREATE TABLE build ( + uuid CHAR(36) NOT NULL, + created_date TIMESTAMP NOT NULL, + + timestamp TIMESTAMP NOT NULL, + success BOOL NOT NULL, + + reference_type VARCHAR(100) NOT NULL, + reference_uuid CHAR(36) NOT NULL, + + CONSTRAINT pk_build PRIMARY KEY (uuid) +); + +CREATE TABLE build_participant ( + build CHAR(36) NOT NULL, + person CHAR(36) NOT NULL, + CONSTRAINT pk_build_participant PRIMARY KEY (build, person), + CONSTRAINT fk_build_participant_build FOREIGN KEY (build) REFERENCES build (uuid), + CONSTRAINT fk_build_participant_person FOREIGN KEY (person) REFERENCES person (uuid) +); + COMMIT; |