yay! the reporter spits out csv and excel now ... html tomorrow (with any luck)
[Evergreen.git] / Open-ILS / src / reporter / config.sql
index 9cc8bd8..a8237e8 100644 (file)
@@ -46,7 +46,7 @@ CREATE TABLE reporter.stage3 (
        recurrence      interval
 );
 
-CREATE TABLE reporter.run_queue (
+CREATE TABLE reporter.output (
        id              serial                          primary key,
        stage3          int                             not null
                                                        references reporter.stage3 (id)
@@ -55,20 +55,12 @@ CREATE TABLE reporter.run_queue (
                                                                initially deferred,
        queue_time      timestamp with time zone        not null default now(),
        run_time        timestamp with time zone,
+       run_pid         int,
+       query           text,
+       error           text,
+       error_time      timestamp with time zone,
        complete_time   timestamp with time zone,
-       state           text                            check (state in ('wait','running','complete'))
-);
-
-CREATE TABLE reporter.output (
-       id              int             primary key,
-       stage3          int             not null
-                                       references reporter.stage3 (id)
-                                               on delete restrict
-                                               deferrable
-                                               initially deferred,
-       queue_time      timestamp with time zone        not null default now(),
-       run_time        timestamp with time zone        not null,
-       complete_time   timestamp with time zone        not null
+       state           text                            check (state in ('wait','running','complete','error'))
 );
 
 COMMIT;