diff options
Diffstat (limited to 'src/main/resources')
-rwxr-xr-x[-rw-r--r--] | src/main/resources/ddl-core.sql | 7 | ||||
-rwxr-xr-x[-rw-r--r--] | src/main/resources/ddl-gitorious.sql | 3 | ||||
-rwxr-xr-x | src/main/resources/ddl-nexus.sql | 23 | ||||
-rwxr-xr-x | src/main/resources/gitorious.org.sql | 11 |
4 files changed, 36 insertions, 8 deletions
diff --git a/src/main/resources/ddl-core.sql b/src/main/resources/ddl-core.sql index 662ed10..8201c31 100644..100755 --- a/src/main/resources/ddl-core.sql +++ b/src/main/resources/ddl-core.sql @@ -10,11 +10,8 @@ CREATE TABLE subscriber ( CREATE TABLE subscription_gitorious_repository ( subscriber_name VARCHAR(100) REFERENCES subscriber (name), gitorious_repository_project_slug VARCHAR(100), - gitorious_repository_name VARCHAR(100) --- CONSTRAINT subscription_gitorious_repository_2_gitorious_repository FOREIGN KEY (gitorious_repository_project_slug, gitorious_repository_name) REFERENCES gitorious_repository (project_slug, name) + gitorious_repository_name VARCHAR(100), + CONSTRAINT gitorious_repository FOREIGN KEY (gitorious_repository_project_slug, gitorious_repository_name) REFERENCES gitorious_repository (project_slug, name) ); -INSERT INTO subscriber VALUES ('trygvis'); -INSERT INTO subscription_gitorious_repository VALUES ('trygvis','esper-test-project', 'esper-test-project'); - COMMIT; diff --git a/src/main/resources/ddl-gitorious.sql b/src/main/resources/ddl-gitorious.sql index 929a326..121a4ff 100644..100755 --- a/src/main/resources/ddl-gitorious.sql +++ b/src/main/resources/ddl-gitorious.sql @@ -37,7 +37,4 @@ CREATE TABLE gitorious_event ( commit_count INTEGER ); -INSERT INTO gitorious_project VALUES ('esper-test-project'); -INSERT INTO gitorious_repository VALUES ('esper-test-project', 'esper-test-project', 'https://gitorious.org/esper-test-project/esper-test-project.atom'); - COMMIT; diff --git a/src/main/resources/ddl-nexus.sql b/src/main/resources/ddl-nexus.sql new file mode 100755 index 0000000..eaa0938 --- /dev/null +++ b/src/main/resources/ddl-nexus.sql @@ -0,0 +1,23 @@ +BEGIN; + +DROP TABLE IF EXISTS nexus_event; +DROP TABLE IF EXISTS nexus_repository; + +CREATE TABLE nexus_repository ( + id VARCHAR(1000) PRIMARY KEY, + discovered_date TIMESTAMP, + last_update TIMESTAMP, + last_successful_update TIMESTAMP +); + +CREATE TABLE nexus_event ( + repository_id VARCHAR(1000) NOT NULL, + + groupId VARCHAR(100), + artifactId VARCHAR(100), + version VARCHAR(100), + files VARCHAR(100), + CONSTRAINT nexus_repository_fk FOREIGN KEY (repository_id) REFERENCES nexus_repository (id) +); + +COMMIT; diff --git a/src/main/resources/gitorious.org.sql b/src/main/resources/gitorious.org.sql new file mode 100755 index 0000000..51a015b --- /dev/null +++ b/src/main/resources/gitorious.org.sql @@ -0,0 +1,11 @@ +-- Test data for my projects at gitorious.org +BEGIN; + +INSERT INTO gitorious_project VALUES ('esper-test-project'); +INSERT INTO gitorious_repository VALUES ('esper-test-project', 'esper-test-project', 'https://gitorious.org/esper-test-project/esper-test-project.atom'); + +INSERT INTO subscriber VALUES ('trygvis'); +INSERT INTO subscription_gitorious_repository VALUES ('trygvis', 'esper-test-project', 'esper-test-project'); + +COMMIT; +- |