Project

General

Profile

« Previous | Next » 

Revision 10736

inputs/.TNRS/schema.sql: added batch table and moved download_settings.time_submitted, id_by_time to it since these are not related to the download_settings file

View differences:

inputs/.TNRS/schema.sql
1
CREATE TABLE download_settings
1
CREATE TABLE batch
2 2
(
3 3
  id text NOT NULL,
4 4
  id_by_time text,
5 5
  time_submitted timestamp with time zone DEFAULT now(),
6
  "E-mail" text,
7
  "Id" text,
8
  "Job type" text,
9
  "Contains Id" boolean,
10
  "Start time" text,
11
  "Finish time" text,
12
  "TNRS version" text,
13
  "Sources selected" text,
14
  "Match threshold" double precision,
15
  "Classification" text,
16
  "Allow partial matches?" boolean,
17
  "Sort by source" boolean,
18
  "Constrain by higher taxonomy" boolean,
19
  CONSTRAINT download_settings_pkey PRIMARY KEY (id ),
6
  CONSTRAINT batch_pkey PRIMARY KEY (id ),
20 7
  CONSTRAINT download_settings_id_by_time_key UNIQUE (id_by_time )
21 8
)
22 9
WITH (
23 10
  OIDS=FALSE
24 11
);
25
COMMENT ON TABLE download_settings
26
  IS 'stores data from http://tnrs.iplantcollaborative.org/TNRSapp.html > Submit List > results section > Download settings > settings.txt';
27 12

  
28 13

  
29
CREATE OR REPLACE FUNCTION download_settings__fill()
14
CREATE OR REPLACE FUNCTION batch__fill()
30 15
  RETURNS trigger AS
31 16
$BODY$
32 17
BEGIN
......
38 23
  LANGUAGE plpgsql VOLATILE
39 24
  COST 100;
40 25

  
41
CREATE TRIGGER download_settings__fill
26
CREATE TRIGGER batch__fill
42 27
  BEFORE INSERT OR UPDATE
43
  ON download_settings
28
  ON batch
44 29
  FOR EACH ROW
45
  EXECUTE PROCEDURE download_settings__fill();
30
  EXECUTE PROCEDURE batch__fill();
46 31

  
47 32
--
48 33

  
34
CREATE TABLE download_settings
35
(
36
  id text NOT NULL,
37
  "E-mail" text,
38
  "Id" text,
39
  "Job type" text,
40
  "Contains Id" boolean,
41
  "Start time" text,
42
  "Finish time" text,
43
  "TNRS version" text,
44
  "Sources selected" text,
45
  "Match threshold" double precision,
46
  "Classification" text,
47
  "Allow partial matches?" boolean,
48
  "Sort by source" boolean,
49
  "Constrain by higher taxonomy" boolean,
50
  CONSTRAINT download_settings_pkey PRIMARY KEY (id )
51
)
52
WITH (
53
  OIDS=FALSE
54
);
55
COMMENT ON TABLE download_settings
56
  IS 'stores data from http://tnrs.iplantcollaborative.org/TNRSapp.html > Submit List > results section > Download settings > settings.txt';
57

  
58
--
59

  
49 60
CREATE OR REPLACE FUNCTION score_ok(score double precision)
50 61
  RETURNS boolean AS
51 62
$BODY$

Also available in: Unified diff