dataservices-api/client/test/sql/00_installation_test.sql
Rafa de la Torre 31e79cb626 Remove installation of schema_triggers
Schema triggers dependency was deprecated time ago. See
5d43faecaf/NEWS.md (0120-2016-01-27)
2017-10-04 17:26:30 +02:00

23 lines
842 B
SQL

-- Install dependencies
CREATE EXTENSION postgis;
CREATE EXTENSION plpythonu;
CREATE EXTENSION cartodb;
CREATE EXTENSION plproxy;
-- Install the extension
CREATE EXTENSION cdb_dataservices_client;
-- Mock the server connection to point to this very test db
SELECT cartodb.cdb_conf_setconf('geocoder_server_config', '{"connection_str": "dbname=contrib_regression host=127.0.0.1 user=postgres"}');
-- Mock the user configuration
SELECT cartodb.cdb_conf_setconf('user_config', '{"is_organization": false, "entity_name": "test_user"}');
-- Mock the server schema
CREATE SCHEMA cdb_dataservices_server;
-- Create a test user to check permissions
DROP ROLE IF EXISTS test_regular_user;
CREATE ROLE test_regular_user;
GRANT publicuser TO test_regular_user;
ALTER ROLE test_regular_user SET search_path TO public,cartodb,cdb_dataservices_client;