From 1ad9401c3f0c9ebc63546fb9e6905110a474a9dd Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Thu, 6 Dec 2012 15:46:12 +0100 Subject: o Sucking in all new events. Stops as soon as it has fetched an entire page with only old events. --- src/main/resources/ddl-nexus.sql | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) (limited to 'src/main/resources') diff --git a/src/main/resources/ddl-nexus.sql b/src/main/resources/ddl-nexus.sql index 7f84dac..8acf741 100755 --- a/src/main/resources/ddl-nexus.sql +++ b/src/main/resources/ddl-nexus.sql @@ -19,8 +19,8 @@ CREATE TABLE nexus_repository ( id VARCHAR(100), group_ids VARCHAR(100) [], CONSTRAINT pk_nexus_repository PRIMARY KEY (uuid), - CONSTRAINT fk_nexus_server FOREIGN KEY (server) REFERENCES nexus_server (uuid), - CONSTRAINT uq_nexus_repository_id UNIQUE (server, id) + CONSTRAINT fk_nexus_repository__nexus_server FOREIGN KEY (server) REFERENCES nexus_server (uuid), + CONSTRAINT uq_nexus_repository__id UNIQUE (server, id) ); CREATE TABLE nexus_artifact ( @@ -30,29 +30,30 @@ CREATE TABLE nexus_artifact ( artifact_id VARCHAR(100) NOT NULL, version VARCHAR(100) NOT NULL, CONSTRAINT pk_nexus_artifact PRIMARY KEY (uuid), - CONSTRAINT uq_nexus_artifact_gid_aid_version UNIQUE (group_id, artifact_id, version), - CONSTRAINT fk_nexus_repository FOREIGN KEY (repository) REFERENCES nexus_repository (uuid) + CONSTRAINT uq_nexus_artifact__gid__aid__version UNIQUE (group_id, artifact_id, version), + CONSTRAINT fk_nexus_artifact__nexus_repository FOREIGN KEY (repository) REFERENCES nexus_repository (uuid) ); CREATE TABLE nexus_event ( - uuid CHAR(36) NOT NULL, - artifact CHAR(36) NOT NULL, - timestamp VARCHAR(100), + uuid CHAR(36) NOT NULL, + artifact CHAR(36) NOT NULL, + created TIMESTAMP NOT NULL, -- From the RSS - guid VARCHAR(1000), + guid VARCHAR(1000) NOT NULL, + date TIMESTAMP NOT NULL, -- Our type flag - type VARCHAR(100) NOT NULL, + type VARCHAR(100) NOT NULL, -- new snapshot event - snapshot_timestamp TIMESTAMP, + snapshot_timestamp VARCHAR(100), build_number INT, file VARCHAR(1000), who VARCHAR(1000), CONSTRAINT pk_nexus_event PRIMARY KEY (uuid), - CONSTRAINT fk_nexus_artifact FOREIGN KEY (artifact) REFERENCES nexus_artifact (uuid), - CONSTRAINT uq_guid UNIQUE (guid), + CONSTRAINT fk_nexus_event__artifact FOREIGN KEY (artifact) REFERENCES nexus_artifact (uuid), + CONSTRAINT uq_nexus_event__guid UNIQUE (guid), CONSTRAINT check_event_type CHECK (type IN ('new_snapshot', 'new_release')) -- CONSTRAINT pk_nexus_event PRIMARY KEY (timestamp, server_url, repository_id, group_id, artifact_id, version) ); -- cgit v1.2.3