aboutsummaryrefslogtreecommitdiff
path: root/src/main/resources
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2012-11-09 12:55:43 +0100
committerTrygve Laugstøl <trygvis@inamo.no>2012-11-09 12:55:43 +0100
commit8b3db6ef6307191609d2dab837032db16aa13375 (patch)
tree06147ba8a404a0bc122830b8b8aedbd4bb60ff49 /src/main/resources
parent796336d8ce3593e10b44f40a05de56a6cc2ba4e7 (diff)
downloadesper-testing-8b3db6ef6307191609d2dab837032db16aa13375.tar.gz
esper-testing-8b3db6ef6307191609d2dab837032db16aa13375.tar.bz2
esper-testing-8b3db6ef6307191609d2dab837032db16aa13375.tar.xz
esper-testing-8b3db6ef6307191609d2dab837032db16aa13375.zip
wip
Diffstat (limited to 'src/main/resources')
-rw-r--r--src/main/resources/ddl.sql24
1 files changed, 10 insertions, 14 deletions
diff --git a/src/main/resources/ddl.sql b/src/main/resources/ddl.sql
index 279e544..4e641cc 100644
--- a/src/main/resources/ddl.sql
+++ b/src/main/resources/ddl.sql
@@ -3,28 +3,24 @@ BEGIN;
DROP TABLE IF EXISTS gitorious_event;
DROP TABLE IF EXISTS gitorious_repository;
DROP TABLE IF EXISTS gitorious_project;
-DROP TABLE IF EXISTS atom_feed;
-
-CREATE TABLE atom_feed (
- url VARCHAR(1000) PRIMARY KEY,
- last_update TIMESTAMP NOT NULL
-);
CREATE TABLE gitorious_project (
- slug VARCHAR(1000) PRIMARY KEY,
- atom_feed VARCHAR(1000) NOT NULL
+ slug VARCHAR(1000) PRIMARY KEY
);
CREATE TABLE gitorious_repository (
- project_slug VARCHAR(1000) NOT NULL,
- name VARCHAR(1000) NOT NULL,
- CONSTRAINT gitorious_repository_pk PRIMARY KEY(project_slug, name),
- CONSTRAINT gitorious_repository_2_gitorious_project FOREIGN KEY(project_slug) REFERENCES gitorious_project(slug)
+ project_slug VARCHAR(1000) NOT NULL,
+ name VARCHAR(1000) NOT NULL,
+ atom_feed VARCHAR(1000) NOT NULL,
+ last_update TIMESTAMP,
+ last_successful_update TIMESTAMP,
+ CONSTRAINT gitorious_repository_pk PRIMARY KEY (project_slug, name),
+ CONSTRAINT gitorious_repository_2_gitorious_project FOREIGN KEY (project_slug) REFERENCES gitorious_project (slug)
);
CREATE TABLE gitorious_event (
- entry_id VARCHAR(1000) PRIMARY KEY,
- text VARCHAR(1000)
+ entry_id VARCHAR(1000) PRIMARY KEY,
+ text VARCHAR(1000)
);
COMMIT;