From 092b12a8ce465ce95b868235826d759421337f26 Mon Sep 17 00:00:00 2001 From: Paul Trowbridge Date: Tue, 29 May 2018 15:37:57 -0400 Subject: [PATCH] tpsv grant priveledge, add curl scripts to test --- deploy/setup.sql | 1 + sample_discovercard/curl_import.cmd | 1 + sample_discovercard/curl_mapdef.cmd | 1 + sample_discovercard/curl_mapvals.cmd | 1 + sample_discovercard/curl_srcedef.cmd | 1 + 5 files changed, 5 insertions(+) create mode 100644 sample_discovercard/curl_import.cmd create mode 100644 sample_discovercard/curl_mapdef.cmd create mode 100644 sample_discovercard/curl_mapvals.cmd create mode 100644 sample_discovercard/curl_srcedef.cmd diff --git a/deploy/setup.sql b/deploy/setup.sql index 26eebe2..ce644e5 100644 --- a/deploy/setup.sql +++ b/deploy/setup.sql @@ -25,6 +25,7 @@ CREATE ROLE api WITH --grant schema USAGE GRANT USAGE ON SCHEMA tps TO api; +GRANT USAGE ON SCHEMA tpsv TO api; --grant current table privledges GRANT SELECT, UPDATE, INSERT, DELETE ON ALL TABLES IN SCHEMA tps TO api; diff --git a/sample_discovercard/curl_import.cmd b/sample_discovercard/curl_import.cmd new file mode 100644 index 0000000..afd73c3 --- /dev/null +++ b/sample_discovercard/curl_import.cmd @@ -0,0 +1 @@ +curl -v -F upload=@./data.csv http://localhost:81/import?srce=dcard \ No newline at end of file diff --git a/sample_discovercard/curl_mapdef.cmd b/sample_discovercard/curl_mapdef.cmd new file mode 100644 index 0000000..ff72a98 --- /dev/null +++ b/sample_discovercard/curl_mapdef.cmd @@ -0,0 +1 @@ +curl -H "Content-Type: application/json" -X POST -d@./mapdef.json http://localhost:81/mapdef_set \ No newline at end of file diff --git a/sample_discovercard/curl_mapvals.cmd b/sample_discovercard/curl_mapvals.cmd new file mode 100644 index 0000000..3652d52 --- /dev/null +++ b/sample_discovercard/curl_mapvals.cmd @@ -0,0 +1 @@ +curl -H "Content-Type: application/json" -X POST -d@./vals.json http://localhost:81/mapval_set \ No newline at end of file diff --git a/sample_discovercard/curl_srcedef.cmd b/sample_discovercard/curl_srcedef.cmd new file mode 100644 index 0000000..caed4f2 --- /dev/null +++ b/sample_discovercard/curl_srcedef.cmd @@ -0,0 +1 @@ +curl -H "Content-Type: application/json" -X POST -d@./srce.json http://localhost:81/srce_set \ No newline at end of file