Project

General

Profile

« Previous | Next » 

Revision 10737

inputs/.TNRS/schema.sql: added client_version table for svn revisions, with fkey from batch

View differences:

inputs/.TNRS/schema.sql
1
CREATE TABLE client_version
2
(
3
  id text NOT NULL,
4
  global_rev integer NOT NULL,
5
  "/lib/tnrs.py rev" integer,
6
  "/bin/tnrs_db rev" integer,
7
  CONSTRAINT client_version_pkey PRIMARY KEY (id )
8
)
9
WITH (
10
  OIDS=FALSE
11
);
12

  
13
--
14

  
1 15
CREATE TABLE batch
2 16
(
3 17
  id text NOT NULL,
4 18
  id_by_time text,
5 19
  time_submitted timestamp with time zone DEFAULT now(),
20
  client_version text,
6 21
  CONSTRAINT batch_pkey PRIMARY KEY (id ),
7
  CONSTRAINT download_settings_id_by_time_key UNIQUE (id_by_time )
22
  CONSTRAINT download_settings_id_by_time_key UNIQUE (id_by_time ),
23
  CONSTRAINT batch_client_version_fkey FOREIGN KEY (client_version)
24
      REFERENCES client_version (id) MATCH SIMPLE
25
      ON UPDATE CASCADE ON DELETE CASCADE
8 26
)
9 27
WITH (
10 28
  OIDS=FALSE

Also available in: Unified diff