From c50374709585766e887f349a139de0a6595c1ca1 Mon Sep 17 00:00:00 2001
From: econwar <conor.ward@est.tech>
Date: Thu, 14 Feb 2019 09:37:44 +0000
Subject: Add optional API for PM Mapper

Added new field to Subscriber class to keep files after published
Added new Delete endpoint so that file can then be deleted

Change-Id: Id72da67689a7ceda8ddd4997cd6349b981cb1cdb
Issue-ID: DMAAP-981
Signed-off-by: econwar <conor.ward@est.tech>
---
 .../src/main/resources/database/sql_init_01.sql    | 32 ++++++++++++----------
 1 file changed, 17 insertions(+), 15 deletions(-)

(limited to 'datarouter-docker-compose/src/main/resources/database/sql_init_01.sql')

diff --git a/datarouter-docker-compose/src/main/resources/database/sql_init_01.sql b/datarouter-docker-compose/src/main/resources/database/sql_init_01.sql
index 01258320..60b638a0 100644
--- a/datarouter-docker-compose/src/main/resources/database/sql_init_01.sql
+++ b/datarouter-docker-compose/src/main/resources/database/sql_init_01.sql
@@ -31,20 +31,21 @@ CREATE TABLE FEED_ENDPOINT_ADDRS (
 );
 
 CREATE TABLE SUBSCRIPTIONS (
-    SUBID              INT UNSIGNED NOT NULL PRIMARY KEY,
-    FEEDID             INT UNSIGNED NOT NULL,
-    GROUPID            INT(10) UNSIGNED NOT NULL DEFAULT 0,
-    DELIVERY_URL       VARCHAR(256),
-    DELIVERY_USER      VARCHAR(20),
-    DELIVERY_PASSWORD  VARCHAR(32),
-    DELIVERY_USE100    BOOLEAN DEFAULT FALSE,
-    METADATA_ONLY      BOOLEAN DEFAULT FALSE,
-    SUBSCRIBER         VARCHAR(8) NOT NULL,
-    SELF_LINK          VARCHAR(256),
-    LOG_LINK           VARCHAR(256),
-    LAST_MOD           TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
-    SUSPENDED          BOOLEAN DEFAULT FALSE,
-    CREATED_DATE       TIMESTAMP DEFAULT CURRENT_TIMESTAMP
+    SUBID                       INT UNSIGNED NOT NULL PRIMARY KEY,
+    FEEDID                      INT UNSIGNED NOT NULL,
+    GROUPID                     INT(10) UNSIGNED NOT NULL DEFAULT 0,
+    DELIVERY_URL                VARCHAR(256),
+    DELIVERY_USER               VARCHAR(20),
+    DELIVERY_PASSWORD           VARCHAR(32),
+    DELIVERY_USE100             BOOLEAN DEFAULT FALSE,
+    METADATA_ONLY               BOOLEAN DEFAULT FALSE,
+    SUBSCRIBER                  VARCHAR(8) NOT NULL,
+    SELF_LINK                   VARCHAR(256),
+    LOG_LINK                    VARCHAR(256),
+    LAST_MOD                    TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+    SUSPENDED                   BOOLEAN DEFAULT FALSE,
+    PRIVILEGED_SUBSCRIBER       BOOLEAN DEFAULT FALSE,
+    CREATED_DATE                TIMESTAMP DEFAULT CURRENT_TIMESTAMP
 
 );
 
@@ -134,6 +135,7 @@ INSERT INTO PARAMETERS VALUES
     ('DELIVERY_INIT_RETRY_INTERVAL', '10'),
     ('DELIVERY_MAX_AGE', '86400'),
     ('DELIVERY_MAX_RETRY_INTERVAL', '3600'),
+    ('DELIVERY_FILE_PROCESS_INTERVAL', '600'),
     ('DELIVERY_RETRY_RATIO', '2'),
     ('LOGROLL_INTERVAL', '30'),
     ('PROV_AUTH_ADDRESSES', 'dmaap-dr-prov|dmaap-dr-node'),
@@ -142,5 +144,5 @@ INSERT INTO PARAMETERS VALUES
     ('PROV_MAXSUB_COUNT',   '100000'),
     ('PROV_REQUIRE_CERT', 'false'),
     ('PROV_REQUIRE_SECURE', 'false'),
-    ('_INT_VALUES', 'LOGROLL_INTERVAL|PROV_MAXFEED_COUNT|PROV_MAXSUB_COUNT|DELIVERY_INIT_RETRY_INTERVAL|DELIVERY_MAX_RETRY_INTERVAL|DELIVERY_RETRY_RATIO|DELIVERY_MAX_AGE')
+    ('_INT_VALUES', 'LOGROLL_INTERVAL|PROV_MAXFEED_COUNT|PROV_MAXSUB_COUNT|DELIVERY_INIT_RETRY_INTERVAL|DELIVERY_MAX_RETRY_INTERVAL|DELIVERY_RETRY_RATIO|DELIVERY_MAX_AGE|DELIVERY_FILE_PROCESS_INTERVAL')
     ;
-- 
cgit 1.2.3-korg

