From: APTX Date: Tue, 2 Apr 2013 19:45:43 +0000 (+0200) Subject: Add the path_map table to the schema. X-Git-Url: https://gitweb.tyo.aptx.org/?a=commitdiff_plain;h=b4e871a395c786b27e0b54869dc94ad1e5520c73;p=localmylist.git Add the path_map table to the schema. --- diff --git a/localmylist/share/schema/schema.sql b/localmylist/share/schema/schema.sql index 782f8ee..aee175f 100644 --- a/localmylist/share/schema/schema.sql +++ b/localmylist/share/schema/schema.sql @@ -204,6 +204,18 @@ CREATE TABLE watched_directory CONSTRAINT watched_directory_pk PRIMARY KEY (host_id, directory) ); +CREATE TABLE path_map +( + map_id serial NOT NULL, + source_host integer NOT NULL, + destination_host integer NOT NULL, + source_prefix text NOT NULL, + destination_prefix text NOT NULL, + CONSTRAINT path_map_pk PRIMARY KEY (map_id), + CONSTRAINT path_map_unique UNIQUE (source_host, destination_host, source_prefix, destination_prefix), + CONSTRAINT path_map_to_same_host CHECK (source_host <> destination_host) +); + CREATE TABLE report ( report_id serial,