]> Some of my projects - localmylist.git/commitdiff
Add the path_map table to the schema.
authorAPTX <marek321@gmail.com>
Tue, 2 Apr 2013 19:45:43 +0000 (21:45 +0200)
committerAPTX <marek321@gmail.com>
Tue, 2 Apr 2013 19:45:43 +0000 (21:45 +0200)
localmylist/share/schema/schema.sql

index 782f8eed2d6821e35fd23ee8ef6b6351703dc7ac..aee175fffc3d93948bc6dd62d0a7e1aae632a0d0 100644 (file)
@@ -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,