From 52084f7b4e6f50c90b3255cdf2eb9deab560c970 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Sun, 2 Jun 2013 12:32:29 +0200 Subject: o Making some test cases. --- src/main/resources/applicationContext.xml | 22 ---------------------- src/main/resources/create-postgresql.sql | 29 +++++++++++++++++++++++++++++ src/main/resources/create.sql | 29 ----------------------------- 3 files changed, 29 insertions(+), 51 deletions(-) delete mode 100755 src/main/resources/applicationContext.xml create mode 100644 src/main/resources/create-postgresql.sql delete mode 100644 src/main/resources/create.sql (limited to 'src/main/resources') diff --git a/src/main/resources/applicationContext.xml b/src/main/resources/applicationContext.xml deleted file mode 100755 index 2d33d8c..0000000 --- a/src/main/resources/applicationContext.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/src/main/resources/create-postgresql.sql b/src/main/resources/create-postgresql.sql new file mode 100644 index 0000000..39672f0 --- /dev/null +++ b/src/main/resources/create-postgresql.sql @@ -0,0 +1,29 @@ +BEGIN; + +DROP TABLE IF EXISTS task; +DROP TABLE IF EXISTS queue; +DROP SEQUENCE IF EXISTS task_seq; + +CREATE TABLE queue ( + name VARCHAR(100) NOT NULL, + interval INTEGER NOT NULL, + CONSTRAINT pk_queue PRIMARY KEY (name) +); + +CREATE TABLE task ( + id BIGINT NOT NULL, + parent BIGINT, + queue VARCHAR(100) NOT NULL, + scheduled TIMESTAMP NOT NULL, + last_run TIMESTAMP, + run_count INT NOT NULL, + completed TIMESTAMP, + arguments VARCHAR(100), + CONSTRAINT pk_task PRIMARY KEY (id), + CONSTRAINT fk_task__queue FOREIGN KEY (queue) REFERENCES queue (name), + CONSTRAINT fk_task__parent FOREIGN KEY (parent) REFERENCES task (id) +); + +CREATE SEQUENCE task_seq; + +COMMIT; diff --git a/src/main/resources/create.sql b/src/main/resources/create.sql deleted file mode 100644 index f7f2939..0000000 --- a/src/main/resources/create.sql +++ /dev/null @@ -1,29 +0,0 @@ -BEGIN; - -DROP TABLE IF EXISTS task; -DROP TABLE IF EXISTS queue; -DROP SEQUENCE IF EXISTS task_id; - -CREATE TABLE queue ( - name VARCHAR(100) NOT NULL, - interval INTEGER NOT NULL, - CONSTRAINT pk_queue PRIMARY KEY (name) -); - -CREATE TABLE task ( - id BIGINT NOT NULL, - parent BIGINT NOT NULL, - queue VARCHAR(100) NOT NULL, - scheduled TIMESTAMP NOT NULL, - last_run TIMESTAMP, - run_count INT NOT NULL, - completed TIMESTAMP, - arguments VARCHAR(100), - CONSTRAINT pk_task PRIMARY KEY (id), - CONSTRAINT fk_task__queue FOREIGN KEY (queue) REFERENCES queue (name), - CONSTRAINT fk_task__parent FOREIGN KEY (parent) REFERENCES task (id) -); - -CREATE SEQUENCE task_id; - -COMMIT; -- cgit v1.2.3