diff schema/tap_tests_data.sql @ 195:5dc8e734487a

Introduce database schemas as privilege-based namespaces Some privileges changed (e.g. for responsibility_areas), but additional privileges were not left off intentionally before. Search path settings have been replaced by schema-qualifying names in statements to prevent object definitions from being dependend on search path settings.
author Tom Gottfried <tom@intevation.de>
date Fri, 20 Jul 2018 17:28:16 +0200
parents 4df4e4bf480e
children 88d21c29cf04
line wrap: on
line diff
--- a/schema/tap_tests_data.sql	Fri Jul 20 18:32:40 2018 +0200
+++ b/schema/tap_tests_data.sql	Fri Jul 20 17:28:16 2018 +0200
@@ -1,11 +1,13 @@
-SET search_path TO public, gemma, gemma_waterway, gemma_fairway;
+--
+-- Test data used in *_tests.sql scripts
+--
 
 INSERT INTO countries VALUES ('AT'), ('RO');
 
-INSERT INTO responsibility_areas VALUES
+INSERT INTO users.responsibility_areas VALUES
     ('AT', ST_geomfromtext('MULTIPOLYGON(((0 0, 0 1, 1 1, 1 0, 0 0)))', 4326));
 
-INSERT INTO user_profiles (username, country, email_adress)
+INSERT INTO users.user_profiles (username, country, email_adress)
     VALUES
     ('waterway_user', 'AT', 'xxx'),
     ('waterway_user2', 'RO', 'xxy'),
@@ -14,7 +16,7 @@
 
 INSERT INTO limiting_factors VALUES ('depth'), ('width');
 
-INSERT INTO gauges (
+INSERT INTO waterway.gauges (
     location, function_code, objname, geom, zero_point, source_organization)
     VALUES (
         ('AT', 'XXX', '00001', '00000', 1)::isrs,
@@ -25,7 +27,7 @@
         'testorganization'
     );
 
-INSERT INTO bottlenecks (
+INSERT INTO waterway.bottlenecks (
     bottleneck_id, fk_g_fid, stretch, area, rb, lb, responsible_country,
     revisiting_time, limiting, source_organization, staging_done)
     VALUES (
@@ -46,7 +48,7 @@
         1, 'depth', 'testorganization', true
     );
 
-INSERT INTO templates (template_name, template_data)
+INSERT INTO users.templates (template_name, template_data)
     VALUES ('AT', '\x'), ('RO', '\x');
-INSERT INTO user_templates
+INSERT INTO users.user_templates
     VALUES ('waterway_user', 'AT'), ('waterway_user2', 'RO');